-
-
Notifications
You must be signed in to change notification settings - Fork 268
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
Compatibility for optional dependencies #1179
Comments
How is this different from #895? |
Unlike #895, #1033 does not solve this issue. As I mentioned in the OP, JuliaPlots/Plots.jl#1956 is an example. Plots relies on PyPlot only via |
Hi, I just ran into the same issue: Have one optional dependency through |
I don't think there is a way to do it (that's why I opened this issue). Maybe it's obvious but I think what you can do is to error out or warn when an incompatible version is loaded. See, e.g., how Flux.jl does this: https://github.com/FluxML/Flux.jl/blob/8ee6af1bee39bd9f6ed8e6cdf854ea9aaccb14dd/src/cuda/cuda.jl#L7-L18 PS: Thanks for the comment. Now Pkg devs know there are at least more than two people want this feature :) |
#1285 has discussion for compat with conditional dependencies. The conditional dependencies will simply need to be compatible with the rest of the project, otherwise they will not be loaded. |
Currently,
[compat]
information for packages listed in[extras]
is ignored (see MWE below). It would be nice if they are handled so that:Packages using Requires.jl can add the optional dependencies in
[extras]
and then can impose compatibility.It resolves situations like Pyplot API update (fix #1932) JuliaPlots/Plots.jl#1956 where Plots devs cannot update PyPlot API without causing confusion https://discourse.julialang.org/t/23510.
It also has a minor cosmetic effect that
@require
can read the UUID fromProject.toml
so that the UUID does not have to be in the source code.I also proposed a new framework for optional dependency management https://discourse.julialang.org/t/23526/41. Again, compatibility information for packages not in
[deps]
would help.I just noticed that Julia 1.2 will ditch
[extras]
and go withtest/Project.toml
. So, any feature requests touching[extras]
may be out of core devs' interest. However, it seems there is no solid plan for dealing with optional dependencies (IIUC #1085 is still in a "brainstorming" phase). Would it be useful to repurpose[extras]
for run-time (in contrast to test-time) optional dependency constraint?It is also somewhat related to #895 but I believe it is reasonably different to open a new issue.
MWE, just in case:
I see
VersionParsing v1.1.3
but I expectedVersionParsing v1.1.1
as I putVersionParsing = "= 1.1.1"
in the upstream.The text was updated successfully, but these errors were encountered: