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

Remove use of paste library. #60

Merged
merged 1 commit into from
Mar 11, 2025
Merged

Remove use of paste library. #60

merged 1 commit into from
Mar 11, 2025

Conversation

kpreid
Copy link
Owner

@kpreid kpreid commented Mar 11, 2025

paste has been given an “unmaintained” advisory and that means, regardless of whether it is still any good, people will get warnings for having it in their transitive dependencies. I would like to avoid that.

Luckily, it turns out that we can just replace all of the token pasting with generic code. (Rust 1.79 added the num::NonZero<T> generic type, too, but that isn’t actually helping us because the ZeroablePrimitive trait it depends on is still unstable — so we still need to define separate concrete implementations.)

If a need for paste-like functionality comes up again, we can consider adding the functionality to our own exhaust-macros, look at what alternatives have developed by then, or see whether the RustSec policy has gained more nuance about “unmaintained” vs “done” status. But for now, this is one fewer dependency, quite cheaply, and less fuss.

`paste` has been given an “unmaintained” advisory and that means,
regardless of whether it is still any good, people will get warnings for
having it in their transitive dependencies. I would like to avoid that.

Luckily, it turns out that we can just replace all of the token pasting
with generic code. (Rust 1.79 added the `num::NonZero<T>` generic type,
too, but that isn’t actually helping us because the `ZeroablePrimitive`
trait it depends on is still unstable — so we still need to define
separate concrete implementations.)

If a need for `paste`-like functionality comes up again, we can consider
adding the functionality to our own `exhaust-macros`, look at what
alternatives have developed by then, or see whether the RustSec policy
has gained more nuance about “unmaintained” vs “done” status. But for
now, this is one fewer dependency, quite cheaply, and less fuss.
@kpreid kpreid added the dependencies Pull requests that update a dependency file label Mar 11, 2025
@kpreid kpreid merged commit 7d48dd6 into main Mar 11, 2025
11 checks passed
@kpreid kpreid deleted the paste branch March 11, 2025 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant