Major rewrite / rsession simplification #37
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For reasons that are not entirely clear, Posit's
rsession
application is now more broadly compatible with multiple versions of R. I've been able to run the RHEL 9rsession
against all major Linux versions of conda R from 3.4 onward, with only a small special treatment required for our very old legacy environmentanaconda50_r
. This is likely a combination of upgrades to our low-level conda libraries as well as changes Posit has made. So this now means we have much less adaptation to do to make rsession work with our binaries.We still need the environment detection capability, however. I've refactored how we do that, though, so that if the environment already exists on start time, the (slow) activation process is done before the session comes up for the first time. This makes RStudio seem to come up more quickly and reliably. In the event that the user changes R environments on the fly, I studied RStudio's session launching behavior closely and managed to make our script more robust to timeouts.
Finally I improved our environment search capability. It looks for R environments in the following priority order:
The first environment with an
r-base
package wins.