-
Notifications
You must be signed in to change notification settings - Fork 33
Add the concept of a top-level dependency #275
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
Conversation
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.
Can you please elaborate a bit on how you plan to use this concretely?
For projects like OpenMPI_jll that use Preferences for artifact selection we need to add the package that holds the "key=>value" to the deps, thus we added OpenMPI_jll, but when the artifact is not available we create a cache file |
|
8431d21
to
db93357
Compare
When we cache a Package we do not care about the Project.toml, the cache file is only dependent on the code being parsed. We track what files are |
To understand: this means that we'll have |
Yes exactly, we just move it up so that when there is no valid wrapper file we still add the dependency |
Ok, now I got it! 😃 |
@giordano I don't think I am responsible for the 1.8 error xD |
BinaryBuilderBase.jl/test/compat.jl Line 30 in c49f9a5
🤦 |
#276 should fix the failing test. I was probably too optimistic in thinking this could have been fixed for v1.8.2. |
1d86ac2
to
0396263
Compare
""" | ||
struct Dependency <: AbstractDependency | ||
pkg::PkgSpec | ||
build_version::Union{VersionNumber,Nothing} | ||
compat::String # semver string for use in Project.toml of the JLL | ||
platforms::Vector{<:AbstractPlatform} | ||
top_level::Bool |
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.
It just occurred to me that top-level dependencies can only be RuntimeDependency
, right? Or do you see cases where it can be a built-time dependency too?
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.
This would make #278 largely unnecessary because those dependencies would be pulled in during the build, and so they wouldn't cause the extra warning in the first place.
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.
Uhm the only case is @maleadt current adventure where the availability of a artifact might change the platform selection of the current one.
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.
Maybe a more principled stance would be to.make everything that is AnyPlatform top level?
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.
Maybe a more principled stance would be to.make everything that is AnyPlatform top level?
Uhm, no iso_codes_jll
is a regular JLL which is AnyPlatform
, I'm not sure that should be a top-level dependency.
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.
Also, AnyPlatform()
packages are often build-time dependencies (e.g. header-only packages), iso_codes_jll
is an exception but we have to deal with that.
Motivated by JuliaParallel/MPI.jl#646
In order for invalidation to happen we need to declare the dependency on the top-level of the file instead of in one of the platform specific wrappers.