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

Does not compile with Rust stable channel #24

Closed
KD0BPV opened this issue Dec 5, 2017 · 6 comments
Closed

Does not compile with Rust stable channel #24

KD0BPV opened this issue Dec 5, 2017 · 6 comments

Comments

@KD0BPV
Copy link
Contributor

KD0BPV commented Dec 5, 2017

We should try to avoid using language features that require unstable builds of the tool-chain.

% cargo build
   Compiling state v0.3.2
   Compiling byteorder v1.1.0
   Compiling smallvec v0.4.4
   Compiling percent-encoding v1.0.1
   Compiling utf8-ranges v1.0.0
   Compiling pear_codegen v0.0.10
   Compiling yaml-rust v0.3.5
   Compiling yansi v0.3.4
error[E0554]: #[feature] may not be used on the stable release channel
 --> /home/mark/.cargo/registry/src/github.com-1ecc6299db9ec823/state-0.3.2/src/lib.rs:1:1
  |
1 | #![feature(const_fn)]
  | ^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #[feature] may not be used on the stable release channel
 --> /home/mark/.cargo/registry/src/github.com-1ecc6299db9ec823/state-0.3.2/src/lib.rs:2:1
  |
2 | #![feature(const_unsafe_cell_new)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #[feature] may not be used on the stable release channel
 --> /home/mark/.cargo/registry/src/github.com-1ecc6299db9ec823/state-0.3.2/src/lib.rs:3:1
  |
3 | #![feature(const_atomic_usize_new)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #[feature] may not be used on the stable release channel
 --> /home/mark/.cargo/registry/src/github.com-1ecc6299db9ec823/state-0.3.2/src/lib.rs:4:1
  |
4 | #![feature(const_atomic_bool_new)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error(s)

error: Could not compile `state`.
warning: build failed, waiting for other jobs to finish...
error[E0554]: #[feature] may not be used on the stable release channel
 --> /home/mark/.cargo/registry/src/github.com-1ecc6299db9ec823/yansi-0.3.4/src/lib.rs:1:32
  |
1 | #![cfg_attr(feature="nightly", feature(const_atomic_bool_new))]
  |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error(s)

error: Could not compile `yansi`.
warning: build failed, waiting for other jobs to finish...
error[E0554]: #[feature] may not be used on the stable release channel
 --> /home/mark/.cargo/registry/src/github.com-1ecc6299db9ec823/pear_codegen-0.0.10/src/lib.rs:1:1
  |
1 | #![feature(plugin_registrar, rustc_private, quote)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error(s)

error: Could not compile `pear_codegen`.
warning: build failed, waiting for other jobs to finish...
error: build failed
cargo build  5.21s user 0.27s system 195% cpu 2.804 total
@BanjoFox
Copy link
Collaborator

BanjoFox commented Dec 5, 2017

Wouldn't that include most of Rocket? >.>

@pwoolcoc
Copy link

pwoolcoc commented Dec 5, 2017

Yea, the only unstable feature our application code uses outside of rocket.rs-related stuff is try_from, and that is mostly there as a convenience -- we could easily get rid of that.

Here is the tracking issue from rocket.rs about compiling on stable: rwf2/Rocket#19

@KD0BPV
Copy link
Contributor Author

KD0BPV commented Dec 5, 2017

Does it? Hrm. That's kind of disappointing. Oh well, I'll see if I can get my Gentoo system updated to nightly, then.

@pwoolcoc
Copy link

pwoolcoc commented Dec 5, 2017

It might be good to use the "version file" feature of rustup.rs to pin us to a specific nightly version -- that way, anyone using rustup.rs to managed their installed toolchains will always get the specific nightly version of the toolchain that we know works.

https://github.com/rust-lang-nursery/rustup.rs#the-toolchain-file

@KD0BPV
Copy link
Contributor Author

KD0BPV commented Dec 5, 2017

That sounds like a good plan. Now to just get my system to switch to rustup, while still keeping Firefox installed. I can understand Firefox having Rust as a build dependency, but why do I have to keep it as a run-time dependency? This could get tricky...

@KD0BPV KD0BPV closed this as completed Dec 5, 2017
@BanjoFox
Copy link
Collaborator

BanjoFox commented Dec 5, 2017

@KD0BPV
According to the Rocket documentation you should be able to do directory-specific Rust.

If you prefer, once we setup a project directory in the following section, you can use per-directory overrides to use the nightly version only for your Rocket project by running the following command in the directory:
rustup override set nightly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants