-
Notifications
You must be signed in to change notification settings - Fork 11
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
1.7 compat #74
1.7 compat #74
Conversation
Codecov Report
@@ Coverage Diff @@
## master #74 +/- ##
==========================================
+ Coverage 88.99% 96.92% +7.92%
==========================================
Files 7 7
Lines 509 520 +11
==========================================
+ Hits 453 504 +51
+ Misses 56 16 -40
Continue to review full report at Codecov.
|
8620bcf
to
11421bc
Compare
Well the release of 1.7 forced my hand a bit with this one! Looks good to go though. Its not super pretty but it replicates the same behaviour as what we are doing on 1.6. Also bonus is that it passes on nightly. Lets keep 1.0 compat for now, although it may be worth removing it to overhaul the code somewhat. |
src/compat_check.jl
Outdated
@@ -151,10 +154,11 @@ function get_dep_entries end | |||
if haskey(getdeps(active_env.manifest), testreport_proj.deps[dep]) | |||
push!(deps_to_check, getdeps(active_env.manifest)[testreport_proj.deps[dep]]) | |||
else | |||
version_number = isa(testreport_proj.compat[dep], String) ? VersionNumber(testreport_proj.compat[dep]) : VersionNumber(testreport_proj.compat[dep].str) |
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 we do something like
version_number = isa(testreport_proj.compat[dep], String) ? VersionNumber(testreport_proj.compat[dep]) : VersionNumber(testreport_proj.compat[dep].str) | |
version_number = string(testreport_proj.compat[dep]) |
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.
In 1.7 VersionNumber(testreport_proj.compat[dep]
is a Pkg.Types.Compat
which is a new type that didn't exist, so string(testreport_proj.compat[dep])
just produces something like "Compat(VersionSpec(\"1.0\"), \"1.0\")"
. However I can make this line clearer
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.
Oh I see you mean not use VersionNumber
. Yes quite possibly. I've been thinking about this and it feels like there must be a better solution/I'm not sure this is working exactly as intended. For this PR I'll keep using VersionNumber
as it keeps the behaviour consistent, but I think a better way may be to to use VersionSpec
.
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.
Testing full CI. Needs a bit of work (one failing test I think) and tidying