-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Macro hygiene change breaks Firefox builds. #76480
Comments
This also happens on 1.47.0-beta.2 (84b047b 2020-08-28) making it regression-from-stable-to-beta. |
I'm fixing this in Firefox in https://bugzilla.mozilla.org/show_bug.cgi?id=1663677. There's another macro-related regression that I'm trying to reduce and that seems much harder to work around, but I'll file that separately. |
This is intentional - before PR #73084, we were using re-parsed tokens for the call to |
I'm ok with wontfix, as I noted in my report I was surprised that this compiled at all. But it seems odd to see breaking changes like that... |
Chances are that #76482 is the same too (just with a bit of indirection because of syn), not sure. |
@emilio: The breaking changes are unfortunate, but are an unavoidable part of making progress towards fixing #43081. As you noted, the broken code should have never compiled in the first place due to the hygiene rules of Several Crater runs were performed before landing #73084. Unfortunately, Crater cannot test all Rust code - in this case, it looks like |
This prevents us from building with rust beta/nightly. This is technically a Rust regression, see rust-lang/rust#76480, though I think that this should've never worked. Differential Revision: https://phabricator.services.mozilla.com/D89466
…ger,lina This prevents us from building with rust beta/nightly. This is technically a Rust regression, see rust-lang/rust#76480, though I think that this should've never worked. Differential Revision: https://phabricator.services.mozilla.com/D89466
In the past, breaking changes at least caused warnings for a release or two, which allowed us to notice the brekage and fix in advance without breaking developer builds. Anyhow I'm ok with this being wontfix, it's just odd to have such breakage being introduced without notice. |
@Aaron1011 would it be possible to downgrade catch this and emit a warning instead of error (shirt if cherry picking a revert?)? Regardless, this should be in the release notes. Can you make sure this is part of 1.47's public announcement? |
Unfortunately, it's not possible to emit a warning here - see #76482 (comment) PR #73084 is tagged with However, I agree that we can do a better job of notifying crates about this kind of breakage. The next PR to cause this kind of breakage will be #75800, which just finished its Crater run. I have a few thoughts on how to make the transition smoother:
I'm open to any suggestions as to how we can improve this process. Unfortunately, the black-box nature of proc-macros means that the usual future-compatibility lint approach cannot work here. |
@Aaron1011 I'm not sure I agree with that argument. While I agree that technically a proc macro can do whatever and have a gazillion side-effects, the vast majority of macros don't. And if you're at the point where the proc macro has errored, which is the only case in which you'd run it twice, I don't see how running it twice could be worse than failing to build? |
@emilio: People have made assumptions about the behavior of proc-macros in the past (e.g. trying to store things in thread-locals), so I'm worried that re-running proc-macros without an explicit opt-in could just cause a different kind of breakage. Another factor I overlooked is that there are two ways for proc-macros to fail: panicking, and emitting an 'error' It's possible that addressing the simple case of pancicking/ |
This doesn't need prioritization so removing |
This is unambiguously a bugfix and producing transition warnings for this would be more on the "heroic efforts" territory, so I wouldn't personally do this from the cost / benefit point of view. A public announce would be great though. |
This prevents us from building with rust beta/nightly. This is technically a Rust regression, see rust-lang/rust#76480, though I think that this should've never worked. Differential Revision: https://phabricator.services.mozilla.com/D89466 UltraBlame original commit: 6d73f925b6cf8b84d8a36895b67504495e06ae57
…ger,lina This prevents us from building with rust beta/nightly. This is technically a Rust regression, see rust-lang/rust#76480, though I think that this should've never worked. Differential Revision: https://phabricator.services.mozilla.com/D89466 UltraBlame original commit: 0bfeb9c69bfa6e7d9b9fb268d199b6c32add061e
This prevents us from building with rust beta/nightly. This is technically a Rust regression, see rust-lang/rust#76480, though I think that this should've never worked. Differential Revision: https://phabricator.services.mozilla.com/D89466 UltraBlame original commit: 6d73f925b6cf8b84d8a36895b67504495e06ae57
…ger,lina This prevents us from building with rust beta/nightly. This is technically a Rust regression, see rust-lang/rust#76480, though I think that this should've never worked. Differential Revision: https://phabricator.services.mozilla.com/D89466 UltraBlame original commit: 0bfeb9c69bfa6e7d9b9fb268d199b6c32add061e
This prevents us from building with rust beta/nightly. This is technically a Rust regression, see rust-lang/rust#76480, though I think that this should've never worked. Differential Revision: https://phabricator.services.mozilla.com/D89466 UltraBlame original commit: 6d73f925b6cf8b84d8a36895b67504495e06ae57
…ger,lina This prevents us from building with rust beta/nightly. This is technically a Rust regression, see rust-lang/rust#76480, though I think that this should've never worked. Differential Revision: https://phabricator.services.mozilla.com/D89466 UltraBlame original commit: 0bfeb9c69bfa6e7d9b9fb268d199b6c32add061e
…ger,lina, a=jcristau This prevents us from building with rust beta/nightly. This is technically a Rust regression, see rust-lang/rust#76480, though I think that this should've never worked. Differential Revision: https://phabricator.services.mozilla.com/D89466
This prevents us from building with rust beta/nightly. This is technically a Rust regression, see rust-lang/rust#76480, though I think that this should've never worked. Differential Revision: https://phabricator.services.mozilla.com/D89466
…ger,lina This prevents us from building with rust beta/nightly. This is technically a Rust regression, see rust-lang/rust#76480, though I think that this should've never worked. Differential Revision: https://phabricator.services.mozilla.com/D89466
This was shipped in 1.47, and included in release notes (IIRC). I don't think there's anything further here so let's go ahead and close. |
…ger,lina, a=jcristau This prevents us from building with rust beta/nightly. This is technically a Rust regression, see rust-lang/rust#76480, though I think that this should've never worked. Differential Revision: https://phabricator.services.mozilla.com/D89466
* cssparser fails to build with: error[E0425]: cannot find value `MAX_LENGTH` in this scope error[E0425]: cannot find value `MAP` in this scope as shown in: http://errors.yoctoproject.org/Errors/Details/731831/ which leads to rust-lang/rust#76480 https://bugzilla.mozilla.org/show_bug.cgi?id=1663677 * but this still isn't enough to build firefox with current rust 1.71.0 in oe-core I've tried to backport multiple changes like: https://bugzilla.mozilla.org/show_bug.cgi?id=1663715#c5 https://hg.mozilla.org/releases/mozilla-esr78/rev/5db8c1e9f643ec26fc93e7a3fc7a90c742b11030 https://hg.mozilla.org/releases/mozilla-esr78/rev/6445a3a0e81d6aeeaa976be784edf2de9fab84de https://hg.mozilla.org/mozilla-central/rev/e2cede25c027 https://phabricator.services.mozilla.com/D89473 https://hg.mozilla.org/mozilla-central/rev/da77d5528a08 https://phabricator.services.mozilla.com/D83816 * but it's neverending story of more and more fixes and esr68 is just too old and not worth spending more time on it (just to measure build time across different Yocto releases) * still doesn't build http://errors.yoctoproject.org/Errors/Details/731829/ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* cssparser fails to build with: error[E0425]: cannot find value `MAX_LENGTH` in this scope error[E0425]: cannot find value `MAP` in this scope as shown in: http://errors.yoctoproject.org/Errors/Details/731831/ which leads to rust-lang/rust#76480 https://bugzilla.mozilla.org/show_bug.cgi?id=1663677 * but this still isn't enough to build firefox with current rust 1.71.0 in oe-core I've tried to backport multiple changes like: https://bugzilla.mozilla.org/show_bug.cgi?id=1663715#c5 https://hg.mozilla.org/releases/mozilla-esr78/rev/5db8c1e9f643ec26fc93e7a3fc7a90c742b11030 https://hg.mozilla.org/releases/mozilla-esr78/rev/6445a3a0e81d6aeeaa976be784edf2de9fab84de https://hg.mozilla.org/mozilla-central/rev/e2cede25c027 https://phabricator.services.mozilla.com/D89473 https://hg.mozilla.org/mozilla-central/rev/da77d5528a08 https://phabricator.services.mozilla.com/D83816 * but it's neverending story of more and more fixes and esr68 is just too old and not worth spending more time on it (just to measure build time across different Yocto releases) * still doesn't build http://errors.yoctoproject.org/Errors/Details/731829/ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
The following program with
paste = "0.1.12"
compiles on stable (rustc 1.46.0 (04488afe3 2020-08-24)
), but doesn't on Nightly (rustc 1.48.0-nightly (0e2c1281e 2020-09-07)
).This is minimized from Firefox source code, which doesn't build anymore with Rust Nightly.
To be fair, I'm surprised it built in the first place...
The text was updated successfully, but these errors were encountered: