Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upMacro expansion bypasses #[derive_*] stability checks. #32655
Comments
eddyb
added
I-nominated
T-compiler
labels
Mar 31, 2016
mrmonday
referenced this issue
Mar 31, 2016
Closed
Proposal to make libpnet compliant with RFC #1445 #176
eddyb
changed the title
include! bypasses #[derive_*] stability checks.
Macro expansion bypasses #[derive_*] stability checks.
Mar 31, 2016
This comment has been minimized.
This comment has been minimized.
|
cc #29644 |
This comment has been minimized.
This comment has been minimized.
|
there are different possible outcomes for what we do here, depending on how hard it is to come up with a fix (@eddyb may already have one in the works), and what the impact of such a fix is according to crater. |
This comment has been minimized.
This comment has been minimized.
|
(assigning P-high to reflect the priority of deciding what to do.) |
pnkfelix
added
P-high
and removed
I-nominated
labels
Mar 31, 2016
pnkfelix
assigned
eddyb
Mar 31, 2016
eddyb
referenced this issue
Apr 1, 2016
Closed
Feature-gate #[derive_*] even when produced by macro expansion. #32671
This comment has been minimized.
This comment has been minimized.
|
Attempt at a fix and crater results can be found at #32671. In IRC @durka and I looked at the crates that depend on And that doesn't count anyone who has a Some food for thought: @nrc's macro plans could eventually allow for It's not the worst that could happen, and I haven't seen specific plans for making Note that you can't use That said, I leave this to @rust-lang/lang to decide. Do we just upload a new version of serde and/or do we ungate |
eddyb
added
T-lang
I-needs-decision
labels
Apr 3, 2016
This comment has been minimized.
This comment has been minimized.
|
Chiming in, as primary
Please contact me whenever about this - I believe Dropbox is using some subset of I suspect there's a nice way to deal with this (at least in terms of |
This comment has been minimized.
This comment has been minimized.
|
@mrmonday You could have pinned just the minor version, not the patch, i.e. |
This comment has been minimized.
This comment has been minimized.
|
Since the fix for this likely breaks syntex, cc #31645. Please don't merge the fix without letting me know first. |
Manishearth
referenced this issue
Apr 3, 2016
Merged
[breaking-batch] Simplify ast::StructField #32682
This comment has been minimized.
This comment has been minimized.
|
I'm just on my way out, but as long as we can fix syntex first, I think it'd be fine to make this change in the compiler. The syntex consumers are pretty familiar with breaking changes in order to track stable and nightly plugin support, so doing a version bump to avoid this error wouldn't be that bad. How about we fix this in syntex, do a serde version bump for both v6 and v7, then see how things look in crater? |
This comment has been minimized.
This comment has been minimized.
|
@erickt One way that would work pretty well IMO is to replace all |
erickt
added a commit
to erickt/syntex
that referenced
this issue
Apr 4, 2016
erickt
referenced this issue
Apr 4, 2016
Merged
feat(syntex): Squash `#[derive_X]#[derive_Y]` into `#[derive(X,Y)]` #39
erickt
added a commit
to erickt/syntex
that referenced
this issue
Apr 4, 2016
erickt
added a commit
to serde-deprecated/syntex
that referenced
this issue
Apr 4, 2016
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I actually don't see any crates pinned to 0.29.0 or 0.30.0, did I miss some? I see a bunch of |
This comment has been minimized.
This comment has been minimized.
|
@durka: Not sure. I just saw that there were still some downloads for |
This comment has been minimized.
This comment has been minimized.
|
Let's keep trying to land the fix, it sounds like it should be possible. I really don't want to stabilise |
LeoTestard
added a commit
to LeoTestard/rust
that referenced
this issue
Apr 7, 2016
LeoTestard
added a commit
to LeoTestard/rust
that referenced
this issue
Apr 7, 2016
LeoTestard
added a commit
to LeoTestard/rust
that referenced
this issue
Apr 7, 2016
LeoTestard
added a commit
to LeoTestard/rust
that referenced
this issue
Apr 7, 2016
LeoTestard
added a commit
to LeoTestard/rust
that referenced
this issue
Apr 9, 2016
LeoTestard
added a commit
to LeoTestard/rust
that referenced
this issue
Apr 9, 2016
LeoTestard
added a commit
to LeoTestard/rust
that referenced
this issue
Apr 9, 2016
LeoTestard
added a commit
to LeoTestard/rust
that referenced
this issue
Apr 9, 2016
LeoTestard
added a commit
to LeoTestard/rust
that referenced
this issue
Apr 9, 2016
LeoTestard
added a commit
to LeoTestard/rust
that referenced
this issue
Apr 9, 2016
LeoTestard
added a commit
to LeoTestard/rust
that referenced
this issue
Apr 9, 2016
LeoTestard
added a commit
to LeoTestard/rust
that referenced
this issue
Apr 9, 2016
LeoTestard
added a commit
to LeoTestard/rust
that referenced
this issue
Apr 9, 2016
This comment has been minimized.
This comment has been minimized.
|
I've changed libpnet to depend on |
eddyb commentedMar 31, 2016
One can use macro expansion to bypass all early attribute checks, directly:
Or by using the built-in
include!macro.Found while investigating
libpnetbreakage.This affects any use of
#[derive(...)]insyntex, as virtually everyone usesinclude!.Even though I don't like stabilizing this, there may be too many cases in the wild.