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

crossbeam-channel v0.3.9 fails to compile #435

Closed
RalfJung opened this issue Oct 18, 2019 · 6 comments
Closed

crossbeam-channel v0.3.9 fails to compile #435

RalfJung opened this issue Oct 18, 2019 · 6 comments

Comments

@RalfJung
Copy link
Contributor

After bumping the rustc-ap-* crates in rustfmt, I get

error[E0432]: unresolved import `crossbeam_utils::atomic`
 --> /home/r/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/crossbeam-channel-0.3.9/src/flavors/tick.rs:8:22
  |
8 | use crossbeam_utils::atomic::AtomicCell;
  |                      ^^^^^^ could not find `atomic` in `crossbeam_utils`

The dependency tree looks as follows:

crossbeam-channel v0.3.9
└── crossbeam-utils v0.6.6
    ├── cfg-if v0.1.10
    └── lazy_static v1.4.0
@RalfJung
Copy link
Contributor Author

I was able to fix the build with

cargo update -p crossbeam-utils --precise 0.6.5

@RalfJung
Copy link
Contributor Author

Actually turns out that even without bumping anything, rustfmt master with its current lockfile just doesn't build here...?

$ rustc --version
rustc 1.40.0-nightly (237d54ff6 2019-10-15)

@RalfJung
Copy link
Contributor Author

rust-lang/rust#65424 explains what is going on: the crate was relying on a nightly feature that got changed.

@mati865
Copy link

mati865 commented Oct 20, 2019

Duplicate of #434, fixed by 5b5d727 but there is no new release yet.

@kurtlawrence
Copy link

kurtlawrence commented Oct 30, 2019

Is there an eta on a new release? I am a bit hamstrung at the moment.

bors bot added a commit that referenced this issue Nov 6, 2019
444: Prepare for the next release r=jeehoonkang a=taiki-e

This updates version numbers and changelogs.

- crossbeam 0.7.3
- crossbeam-channel 0.4.0
- crossbeam-deque 0.7.2
- crossbeam-epoch 0.8.0
- crossbeam-queue 0.2.0
- crossbeam-utils 0.7.0

cc #435 
cc #443 
cc #446

Co-authored-by: Taiki Endo <te316e89@gmail.com>
@ghost
Copy link

ghost commented Nov 6, 2019

New version has been published now :)

@ghost ghost closed this as completed Nov 6, 2019
bors bot added a commit that referenced this issue May 29, 2021
698: Remove uses of unstable feature(cfg_target_has_atomic) r=taiki-e a=taiki-e

Some no-std targets (e.g., ARMv6-M) do not support atomic CAS operations and cannot use Arc, etc.

Currently, we are using an unstable feature to detect them, but it has caused breakage in the past (#435).
Also, users of stable Rust are not able to compile crossbeam on those targets.

Instead of depending on unstable features of the compiler, this patch detects those targets using the TARGET environment variables provided by cargo for the build script, and a list of targets that do not support atomic CAS operations.

This way is the same as the way we recently adopted in [futures](rust-lang/futures-rs#2400) and [valuable](tokio-rs/valuable#12), and was originally inspired by the way [heapless](rust-embedded/heapless@44c66a7) and [defmt](https://github.com/knurling-rs/defmt/blob/963152f0fc530fca64ba4ff1492d9c4b7bf76062/build.rs#L42-L51) do, but this doesn't maintain the target list manually. (It's not really fully automated, but [it's very easy to update](https://github.com/crossbeam-rs/crossbeam/blob/a42dbed87a5739228b576f526b1e2fd80260a29b/.github/workflows/ci.yml#L89).)

Also, this completely removes the dependency on unstable features from crates other than crossbeam-epoch.

refs: rust-lang/rust#51953, rust-lang/futures-rs#2400, tokio-rs/valuable#12

704: Add AtomicCell::fetch_update r=taiki-e a=taiki-e

Equivalent of [`std::sync::atomic::AtomicN::fetch_update`](https://doc.rust-lang.org/nightly/core/sync/atomic/struct.AtomicUsize.html#method.fetch_update) that stabilized in Rust 1.45.



Co-authored-by: Taiki Endo <te316e89@gmail.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants