-
Notifications
You must be signed in to change notification settings - Fork 142
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
Swap to Proc Macro Error 2 RUSTSEC-2024-0370 #350
base: master
Are you sure you want to change the base?
Conversation
Please run the tests with |
ping @Keats |
Apparently the error messages between 1.79 and 1.81 are different. I've pushed the error messages for 1.79 since it seems thats what the CI test was failing on fist. However, one will always fail. This is true on the master branch as well. |
validator_derive/Cargo.toml
Outdated
darling = { version = "0.20", features = ["suggestions"] } | ||
once_cell = "1.18.0" | ||
|
||
[features] | ||
nightly = ["proc-macro-error2/nightly"] |
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 the name be more clear somehow?
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.
nightly_features?
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.
I'm not sure, I don't even know what this does in proc-macro-error2
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.
For the nightly feature in proc-macro-error2 its just a different implementation for emitting diagnostics and aborting. The main difference between the two appear to be that warnings are emitted in nightly while ignored in non-nightly builds. Tagging @HigherOrderLogic since they requested this.
I also think its fine if the feature isn't included since Validator might not want to use these extra warnings anyway. Might be a good idea to move this to a different PR for another discussion.
If you want to look at the code its here: https://github.com/GnomedDev/proc-macro-error-2/tree/master/src/imp
The delegate.rs is the nightly version and fallback.rs is the non nightly version
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.
I'm not sure, I don't even know what this does in proc-macro-error2
It's as @pvichivanives said, this feature enables emitting warning when using nightly compiler, otherwise ignored.
So to match the function, I think this feature can be renamed to nightly-warnning
, or nightly-proc-macro
, or even the longer nightly-proc-macro-error
Hi!
Given the RUSTSEC warning issued here: https://rustsec.org/advisories/RUSTSEC-2024-0370 just submitting a PR to move to the reccomended new version of procmacroerror2