-
Notifications
You must be signed in to change notification settings - Fork 31
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
Properly (de)serialize VersionSpec to JSON #93
Conversation
version(d::AbstractDependency) = getpkg(d).version | ||
version(d::Dependency) = d.pkg.version |
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's the difference? Isn't the first method sufficient?
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.
No it is (and was) not enough, which I tried to explain in the comment I added above
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.
Any suggestions on how to make this clearer are welcome :-)
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.
Just to make this explicit: this trick is not by me, it was added by @staticfloat as part of the build_version support; I merely dropped the (now unnecessary) __version
and added a comment in an attempt to clarify what's going on (well, or at least give a hint as to what's going on). It can probably be phrased better (and I just noticed a typo).
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 was missing that getpkg(d::Dependency)
isn't as simple as d.pkg
. At this point I find a bit questionable that method, since this is basically undoing it.
@staticfloat @giordano it would be really good to get this or something equivalent merged and used on Yggdrasil; it is starting to seriously bite me in the a... now |
Thanks Max! We can fix up the |
... and all their deps, while at it. I need this for JuliaPackaging/BinaryBuilderBase.jl#93
* Update to latest BB and BBB ... and all their deps, while at it. I need this for JuliaPackaging/BinaryBuilderBase.jl#93 * [.ci] Update from an older version of Julia Co-authored-by: Mosè Giordano <mose@gnu.org>
We had to revert JuliaPackaging/BinaryBuilderBase.jl#93 because it breaks registration of the LLVM package.
We had to revert JuliaPackaging/BinaryBuilderBase.jl#93 because it breaks registration of the LLVM package.
This changes
Dependency
objects to always (?) store a fullVersionSpec
, not just aVersionNumber
, and (de)serialize that properly. Fixes #89 (well, I hope).Before this, JuliaPackaging/BinaryBuilder.jl#981 should be merged.
CC @benlorenz @thofma