Fix compilation bug in toolchain >= 1.70.0#321
Conversation
|
Is this behaviour on a path towards stabilization? Should we already commit to this approach? |
|
|
||
| quiet = self.qbuild or ext.quiet | ||
| debug = self._is_debug_build(ext) | ||
| is_new_toolchain = get_rust_version() >= Version('1.70.0-nightly') |
There was a problem hiding this comment.
I think a more description name would be helpful (today's new is tomorrow's old). Also do we need to include "nightly" here? Can we compare directly against "1.70.0" or this considered larger than "1.70.0-nightly" by Version?
There was a problem hiding this comment.
Thank you. I will withdraw this PR and fix it in another PR.
There was a problem hiding this comment.
I wrote Version('1.70.0-nightly') here, because I want is_new_toolchain to be True when get_rust_version() == Version("1.70.0-nightly").
But in fact Version('1.70.0-nightly') >= Version('1.70.0') is False.
Do you think something like the following is better?
rustc_version = get_rust_version()
is_new_toolchain = rustc_version.major > 1 or (rustc_version.major == 1 and rustc_version.minor >= 70)There was a problem hiding this comment.
Yes, I think that would be preferable. (Especially if combined with a more descriptive name than "new".)
|
I have mistaken the merging branch, so I will close this PR once. |
Fix #320