Repository navigation
sess package progress #1712
Description
Describe the bug
Early adopter of sess here just adding to the data in case its useful! I have one or two projects for which sess installed from the VSCode popup prompt, and it worked perfectly, and others for which it didn't. Today, I tried to deliberately add sess using rv add (I use rv for project package management):
rv repositories active!
repositories:
CRAN: https://packagemanager.posit.co/cran/latest
rv libpaths active!
library paths:
/n/holylabs/cgolden_lab/Lab/frontier/works/prospectors/prospectorKiribatiBioMarkers/rv/library/4.5/x86_64/redhat8
/n/home03/ttapera/software/spack/opt/spack/linux-icelake/r-4.5.1-7hho5emqpuvlwt7hhy7i5fval54zz7mx/rlib/R/library
Warning message:
In sess::connect(use_rstudioapi = as.logical(Sys.getenv("SESS_RSTUDIOAPI", :
[sess] Connection info not available. Cannot connect to VS Code.
# arf console v0.3.3
# Edit mode: emacs
# R 4.5.1 is ready.
# Type :cmds for meta commands list, Ctrl+D to exit.
R 4.5.1> sess::connect()
Warning message:
In sess::connect() :
[sess] Connection info not available. Cannot connect to VS Code.
R 4.5.1> sessionInfo()
R version 4.5.1 (2025-06-13)
Platform: x86_64-pc-linux-gnu
Running under: Rocky Linux 8.10 (Green Obsidian)
Matrix products: default
BLAS/LAPACK: /n/home03/ttapera/software/spack/opt/spack/linux-icelake/openblas-0.3.33-xlojbage3rtl5frqwshts2o3qlkej7t6/lib/libopenblas-r0.3.33.so; LAPACK version 3.12.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8
[8] LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: America/New_York
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.5.1 sess_3.0.0
R 4.5.1>
To Reproduce
Steps to reproduce the behavior:
rv add sess --git https://github.com/REditorSupport/vscode-R --directory sess --commit 20f32fe142145152c4cfa6a65f9a89 4f77adde9e
Can you fix this issue by yourself? (We appreciate the help)
Yes / No
(If yes,) can we assist you with anything?
(If applicable) Please attach setting.json
{
"r.plot.useHttpgd": true,
"r.rterm.linux": "${workspaceFolder}/.vscode/arf",
"r.workspaceViewer.showObjectSize": true,
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash"
}
},
"livePreview.defaultPreviewPath": "/docs/index.html",
"r.bracketedPaste": true,
"r.sessionWatcher": true,
"r.alwaysUseActiveTerminal": true,
"r.rpath.linux": "/n/holylabs/cgolden_lab/Lab/frontier/works/prospectors/prospectorKiribatiBioMarkers/.spack-env/view/bin/R",
"python.terminal.activateEnvInCurrentTerminal": true,
"r.libPaths": [
"/n/holylabs/cgolden_lab/Lab/frontier/works/prospectors/prospectorKiribatiBioMarkers/rv/library/4.5/x86_64/redhat8",
"/n/home03/ttapera/software/spack/opt/spack/linux-icelake/r-4.5.1-7hho5emqpuvlwt7hhy7i5fval54zz7mx/rlib/R/library"
]
}
# ./.vscode/arf
#!/usr/bin/env bash
set -euo pipefail
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
SPACK_VIEW="$PROJECT_ROOT/.spack-env/view"
export PATH="$SPACK_VIEW/bin:$PATH"
export LD_LIBRARY_PATH="$SPACK_VIEW/lib:$SPACK_VIEW/lib64:${LD_LIBRARY_PATH:-}"
export PKG_CONFIG_PATH="$SPACK_VIEW/lib/pkgconfig:$SPACK_VIEW/lib64/pkgconfig:${PKG_CONFIG_PATH:-}"
exec ~/.cargo/bin/arf "$@"Expected behavior
sess connected or sess::connect() to be successful
Screenshots
If applicable, add screenshots to help explain your problem.
You can show the keyboard contents by pressing F1 and Developer: toggle screencast mode
Environment (please complete the following information):
- OS: Linux (HPC Rocky cluster)
- VSCode Version: 1.122.1 (Universal)
- R Version: 4.5.1
- vscode-R version: 3.0.0-rc.0
Additional context
Good luck! I'm quite optimistic that the sess package is the solution we've all been waiting for
Activity
randy3k commentedon Jun 6, 2026
It is a bit odd that
Connection info not available. How did you launch the R program?grantmcdermott commentedon Jul 22, 2026
@TinasheMTapera what does your
rproject.tomllook like? I havesessworking in an rv-enabled projected with the following entry:P.S. Seconding the larger question raised by this issue, though. Any timeline for when
sessmight get submitted to CRAN @randy3k?TinasheMTapera commentedon Jul 22, 2026
@grantmcdermott I recently started doing the same as you in Singularity/Docker.
I first predict the system dependencies using
pak::pkg_sys_reqs(c(MY LIST OF USUAL SUSPECTS)), which tells me to install stuff like curl and LibXML and ICU in the docker container.I then use Spack to install any low level C stuff like PROJ and GEOS if I'm doing geospatial data, or low level dependencies for string libraries and such.
Lastly, I put all my packages in rv and I compile all of my packages per project; sess is the only one I get from github source.
Now, setting it up works like a charm. But sess is not totally stable yet for me. It does the job, but there are still some hiccups. So I've resigned to using it in its incomplete state while the devs continue to work on it.
TinasheMTapera commentedon Jul 22, 2026
Sitrep off the top of my head using the above workflow:
tar_visnetwork()works (network visualization, I think it usesDiagrammeR?)plot()works but takes agesView()doesn't work, error pop up?function()worksgrantmcdermott commentedon Jul 23, 2026
Is this just for the first plot, or for subsequent plots too?
Also, could you try installing jgd and check plotting performance then? (It should be invoked as the plotting backend automatically provided you are using the 3.0.0-rc version of the extension.)
eitsupi commentedon Aug 4, 2026
IIUC, CRAN is not a repository intended for storing developer tools, so submitting to CRAN and recommending installation from CRAN is risky.
R-universe, where you can control your own release timing, is a far more suitable option.
Investigated with Claude Code against the extension source at c02ace5.
The
[sess] Connection info not availablewarning looks independent of rv.sess::connect()can only find the pipe path in two ways:SESS_PIPEenv var, which is set inrTerminal.tsonly when the extension itself creates the R terminal, and~/.vscode-R/sessions/<Sys.getpid()>.json, whichwriteSessionFile()writes keyed on the shell process ID of a terminal namedR Interactive.So whenever R is not the direct process of an extension-created terminal — a wrapper script,
module load,srun,ssh, tmux, or any REPL front-end that runs R as a child process — both lookups miss andconnect()bails out with that warning. That would explain "works in some projects, fails in others" if the terminal setup differs between workspaces.Workaround: run R: Connect to Session (
r.connectToSession), which copies asource(...)command carrying the explicit pipe path, and paste it into the R session. Settingr.alwaysUseActiveTerminalmakesr.activateRSessionsend it to the active terminal instead.One more thing relevant to rv users: the bundled auto-install runs
install.packages(<sess src>, repos = NULL, type = "source")into.libPaths()[1], which under rv is the project library.rv syncmakes that library match the lockfile exactly, so an auto-installedsessis removed on the next sync — which is why it has to be declared inrproject.toml. rv has no dev/optional dependency concept either (project.dev_dependenciesparses but is never read anywhere), so it can only go in the regulardependencies.Edit: See also A2-ai/rv#336
grantmcdermott commentedon Sep 27, 2026
With the imminent
3.0.0release, I've just been working through the two "failing" items from your helpful sitrep @TinasheMTapera:I cannot reproduce, despite trying with different plot backends (
standard,jgd, andhttpgd) on both Mac and Linux (the two OSs that I have access to). Plotting is instantaneous for me.Again, I cannot reproduce. There have some some additional improvements to the viewer since your initial testing (e.g., #1703), so these may have fixed it.
RE:
sessandrvcompatibility. Disregarding the potential upstream tweak highlighted by @eitsupi (A2-ai/rv#336), another point worth mentioning is thatsessis now installable fromr-universe: https://reditorsupport.r-universe.dev/sess Alongside the git commit approach (above), I believe that this now gives two installation paths forsessinrvpowered projects. For the record, I still favour releasing stablesessversions to CRAN. But I think this issue can now be closed.Please reopen if you feel that I've missed something.
TinasheMTapera commentedon Sep 27, 2026
The r-universe feature will almost certainly solve my problems, thank you so much for your hard work!
leanhdung1994 commentedon Sep 28, 2026
eitsupi commentedon Oct 10, 2026
Related to #1856