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

Drop deprecated proc-macro-hack #22

Merged
merged 2 commits into from
Oct 14, 2023
Merged

Drop deprecated proc-macro-hack #22

merged 2 commits into from
Oct 14, 2023

Conversation

VirxEC
Copy link
Contributor

@VirxEC VirxEC commented Oct 13, 2023

These changes do up the actual MSRV to at least Rust 1.45, but that was released 3 years ago on July 16, 2020 so it shouldn't be an issue. I did a version bump anyway due to the MSRV bump and the updated 2021 edition is more constricting anyway.

From the proc-macro-hack crate:

As of Rust 1.45 this crate is superseded by native support for #[proc_macro] in expression position. Only consider using this crate if you care about supporting compilers between 1.31 and 1.45.

Dropping this crate and using the std #[proc_macro] lets it build on stable Rust by default, without flags. The stable feature is still included due to the flags in the test modules, but has no actual impact on the code - I'm not sure what to do about it, but you can remove the stable feature and everything works if you delete the requirement of the nightly only feature in the tests.

  • Dropped proc-macro-hack
  • Updated to the latest edition, 2021 (not required to compile on stable, could revert)
  • Updated libflate to 2.0 (not required to compile on stable, could revert)
  • Bumped version to 0.3.0 due to MSRV bump

Drop deprecated proc-macro-hack
Update libflate to 2.0
@SOF3 SOF3 merged commit e718682 into SOF3:master Oct 14, 2023
7 checks passed
pub use include_flate_codegen::deflate_file;

#[cfg_attr(feature = "stable", proc_macro_hack::proc_macro_hack)]
pub use include_flate_codegen::deflate_utf8_file;
Copy link
Owner

Choose a reason for hiding this comment

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

Could we just as well delete this reexport crate directly?

Copy link
Contributor Author

@VirxEC VirxEC Oct 14, 2023

Choose a reason for hiding this comment

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

Honestly, I'm not sure but I would guess so. Would just have to try it.

(The original comment was made too quickly, I didn't read it and thought this was about something else)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#23

@VirxEC VirxEC deleted the no-hack branch October 14, 2023 18:10
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.

2 participants