Skip to content
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

Automatic discovery of Pixi R interpreters #3724

Open
roaldarbol opened this issue Jun 28, 2024 · 17 comments
Open

Automatic discovery of Pixi R interpreters #3724

roaldarbol opened this issue Jun 28, 2024 · 17 comments
Labels
area: runtimes Issues related to Language Runtimes enhancement New feature or request lang: r support
Milestone

Comments

@roaldarbol
Copy link

roaldarbol commented Jun 28, 2024

On top of python interpreters from conda/mamba and global R installations (e.g. with rig), they can both be installed with pixi to pin versions within a single project - incredibly useful when it comes to reproducibility.

So this feature request is for the automatic discovery of interpreters living inside a .pixi folder inside the opened project/folder. Note, that this has just been implemented for VS Code (for Python only), but does not work in Positron. Maybe it can be patched, or there's possibly help to find in that PR. In any case it would also need to be implemented for R interpreter.

@roaldarbol roaldarbol added the enhancement New feature or request label Jun 28, 2024
@Robinlovelace
Copy link

That is great to see, never came across pixi but seems like a great way to manage environments. I'd also like to flag micromamba, the most efficient way to set-up and configure Python envs I've come across. No built-in support in VS Code but there's a good extension: https://marketplace.visualstudio.com/items?itemName=corker.vscode-micromamba

Would Pixi supercede the need for micromamba support @roaldarbol? You've saved me opening a feature request if so!

@Robinlovelace
Copy link

Also see prefix-dev/pixi#1543 by the author of the original post.

@roaldarbol
Copy link
Author

@Robinlovelace It will! So the guys at prefix are the same folks behind mamba, and pixi is their "new" flagship - mamba will of course still be supported as I understand it. I use pixi now with all my projects, and we're just laying final touches on the last missing features to make it the option for R too - I currently have some nice mixed R/Python projects managed in the same environment, fully reproducible and IDE-independent. 😊

@Robinlovelace
Copy link

Very cool, keep up the great work!

@seeM
Copy link
Contributor

seeM commented Jul 1, 2024

Thank you for the info! Since we're currently using a fork of the vscode-python extension, the new pixi locator should just work once we've merged the latest release from upstream 🤞

@roaldarbol
Copy link
Author

roaldarbol commented Jul 1, 2024

@seeM That sounds great! How about discovery of R installation? Since it's also possible to download R from conda-forge, that can also live in .pixi - will that also be discoverable then, or will that require extra modifications on the Positron side?

@roaldarbol
Copy link
Author

And just to think ahead, once if Julia gets better support (#3679) - and since Julia is also on conda-forge - could that become discoverable too. :-)

@Robinlovelace
Copy link

This may not be the best place for this question but the above comms makes me wonder: is there a way to default to a system installation? That could reduce bandwidth and HD resources of installing software multiple times on different environments. Or would you just not use pixi when you want to use system installation?

@roaldarbol
Copy link
Author

There is, you can pixi global install <package>. And good that you mentioned it, just opened #3767, requesting Positron on conda-forge to allow a global installation of it.
For more pixi-related questions, I recommend checking out their documentation and joining their Discord - super helpful and responsive - it's a great community. :-)

@seeM
Copy link
Contributor

seeM commented Jul 2, 2024

@seeM That sounds great! How about discovery of R installation? Since it's also possible to download R from conda-forge, that can also live in .pixi - will that also be discoverable then, or will that require extra modifications on the Positron side?

It would not affect R discovery, since that is a totally separate extension with its own machinery at this point.

@roaldarbol
Copy link
Author

Which extension is that? And I guess that is then the crux of this issue. :-)

@juliasilge juliasilge added area: runtimes Issues related to Language Runtimes labels Jul 2, 2024
@juliasilge
Copy link
Contributor

Let's use this feature to track interest in supporting Pixi interpreters for R. Thanks! 🙌

@roaldarbol roaldarbol changed the title Automatic discovery of Pixi interpreters Automatic discovery of Pixi R interpreters Jul 2, 2024
@juliasilge juliasilge added this to the Future milestone Jul 5, 2024
@joshualeond
Copy link

@jennybc pointed me to this issue that seems related: #2235

@roaldarbol
Copy link
Author

The discovery of Python pixi interpreters has just been released in the vscode-python extension.

@Robinlovelace
Copy link

This is great to see! Any chance of Positron using that extension or will it be a case of developing parallel functionality 'in-house', I wonder.

@roaldarbol
Copy link
Author

They already do - so as soon as the new release gets merged here, it should work.
#3724 (comment)

Thank you for the info! Since we're currently using a fork of the vscode-python extension, the new pixi locator should just work once we've merged the latest release from upstream 🤞

@seeM
Copy link
Contributor

seeM commented Jul 9, 2024

@roaldarbol is correct! The latest vscode-python release is a bit more complicated than usual (they've reimplemented environment discovery in Rust, which means we have to get the Rust toolchain + build setup properly too – also means much faster discovery! 🎉), so this update will take us a little longer than usual to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: runtimes Issues related to Language Runtimes enhancement New feature or request lang: r support
Projects
None yet
Development

No branches or pull requests

6 participants