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

error: no such command +nightly #54

Open
paulyoung opened this issue Oct 16, 2023 · 3 comments
Open

error: no such command +nightly #54

paulyoung opened this issue Oct 16, 2023 · 3 comments

Comments

@paulyoung
Copy link

When providing the --device flag, +nightly is added to cargo build:

crank/src/main.rs

Lines 611 to 615 in f46cda4

let mut args = if self.device {
vec!["+nightly", "build"]
} else {
vec!["build"]
};

and I run into the following error:

 INFO  crank > build command: RUSTFLAGS="-Ctarget-cpu=cortex-m7 -Clink-args=--emit-relocs -Crelocation-model=pic -Cpanic=abort" "cargo" "+nightly" "build" "--lib" "--target" "thumbv7em-none-eabihf" "-Zbuild-std=core,alloc" "-Zbuild-std-features=panic_immediate_abort"
error: no such command: `+nightly`

	Cargo does not handle `+toolchain` directives.
	Did you mean to invoke `cargo` through `rustup` instead?
Error: cargo failed with error ExitStatus(unix_wait_status(25856))

I've been using a local copy of crank that removes +nightly and everything seems to work fine.

What's the motivation for adding +nightly when the --device flag is provided?

@boozook
Copy link
Member

boozook commented Apr 15, 2024

Nightly toolchain is needed to build core and alloc libs.

@paulyoung
Copy link
Author

@boozook i don’t disagree, but as the error message above demonstrates, adding +nightly only works for a specific workflow.

I ended up using a fork of crank because of this.

@boozook
Copy link
Member

boozook commented Apr 16, 2024

adding +nightly only works for a specific workflow.

Not only. If you have rustup, you could just add rust-toolchain toml with channel=nightly to the root of your project. Example.

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

2 participants