-
Notifications
You must be signed in to change notification settings - Fork 70
feat(compute/rust): Handle Cargo config filename for Rust >=1.78.0 #1199
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
Conversation
Integralist
left a comment
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.
This isn't the end of the world but I would prefer not to have two WARNING lines next to each other when they both relate to the same warning.
I can see why that has happened by looking at the code and the fact you're trying to swap out the second warning for an error (depending on the situation) but it just looks a bit weird.
The preferred Cargo configuration filename has been 'config.toml' since Rust 1.39.0 was released, but 'config' was supported for backwards compatibility (although deprecated). In Rust 1.78.0, the backwards compatibility was removed, so any file with the old name will be ignored. Since Compute package builds require the content in that file, ignoring it results in a build failure. This patch adds checking for this situation. If the old file name is found, and the Rust version is <1.78.0, a warning is issued to let the user know that they should rename the file before upgrading to 1.78.0 or later. If the old file name is found, and the Rust version is >=1.78.0, an error is emitted and the build process stopped, as it will not succeed.
|
New output: and |
Integralist
left a comment
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.
🎉
The preferred Cargo configuration filename has been 'config.toml' since Rust 1.39.0 was released, but 'config' was supported for backwards compatibility (although deprecated).
In Rust 1.78.0, the backwards compatibility was removed, so any file with the old name will be ignored. Since Compute package builds require the content in that file, ignoring it results in a build failure.
This patch adds checking for this situation. If the old file name is found, and the Rust version is <1.78.0, a warning is issued to let the user know that they should rename the file before upgrading to 1.78.0 or later. If the old file name is found, and the Rust version is >=1.78.0, an error is emitted and the build process stopped, as it will not succeed.
Example output (with old file name and Rust 1.74.0):
Example output (with old file name and Rust 1.78.0):