-
Notifications
You must be signed in to change notification settings - Fork 109
Add Conda R interpreter discovery #6888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This discovers my miniforge R installation (I have no global R install) on macOS! |
@wesm Thx for testing! @petetronic I assume I need a code review by a member of the Posit team before my PR can be merged? |
Thanks @kv9898 for this PR! We definitely recognize the need to support conda users, who use R with Positron. And R discovery is a key part of that (but by no means all of it). Better conda support is on our roadmap and our goal is to take a holistic view that also accounts for critical downstream workflows, such as package installation. Many of us have seen a lot of pain over the years caused by unintentional "mixed workflows", where conda use gets combined with binary packages from CRAN, which does not end well. Our hope is to introduce improved conda support that sets R users up for long-term success, especially around package management. I just wanted to chime in with our appreciation for this PR, even though we are not in a position to move on this in the immediate future. |
Can we add this as an optional/experimental feature that is turned off by default? Because it seems that many paople are manually adding their Conda R paths - at least this PR can save them some hassle. |
That is a reasonable point, @kv9898! I'll open a new PR with your commits (because of the problem we have with #6628) and have @jennybc review it. We do have better support for conda R interpreters on our roadmap, but we can get this initial detection merged in behind a disabled experimental feature flag. Like @jennybc, I do want to highlight that much of the substance of the R support in Positron will not work just because we detect the interpreter. We plan to re-examine that when we address #4398 more holistically. |
Thank you @kv9898 for your contribution and flexibility! |
This is an internal PR based on #6888, to get around the problems outlined in #6628 ### Release Notes No release notes ### QA Notes No QA needed; we are not adding _any_ supported functionality for conda R interpreters at this time. Let's run the tests: @:critical @:sessions @:r-pkg-development --------- Co-authored-by: Dianyi Yang <kv9898@rubuky.com>
@jennybc @juliasilge Not sure if this alleviates any of your concerns, but quite a few conda-based R users actually manage their packages directly through R, rather than via conda. The reason is that managing R packages through conda often leads to unexpected issues—perhaps one reason conda is less popular among R users compared to Python users. I get the impression many of them use conda mainly to segregate environments across multiple projects, or simply to avoid installing R system-wide—especially those coming from a Python background. Thanks again for the PR review, your thoughtful consideration, and the rewrite! It's been a pleasure contributing to the Positron project! |
@kv9898 Are you aware of an existing write-up of "here's how I use conda with R"? I ask because this really catches my ear: "quite a few conda-based R users actually manage their packages directly through R, rather than via conda". I'd love to know exactly what this means. An early part of our real effort to deal with has to be doing research on what safe/correct conda usage with R actually looks like. As package maintainers and instructors, several of us feel like we've tried to help folks who used conda suboptimally, causing a lot of dysfunction and pain in the process. We need to develop precise descriptions of "good" vs. "bad" patterns for using conda with R. |
Sure. Here's the first post that came to my mind: https://www.reddit.com/r/bioinformatics/comments/14nthyb/does_it_have_something_like_conda_but_for_r/, where it says "In my experience, there are... many weird bugs and hitches you run into when trying to install R packages from conda directly that magically disappear when you install from CRAN or bioconductor directly". I'm sure I have seen other similar posts, I will add to this comment once I find their links: https://stackoverflow.com/questions/36652015/how-to-install-r-packages-not-in-the-conda-repositories |
New Features
Bug Fixes
QA Notes