[WIP] Add type for requirement#10
[WIP] Add type for requirement#10davidanthoff wants to merge 4 commits intoJuliaPackaging:masterfrom
Conversation
|
I'm actually not sure why this package doesn't use the types from Pkg.Reqs directly. It is actually supported to have version ranges in REQUIRE that are unions of ranges with multiple components, though no currently tagged version in metadata has done so yet. |
|
Ah, cool. I changed it to now use the types from |
src/MetadataTools.jl
Outdated
| julia_max_ver = convert(VersionNumber,s[3]) | ||
| req.name!="julia" && continue | ||
| isnull(req.upper_bound) && continue | ||
| julia_max_ver = get(req.upper_bound) |
There was a problem hiding this comment.
@tkelman This is incorrect, but I'm not entirely sure what the right thing to do here is...
There was a problem hiding this comment.
Looks like the Requirement type has a versions field that's a VersionSet type. VersionSet has an intervals field which is a vector of VersionIntervals. If the vector isn't length 1, the code in this package probably won't handle it correctly. The first element of the array will have a lower and upper field.
There was a problem hiding this comment.
Ok, I've pushed something that handles the case with one interval and throws an error otherwise. Probably more robust than the old code, that might or might not have thrown an error.
|
Once this is merged and tagged I'll merge queryverse/Query.jl#110, that shows how one can use Query with the stuff returned from MetadataTools. |
|
I think I got things right, but a review of the changes especially to |
I had this kind of code lying around in a branch over at Query.jl, but makes much more sense to integrate the delta here.
I'll probably add an example to Query.jl that shows how one can query the package database in combination with MetadataTools.