Skip to content

Add session mode section in ark --help#1316

Open
lionel- wants to merge 1 commit into
mainfrom
doc/session-mode
Open

Add session mode section in ark --help#1316
lionel- wants to merge 1 commit into
mainfrom
doc/session-mode

Conversation

@lionel-

@lionel- lionel- commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Closes #1311

@lionel- lionel- requested a review from DavisVaughan July 3, 2026 17:01

@DavisVaughan DavisVaughan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine, but I do think we should not put the extended docs in the CLI output itself

Comment thread crates/ark/src/main.rs
Comment on lines +77 to +97
Session modes:

"console" mode (the default) is meant for a rich frontend like Positron, while
"notebook" mode is meant for standard Jupyter frontends. They differ in how
some output is reported to the frontend:

- Errors. A Jupyter error message carries the error message in "evalue" and the
backtrace in "traceback". In "console" mode these are sent as-is. In
"notebook" mode the error message is also prepended to "traceback", because
frontends such as JupyterLab only display "traceback" when it is present,
discarding "evalue". Without the prepend the error message wouldn't show at
all.

- Autoprint of intermediate expressions. When a single request contains several
top-level expressions (e.g. `a` and `b` in `a; b; c`), "console" mode streams
each intermediate result to the frontend, matching R behaviour. "notebook"
mode emits only the last expression's result, matching how a notebook cell is
typically evaluated by Jupyter kernels.

Note that `ark --install` sets the generated kernelspec to run Ark in notebook
mode.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think CLI help should be relatively quiet, reporting just the options available with a brief description about them. If we started adding these extra docs about each option, our --help output would get way too long imo.

This feels like it should be in Ark website documentation somewhere. For lack of a better place, maybe a new Ark CLI section of https://github.com/posit-dev/ark/blob/main/doc/configuration.md

I feel like this is especially true here, with these extremely niche details that are better left to more in depth docs, rather than the first thing a user sees when requesting help with --help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expand --session-mode documentation

2 participants