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

Some maintenance #371

Closed
wants to merge 4 commits into from
Closed

Some maintenance #371

wants to merge 4 commits into from

Conversation

vmx
Copy link
Member

@vmx vmx commented Sep 30, 2024

This is a PR that bundles some maintenance work. With all these changes, the dependencies are up to date and the CI is green. It doesn't contain any major changes.

This PR shouldn't be squashed when merged as it's really individual changes only bundles as they are so small.

The `proc-macro-error` crate is deprecated, hence use `proc-macro-error2`
instead.

Closes #370.
There was a more recent release which needs a different config.

Also make it as strict as it was intended by the original author.

And finally use the official GitHub Action to run it on CI.
@vmx vmx requested a review from Stebalien September 30, 2024 18:47
@@ -13,7 +13,7 @@ proc-macro = true
[dependencies]
proc-macro2 = { version = "1.0.24", features = ["span-locations"] }
proc-macro-crate = "3.1.0"
proc-macro-error = "1.0.4"
proc-macro-error2 = "2.0.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This crate doesn't seem too popular. What's the issue with keeping the old one?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason is https://rustsec.org/advisories/RUSTSEC-2024-0370.html. And if you run something like cargo-deny (which we do on CI), it will complain about it. And I would expect that maybe someone will complain, hence it's easier to upgrade to that one. Another point is that crates are moving on to syn v2, so you would've less duplicated deps as proc-macro-error is still using v1.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be more concerned about using a random crate than using a so-called "unmaintained" crate, from a supply-chain perspective at least.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The supply-chain perspective is a good point. I'll update that PR when I find time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I have to wonder if we could just vendor it)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you find it annoying, please complain to the rustsec project.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To expand on that, it's one thing if an unmaintained project has security issues piling up. But jumping to the latest hot fork is just as likely to cause problems as not. Declaring a project unmaintained without a clear replacement is literally just dangling a vulnerable part of the OSS supply chain in front of potential attackers and asking them to "jump in and take a bite".

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://rustsec.org/advisories/RUSTSEC-2024-0370.html lists 3 replacements, including proc-macro-error2 used in this PR. And it does pull outdated version of syn that is one more thing to compile for everyone downstream.

So overall I think it is fair to warn users that this crate is unmaintained and if they have any issues with it in the future, there will be no easy solution for them, which is even worse when dependency is indirect.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://rustsec.org/advisories/RUSTSEC-2024-0370.html lists 3 replacements, including proc-macro-error2 used in this PR.

I'm talking about clear replacements. In this case, both the advisory and the suggestion to use proc-macro-error2 were submitted by the author of proc-macro-error2.

The other alternatives were added later, but still aren't clear replacements.

So overall I think it is fair to warn users that this crate is unmaintained and if they have any issues with it in the future, there will be no easy solution for them, which is even worse when dependency is indirect.

RUSTSEC is a security project and treats these advisories as security advisories. Sure, I get warning about unmaintained security critical bits if there is a clear maintained replacement, but reports like this one just cause people to complain and are more likely to cause security issues than they are to resolve them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, here's a version that simply drops the offending dependency: #372.

@Stebalien
Copy link
Member

Merged by rebase in #372.

@Stebalien Stebalien closed this Oct 23, 2024
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.

3 participants