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

Unsupport #[derive(Trait)] sugar for #[derive_Trait] legacy plugin attributes #54271

Merged
merged 1 commit into from
Dec 7, 2018

Conversation

petrochenkov
Copy link
Contributor

@petrochenkov petrochenkov commented Sep 16, 2018

This is a long deprecated unstable feature that doesn't mesh well with regular resolution/expansion.

How to fix broken code:

  • The recommended way is to migrate to stable procedural macros - derives or attributes (https://doc.rust-lang.org/nightly/book/first-edition/procedural-macros.html).
  • If you are using rocket 0.3.* in particular, the recommended solution is to migrate to rocket 0.4.*.
  • If that's not possible right now for some reason, you can keep code working with a simple mechanical replacement #[derive(Legacy)] -> #[derive_Legacy].

Closes #29644

r? @ghost

@petrochenkov
Copy link
Contributor Author

r? @alexcrichton

@bors
Copy link
Contributor

bors commented Sep 16, 2018

☔ The latest upstream changes (presumably #53461) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 16, 2018
@petrochenkov petrochenkov added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 17, 2018
@petrochenkov
Copy link
Contributor Author

petrochenkov commented Sep 17, 2018

cc @SergioBenitez who reported about the feature still being used in Rocker in July.

That said, #[derive(Legacy)] -> #[derive_Legacy] is not a huge regression in usability (at least for nightly), even if the feature is still used.

@SergioBenitez
Copy link
Contributor

We've migrated all of Rocket's derives to procedural macros. That being said, that migration is not yet part of an official release, so this would be a breaking change for almost all of Rocket's users.

If it's possible to delay this PR until Rocket sees a new release, which should happen in a matter of weeks as there is only a single blocking feature remaining, that would be much appreciated.

@petrochenkov
Copy link
Contributor Author

@SergioBenitez
Yeah, I think this can wait for a few weeks.
Is there any issue that I can subscribe to for tracking Rocket's release status?

@SergioBenitez
Copy link
Contributor

@petrochenkov The 0.4 milestone tracks the missing features. Converting all of Rocket's code generation to proc-macros is tracked in rwf2/Rocket#693.

@petrochenkov petrochenkov added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 18, 2018
@petrochenkov petrochenkov mentioned this pull request Oct 17, 2018
@Centril
Copy link
Contributor

Centril commented Nov 10, 2018

@SergioBenitez what's the status now?

@SergioBenitez
Copy link
Contributor

@Centril We are no longer using this in Rocket as of the the 0.4 release candidate. The GA of 0.4 has not yet been released; that should happen on the 14th. Ideally this wouldn't be merged until some time after the GA is available to give users a chance to migrate.

@nagisa
Copy link
Member

nagisa commented Dec 2, 2018

Rocket 0.4 is still not GA (is currently on -rc2, which has been published yesterday).

@petrochenkov
Copy link
Contributor Author

Yay.
@bors r=eddyb,alexcrichton

@bors
Copy link
Contributor

bors commented Dec 7, 2018

📌 Commit 8ab115c has been approved by eddyb,alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Dec 7, 2018
@bors
Copy link
Contributor

bors commented Dec 7, 2018

⌛ Testing commit 8ab115c with merge a2fb99b...

bors added a commit that referenced this pull request Dec 7, 2018
Unsupport `#[derive(Trait)]` sugar for `#[derive_Trait]` legacy plugin attributes

This is a long deprecated unstable feature that doesn't mesh well with regular resolution/expansion.

How to fix broken code:
- The recommended way is to migrate to stable procedural macros - derives or attributes (https://doc.rust-lang.org/nightly/book/first-edition/procedural-macros.html).
- If that's not possible right now for some reason, you can keep code working with a simple mechanical replacement `#[derive(Legacy)]` -> `#[derive_Legacy]`.

Closes #29644

r? @ghost
@bors
Copy link
Contributor

bors commented Dec 7, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: eddyb,alexcrichton
Pushing a2fb99b to master...

@bors bors merged commit 8ab115c into rust-lang:master Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tracking issue for custom_derive feature
7 participants