-
Notifications
You must be signed in to change notification settings - Fork 350
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
Conditional transitive dependencies are downloaded unconditionally #2755
Comments
Dependencies' packages are installed by reading their |
Well that describes Lake's current behavior, but I don't see why that needs to be the case. If a package is not reachable via |
This appears to be due to a mathlib4 commit removing the other packages from mathlib's |
The However, I do think better handling of conditional dependencies is something to keep in mind -- if Lake stored some representation of the condition in the manifest, then this issue could be resolved while preserving the dependency lock. In essence, I think Gabriel may be right when he observed in leanprover/lake@1bd8430#r82491382 that |
Transitive dependencies which are only dependencies of a dependency conditionally (for example,
doc-gen4
is a dependency ofmathlib
only ifmathlib
gets the config optiondoc = on
) are downloaded even if they shouldn't because the condition is false.To reproduce, run:
This should not download doc-gen4 (at least, with the current dependencies listed by mathlib, std4, etc.), and instead,
lake update
should only download doc-gen4 if (e.g.) the lakefile is edited to readrequire mathlib ... with <options>
to specifydoc=on
.However, currently it does download
doc-gen4
(and all its transitive dependencies).The text was updated successfully, but these errors were encountered: