positron icon indicating copy to clipboard operation
positron copied to clipboard

Provide a language agnostic way to determine mode in which a Positron session is running

Open petetronic opened this issue 1 year ago • 1 comments

While RStudio uses .rs.api.versionInfo() to describe version and session mode metadata, we want a language agnostic way to provide similar information consistently. Positron currently has ENV vars: POSITRON=1 and POSITRON_VERSION=YYYY.MM.PP format, which is a reasonable way to achieve this. We need to extend the env with more metadata including the precise build number (the "long" form of the version info), and at least the session mode (e.g. desktop vs. server) once it is hosted in Workbench.

petetronic avatar Jul 19 '24 13:07 petetronic

Note: Positron also currently passes information to a kernel to describe if the session is supporting a notebook. We should be careful to reconcile terminology here.

petetronic avatar Jul 19 '24 13:07 petetronic

Do we want these additional env vars available in the terminal as well as the Python/R consoles? Right now the terminal only has POSITRON, not any version info at all.

juliasilge avatar Sep 17 '24 17:09 juliasilge

Verified Fixed

Positron Version(s) : 2024.09.0-69
OS Version          : OSX

Test scenario(s)

Verified as described in QA notes here: https://github.com/posit-dev/positron/pull/4703

Link(s) to TestRail test cases run or created:

testlabauto avatar Sep 20 '24 13:09 testlabauto