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

Regression building proc-macro2 1.0.59 with nightly-2023-06-28 #113152

Closed
davidv1992 opened this issue Jun 29, 2023 · 5 comments
Closed

Regression building proc-macro2 1.0.59 with nightly-2023-06-28 #113152

davidv1992 opened this issue Jun 29, 2023 · 5 comments
Labels
C-discussion Category: Discussion or questions that doesn't represent real issues.

Comments

@davidv1992
Copy link
Contributor

davidv1992 commented Jun 29, 2023

How to fix it:

update proc-macro2 to the latest version.

proc_macro2 1.0.59 Fails to build with nightly-2023-06-28 but succeeds building on nightly-2023-06-27

Code

Create a new binary project with cargo new --bin buildtest

add dependency on proc_macro2 with proc_macro feature:

[dependencies]
proc-macro2 = { version = "=1.0.59", features=["default", "proc-macro"] }

Try building binary with cargo build, it will not work and fail with the following error:

error[E0635]: unknown feature `proc_macro_span_shrink`
  --> /home/david/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.59/src/lib.rs:92:30
   |
92 |     feature(proc_macro_span, proc_macro_span_shrink)
   |                              ^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0635`.
error: could not compile `proc-macro2` (lib) due to previous error

Version it worked on

It most recently worked on: nightly-2023-06-27

Version with regression

rustc --version --verbose:

rustc 1.72.0-nightly (5bd28f5ea 2023-06-28)
binary: rustc
commit-hash: 5bd28f5eac1ba3569bfa8d49ec3f5acbdfdff7a0
commit-date: 2023-06-28
host: x86_64-unknown-linux-gnu
release: 1.72.0-nightly
LLVM version: 16.0.5

@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged

@davidv1992 davidv1992 added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels Jun 29, 2023
@rustbot rustbot added I-prioritize Issue: Indicates that prioritization has been requested for this issue. regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. and removed regression-untriaged Untriaged performance or correctness regression. labels Jun 29, 2023
@Noratrieb
Copy link
Member

#111571 changed the feature gate. proc-macro2 is enabling the nightly feature that doesn't exist anymore. This is an issue with the proc-macro2 crate (cc @dtolnay).

I'm going to leave this issue open for now so that other people can see it.

@Noratrieb Noratrieb added C-discussion Category: Discussion or questions that doesn't represent real issues. and removed regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. C-bug Category: This is a bug. I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Jun 29, 2023
@Noratrieb Noratrieb pinned this issue Jun 29, 2023
@Nemo157
Copy link
Member

Nemo157 commented Jun 29, 2023

It is fixed in proc-macro2 1.0.60+ dtolnay/proc-macro2#391

@davidv1992
Copy link
Contributor Author

Good to know it is intended breakage, will upgrade then.

@dtolnay dtolnay closed this as completed Jun 29, 2023
asomers-ax added a commit to Axcient/freebsd-nfs-exporter that referenced this issue Jun 29, 2023
chris13524 added a commit to WalletConnect/gilgamesh that referenced this issue Jun 29, 2023
chris13524 added a commit to WalletConnect/gilgamesh that referenced this issue Jun 29, 2023
henrikhorluck added a commit to henrikhorluck/fish-shell that referenced this issue Jun 30, 2023
Rust nightly changed the name of a preview feature, which broke proc-macro2,
see rust-lang/rust#113152
mqudsi pushed a commit to fish-shell/fish-shell that referenced this issue Jun 30, 2023
Rust nightly changed the name of a preview feature, which broke proc-macro2,
see rust-lang/rust#113152
asomers added a commit to asomers/mockall that referenced this issue Jun 30, 2023
sebastiencs added a commit to openmina/openmina that referenced this issue Oct 13, 2023
sebastiencs added a commit to openmina/openmina that referenced this issue Oct 13, 2023
woshilapin added a commit to woshilapin/kmon that referenced this issue Oct 24, 2023
Also updating `proc-macro2` because of rust-lang/rust#113152
makes the build fail on nightly.
orhun pushed a commit to orhun/kmon that referenced this issue Oct 27, 2023
Also updating `proc-macro2` because of rust-lang/rust#113152
makes the build fail on nightly.
0xLyte added a commit to Impalabs/hyperpom that referenced this issue Nov 23, 2023
nya3jp pushed a commit to nya3jp/cros-bazel that referenced this issue Nov 29, 2023
Fixes rust-lang/rust#113152
for nightly cargo in alchemist.
By including dtolnay/proc-macro2#391.

BUG=None
TEST=portage/tools/run_tests.sh

Change-Id: I948123131596f2063f538274173ff1027dc573aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/bazel/+/5064256
Reviewed-by: Matt Stark <msta@google.com>
Commit-Queue: Li-Yu Yu <aaronyu@google.com>
Tested-by: Li-Yu Yu <aaronyu@google.com>
hikalium added a commit to hikalium/sr5900p that referenced this issue Dec 19, 2023
rksm added a commit to rksm/rusty-celery that referenced this issue Dec 26, 2023
The CI failure of `check-minimal-versions` is caused by this:
- dtolnay/proc-macro2#356
- rust-lang/rust#113152

Not having thiserror pinned at 1.0.2 allow the proc-macro2 crate to be updated to the recent version which fixes this.
rksm added a commit to rksm/rusty-celery that referenced this issue Dec 26, 2023
The CI failure of `check-minimal-versions` is caused by this:
- dtolnay/proc-macro2#356
- rust-lang/rust#113152

Not having thiserror pinned at 1.0.2 allow the proc-macro2 crate to be updated to the recent version which fixes this.
epwalsh pushed a commit to rusty-celery/rusty-celery that referenced this issue Jan 7, 2024
…s broker (#371)

* fix sending a message from a rust client to a python worker with redis broker

This adds a delivery info to messages. It basically does the same as
https://github.com/rusty-celery/rusty-celery/pull/253/files but allows for the
broker to customize the delivery info to modify the exchange / routing key wich
can be used from the amqp broker (though this PR does no surface an interface to
it).

In particluar, this fixes the issue of sending a message from a rust client to a
python worker. Without this fix this fails with:

Unrecoverable error: KeyError('exchange')

as kombu/transport/redis.py tries to access the exchange and routing key from
the delivery info.

* fix CI failure

The CI failure of `check-minimal-versions` is caused by this:
- dtolnay/proc-macro2#356
- rust-lang/rust#113152

Not having thiserror pinned at 1.0.2 allow the proc-macro2 crate to be updated to the recent version which fixes this.
wineway added a commit to wineway/fennel-language-server that referenced this issue Feb 2, 2024
        rust-lang/rust/issues/113152

        error[E0635]: unknown feature `proc_macro_span_shrink`
          --> ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.51/src/lib.rs:92:30
           |
        92 |     feature(proc_macro_span, proc_macro_span_shrink)
           |                              ^^^^^^^^^^^^^^^^^^^^^^

Signed-off-by: wineway <wangyuweihx@gmail.com>
GoldenPath1109 added a commit to GoldenPath1109/comprehesive-rust that referenced this issue Sep 2, 2024
…… (#1160)

…llers/examples

The proc-macro2 dependency at 1.0.50 results in a build error mentioning
an unknown feature `proc_macro_span_shrink` that no longer exists in
nightly. Per rust-lang/rust#113152, updating
proc-macro2 to the latest version fixes the error.

The build error I saw before updating the proc-macro2 dependency was the
following:

```
> cargo build --bin minimal
   Compiling proc-macro2 v1.0.50
   Compiling bare-metal v0.2.5
   Compiling typenum v1.16.0
   Compiling nrf52833-hal v0.14.1
error[E0635]: unknown feature `proc_macro_span_shrink`
  --> /home/chcl/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.50/src/lib.rs:92:30
   |
92 |     feature(proc_macro_span, proc_macro_span_shrink)
   |                              ^^^^^^^^^^^^^^^^^^^^^^

   Compiling cortex-m v0.7.7
For more information about this error, try `rustc --explain E0635`.
error: could not compile `proc-macro2` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-discussion Category: Discussion or questions that doesn't represent real issues.
Projects
None yet
Development

No branches or pull requests

7 participants