Skip to content

Support either proc-macro or proc_macro keys #1604

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

Merged
merged 1 commit into from
Jan 16, 2022

Conversation

Nemo157
Copy link
Member

@Nemo157 Nemo157 commented Jan 16, 2022

Fix for the issue in #1602

I'll try to get a list of crates that need rebuilding.

@Nemo157 Nemo157 requested a review from syphar January 16, 2022 16:32
@Nemo157
Copy link
Member Author

Nemo157 commented Jan 16, 2022

I won't be able to grab the list just now, it requires checking all crates published since 2021-11-27, which is before the latest index squash, and probably >30k to download and check 😰. I might get around to it later, otherwise for now we know of derivenum and ts2rs that will need rebuilds and can handle others as they get reported.

@syphar
Copy link
Member

syphar commented Jan 16, 2022

otherwise for now we know of derivenum and ts2rs that will need rebuilds and can handle others as they get reported.

IMO that's good enough.

@j4ger
Copy link

j4ger commented Jan 16, 2022

Ah I just reworked Cargo.toml and republished so I guess no need for a rebuild for ts2rs but thanks for your work anyways :D

@syphar syphar added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Jan 16, 2022
let metadata = Metadata::from_str(manifest).unwrap();
assert!(metadata.proc_macro);

// Cargo prioritizes `proc-macro` over `proc_macro` in local testing
Copy link
Member

Choose a reason for hiding this comment

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

That seems like an upstream bug, it should probably give a hard error if they conflict ... but shouldn't affect what docs.rs does.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep, but there could be existing crates published with it so I wanted to make sure we matched the behavior.

Copy link
Member Author

Choose a reason for hiding this comment

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

And by mentioning it on discord I managed to persuade someone to file an issue 😀 rust-lang/cargo#10299

Copy link
Member

Choose a reason for hiding this comment

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

It sounds like this would only warn when you use both at the same time,
so supporting either key IMO still the right thing to do on docs.rs

@syphar syphar added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Jan 16, 2022
@syphar syphar merged commit 1bff554 into rust-lang:master Jan 16, 2022
@Nemo157 Nemo157 deleted the proc_macro-or-proc-macro branch January 16, 2022 18:35
@syphar syphar removed the S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it label Jan 17, 2022
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.

4 participants