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

Allow simultaneous path and url under [sources] with path-priority #4089

Open
thchr opened this issue Nov 18, 2024 · 0 comments
Open

Allow simultaneous path and url under [sources] with path-priority #4089

thchr opened this issue Nov 18, 2024 · 0 comments

Comments

@thchr
Copy link
Contributor

thchr commented Nov 18, 2024

I have a situation where I'd like to use the [sources] entry of Project.toml, to indicate that a package, X, should first be looked for at some path - and, if not present there, be looked for at some url. I had hoped this might be possible to do by something like

[sources]
X = {path="..", url="https://github.com/user/X.jl"}

but that's not possible currently, by design, cf.

Pkg.jl/src/project.jl

Lines 104 to 106 in 69c6de0

if haskey(source, "path") && (haskey(source, "url") || haskey(source, "rev"))
pkgerror("Both `path` and `url` or `rev` are specified in `source` section")
end

I think it would be nice to be able to do this though: it would allow one to develop multiple interdependent private packages locally, preferring local versions specified in path if the exist, and then distribute them to collaborators, who might not have a local versions (then pulling from url).

Basically, I think it would be natural to let path take precedence if both path and url are present and a directory with a project exists at path.

@thchr thchr changed the title Allow simultaneous path and url under [sources] with path-priority Allow simultaneous path and url under [sources] with path-priority Nov 18, 2024
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

No branches or pull requests

1 participant