Skip to content
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

Use trailing dash (e.g. v"1.4-") to compare minor version numbers #79

Merged
merged 2 commits into from
Aug 9, 2023

Conversation

maxkapur
Copy link
Contributor

@maxkapur maxkapur commented Jul 29, 2023

This PR changes minor version checks such as VERSION >= v"1.4" (intended to match versions in the 1.4 series and beyond) to use Julia's trailing dash syntax: VERSION >= v"1.4-".

The trailing dash is necessary for Julia's implementation of semver because VERSION >= v"1.4" will return false for alpha, beta, and rc versions that are part of the 1.4 series (and therefore have the same features):

julia> v"1.4-rc1" >= v"1.4-"
true

julia> v"1.4-rc1" >= v"1.4"
false

Reference: https://docs.julialang.org/en/v1/manual/strings/#man-version-number-literals

It is good practice to use such special versions in comparisons (particularly, the trailing - should always be used on upper bounds unless there's a good reason not to)


This might fix #35 and/or #47.

@codecov
Copy link

codecov bot commented Jul 29, 2023

Codecov Report

Merging #79 (a28a9af) into main (5adff7b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #79   +/-   ##
=======================================
  Coverage   74.31%   74.31%           
=======================================
  Files          25       25           
  Lines         623      623           
=======================================
  Hits          463      463           
  Misses        160      160           
Files Changed Coverage Δ
src/TestEnv.jl 100.00% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@oxinabox oxinabox merged commit 7359b7a into JuliaTesting:main Aug 9, 2023
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve error message when running TestEnv.activate() twice
2 participants