illicitonion / num_enum

Apache License 2.0
264 stars 34 forks source link

Upgrade to `proc-macro-crate 2` #133

Closed MarijnS95 closed 1 year ago

MarijnS95 commented 1 year ago

Hey! I'm currently going through a dependency chain to resolve some duplicates of toml and the toml_edit crates, and one of which is solved by proc-macro-crate 2 bumping these dependencies:

https://github.com/bkchr/proc-macro-crate/commit/39a7c1844fc4d73ef397a7e8d9419f1f3381aa44

How easy/trivial (and MSRV-compliant) would it be for num_enum_derive to bump to this crate release? It looks like metadata_checks depends on an older cargo_toml as well which has the toml dependency.

MarijnS95 commented 1 year ago

Looks like the MSRV is problematic:

https://github.com/MarijnS95/num_enum/actions/runs/6468866192/job/17561760006#step:5:18

Changes:

https://github.com/illicitonion/num_enum/compare/main...MarijnS95:num_enum:main

illicitonion commented 1 year ago

Hello! Very reasonable request! As you've noted, this is currently pretty hard for MSRV reasons, and jumping forwards 14 months would be a pretty large jump...

One thing worth mentioning is that proc-macro-crate is an optional dep, and it's only useful at all if you've renamed num_enum in your dep tree (which is very unusual to do). Would just disabling the optional dep help your situation?

MarijnS95 commented 1 year ago

Unfortunately optional deps will show up as part of Cargo.lock and will afaik get picked up by cargo-deny, even if they're not (always) active :/

At least good to know that it doesn't get compiled/used by default.

illicitonion commented 1 year ago

This was hopefully fixed in https://github.com/illicitonion/num_enum/pull/134 which was released in 0.7.1