-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
configure: fix comparing double-digit versions #21183
Conversation
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.
Hi, @mistydemeo and welcome! Thanks for the fix!
Could the tuples not be compared directly rather than creating a helper function? Been a while since I wrote any python... |
I didn't think that would work, but lo and hehold: https://docs.python.org/2.7/tutorial/datastructures.html#comparing-sequences-and-other-types I'll update this to use that. |
6462d4e
to
5759b3e
Compare
Compare versions using tuples instead of strings so that it is future-proofed against versions that contain a number that is more than one digit. PR-URL: nodejs#21183 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Landed in 641d4a4. |
Compare versions using tuples instead of strings so that it is future-proofed against versions that contain a number that is more than one digit. PR-URL: #21183 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Compare versions using tuples instead of strings so that it is future-proofed against versions that contain a number that is more than one digit. PR-URL: nodejs#21183 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
This land cleanly on all current release lines except v6.x-staging. I'll open a backport PR. |
Setting |
Compare versions using tuples instead of strings so that it is future-proofed against versions that contain a number that is more than one digit. PR-URL: nodejs#21183 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Compare versions using tuples instead of strings so that it is future-proofed against versions that contain a number that is more than one digit. PR-URL: #21183 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Compare versions using tuples instead of strings so that it is future-proofed against versions that contain a number that is more than one digit. Backport-PR-URL: #21301 PR-URL: #21183 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Compare versions using tuples instead of strings so that it is future-proofed against versions that contain a number that is more than one digit. PR-URL: #21183 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Compare versions using tuples instead of strings so that it is future-proofed against versions that contain a number that is more than one digit. Backport-PR-URL: #21301 PR-URL: #21183 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Compare versions using tuples instead of strings so that it is future-proofed against versions that contain a number that is more than one digit. Backport-PR-URL: #21301 PR-URL: #21183 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Compare versions using tuples instead of strings so that it is future-proofed against versions that contain a number that is more than one digit. Backport-PR-URL: #21301 PR-URL: #21183 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Compare versions using tuples instead of strings so that it is future-proofed against versions that contain a number that is more than one digit. Backport-PR-URL: #21301 PR-URL: #21183 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Compare versions using tuples instead of strings so that it is future-proofed against versions that contain a number that is more than one digit. Backport-PR-URL: #21301 PR-URL: #21183 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
make -j4 test
(UNIX), orvcbuild test
(Windows) passesPerforming this comparison using strings means that
10
is considered to be smaller than3
, which is not correct in this case. It results in spurious "compiler is too old" warnings. Since the values are already parsed into tuples, this does the comparison using all three values of the tuple instead of comparing them asx.y.z
strings.This patch fixes a warning not addressed in #21173.
Refs #21175.