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

Remove rust toolchain channel check #848

Merged
merged 2 commits into from
Dec 5, 2022
Merged

Remove rust toolchain channel check #848

merged 2 commits into from
Dec 5, 2022

Conversation

ascjones
Copy link
Collaborator

@ascjones ascjones commented Dec 2, 2022

@HCastano reported the following error when using cargo +nighlty test for E2E tests using the new contract-build library. First of all the error is misleading and is an occurrence of #746.

The issue is that the +nightly gets inherited and the assert_channel check fails. This PR removes this check entirely and allows the underlying cargo build command to inherit whatever toolchain the user needs. It still does add RUSTC_BOOTSTRAP in case we are building with stable.

This should now be more in line with cargo philosophy and give more flexibility to contract authors with their toolchain management.

See also #698 where stable toolchain was first introduced.

@@ -101,9 +75,6 @@ where
cmd.current_dir(path);
}

// Allow nightly features on a stable toolchain
cmd.env("RUSTC_BOOTSTRAP", "1");
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only required when doing cargo build so have moved it to exec_cargo_for_wasm_target.

let meta = rustc_version::version_meta()?;
let min_version = Version::new(1, 63, 0);
match meta.channel {
Channel::Stable if meta.semver >= min_version => Ok(()),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This min version check can be replaced by adding rust_version to the ink crate, might be a more suitable location for it?

Copy link
Contributor

@HCastano HCastano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool 👍

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

Successfully merging this pull request may close these issues.

2 participants