-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Provide custom manifest name via JULIA_MANIFEST_NAME env var
#44286
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
Provide custom manifest name via JULIA_MANIFEST_NAME env var
#44286
Conversation
|
I imagine that Pkg (and any other users of the |
|
Yes. Just added a link to the Pkg branch |
|
Once JuliaLang/Pkg.jl#3000 is merged, we'll bump the Pkg version on master, and once that bump PR is merged, we'll rebase this PR. Then CI will be able to pass on this PR. |
|
@vtjnash Since you originally requested this feature, what do you think about the new interface? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the length of the tuple we return is going to be variable, then we should go back to vectors instead, so that the manifest_names function will be type-stable.
Co-Authored-By: Dilum Aluthge <[email protected]>
2615d4b to
506aa53
Compare
| const manifest_names = ("JuliaManifest.toml", "Manifest.toml") | ||
| const preferences_names = ("JuliaLocalPreferences.toml", "LocalPreferences.toml") | ||
| const project_names = ["JuliaProject.toml", "Project.toml"] | ||
| const default_manifest_names = ["JuliaManifest.toml", "Manifest.toml"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be populated on startup instead, and still be a global constant called manifest_names. I would think that would help tooling which uses this too.
| custom_def = strip(get(ENV, env_var_name, "")) | ||
| if !isempty(custom_def) | ||
| man_name = expand_version_placeholders(custom_def) | ||
| if endswith(custom_def, ":") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this split on : and replace empty parts with the default like load path?
I also don't think this functionality is that necessary, what is the problem with falling back to Manifest.toml if a versioned one doesn't exist?
|
Just checking, do we want to get this figured out for 1.9 given weak deps have landed, and 1.9 manifests with weakdeps will be quite different to prior julia versions? Over time I've actually come to prefer the original idea of just ranking version-named manifests higher automatically rather than requiring the user to specify an env var. so |
Yeah agreed that seems to me to be sensible behavior. |
|
Ok. Reviving #43845 in place of this |
Allows providing a custom manifest name via the
JULIA_MANIFEST_NAMEenv var, which can have placeholder#chars that will be replaced by theVERSIONfields.Requires JuliaLang/Pkg.jl#3000
Discussed in #43845 (comment)
Closes #43845