-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
More complete support for unregistered dependencies #1628
base: master
Are you sure you want to change the base?
More complete support for unregistered dependencies #1628
Conversation
2a180ba
to
63ceeb6
Compare
This comment has been minimized.
This comment has been minimized.
|
src/Operations.jl
Outdated
end | ||
if new_pkg !== nothing | ||
push!(unreg, new_pkg) | ||
collect_unregistered!(ctx, new_pkg, new_git, unreg) |
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 wonder why you have to recurse? In principle, the manifest of pkg
is likely to contain all URLs for unregistered dependencies, isn't it? Otherwise, such manifest cannot be instantiated.
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.
What about when you do an add on a url and that package has dependencies on other unregistered packages?
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.
In this case, I guess you'd need to parse the manifest file(s) contained in the newly to-be-added package? But what I was commenting was that, if this new package has a manifest file, it is likely that you don't need to parse the manifest files of dependencies of this newly added package. Or at least you can try to minimize the I/O by stop recursing if all direct and transitive dependencies are found. It could be an unnecessary premature optimization but don't need something like this to prevent infinite recursion anyway?
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.
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.
Thanks for the clarification. I was confused since I came to this PR via another PR #1088.
63ceeb6
to
ad2c139
Compare
Getting very close now. Here is an example of toggling between tracking a repo and tracking a path:
And adding a package with multiple unregistered dependencies:
|
f21ee36
to
34b8d2f
Compare
When you think this is ready, it would be good with a bit of a higher level description of what this implements and how it works etc. Just to aid in reviewing it :) |
The way that this currently works is that, whenever we track a dependency by path or by repo, we add the source url to the Whenever Pkg tracks an package by repo/path, we read its project file and see if it declares any dependencies on unregistered packages by checking its When collecting unregistered packages, if the declared source of the package is a local directory and that directory is not a git repo, we fall back to tracking the dependency by path. This fallback allows #1005 to integrate seamlessly with the rest of the scheme. |
d69bdf8
to
db30acd
Compare
I will rebase this soon. Any feedback for this, even if high level? |
My feedback is "doooo it". |
I think the new |
The goal for this PR is to make the use of unregistered dependencies as seamless as possible. Relying on the presence of manifests has two problems: (1) people have to remember to commit it and (2) we already use the presence of a manifest as a signal to |
Alright. In which cases is Pkg "allowed" to look at the source field? E.g. I don't think it should be allowed when sticking to registered versions for example. |
Whenever tracking a package by path or url maybe? |
Yea, just wanted to make sure that is how this is implemented. Also; why not store the source for all packages #378 ? |
That's in the manifest though. But yeah, that's a good idea as well. Also, I notice that Cargo stores the URL to the registry where the information for the package was retrieved instead of the URL to the git repo. Something to think about perhaps. |
Any progress here? I would love to see that feature backed in the next release 👍 |
This is a workaround [this issue](JuliaLang/Pkg.jl#1628)
Bump - any more progress or work here? Saw the checks did not finish... |
Was this PR supposed to have been superseded by #3783? On the one hand: On the other hand:
Moreover, I just tried it and I still get the "no known versions" error for an unregistered dependency I've always gotten, when trying to add an unregistered package. (And the most recent mention of this PR seems to be due to another group encountering the same problem.) |
This adds a
source
field in the active project for any packages we are tracking by repo or by path. Onadd
/dev
/instantiate
we crawl over any unregistered dependencies and download as necessary. After we collect all unregistered dependencies, we continue withresolve
normally.close #492 close #1005 supersedes #1088