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

Activate special environments similar to Julia's CLI arg --project #3821

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ven-k
Copy link
Member

@ven-k ven-k commented Mar 1, 2024

Similar to Julia's command line argument --project,

This also changes how Pkg.activate behaves wrt temp (disallows) and stdlib (activates @stdlib/Project.toml)

Related to these, the PR adds tests and updates docs.

Similar to Julia's command line argument `--project`,
- `activate @temp` activates temp environment
- `activate @stdlib` activates `Sys.STDLIB`
- `activate @.` activates current project
- `activate @` activates active project
Julia's CLI arg `--project=@temp` now creates temporary environments. So, with a helpful error message, indicate that naming shared environment as `temp` is not allowed.
Julia CLI arg `--project=@stdlib` activates STDLIB project; match the
behavior here.
@ven-k
Copy link
Member Author

ven-k commented Mar 1, 2024

While here, I wonder if this part of load_path_expand in initdefs.jl of Julialang/julia should be separated out as an internal function which Pkg can then use in parse_activate and activate (for shared = <> dispatch).
This would keep the behavior in sync.

@ven-k ven-k requested a review from KristofferC March 8, 2024 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant