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

The rust plugin ignores the selected rust "channel" when building a project from the IDE #4511

Closed
SvetlinZarev opened this issue Oct 9, 2019 · 0 comments · Fixed by #4397
Assignees
Labels
bug subsystem::IDE Issues related to general IDE functionality (tool windows, actions, etc.)

Comments

@SvetlinZarev
Copy link

SvetlinZarev commented Oct 9, 2019

Environment

  • IntelliJ Rust plugin version:
    0.2.107.2137-192

  • Rust toolchain version:
    rustup 1.19.0 (2af131cf9 2019-09-08)
    stable-x86_64-apple-darwin /default/ (1.38.0 (625451e37 2019-09-23)
    beta-x86_64-apple-darwin 1.39
    nightly-x86_64-apple-darwin 1.40

  • IDE name and version:
    CLion 2019.2.3
    Build #CL-192.6817.18, built on September 24, 2019
    Licensed to Svetlin Zarev
    Subscription is active until December 3, 2019
    Runtime version: 11.0.4+10-b304.69 x86_64
    VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
    macOS 10.14.6
    Non-Bundled Plugins: org.intellij.plugins.markdown, org.toml.lang, org.rust.lang

  • Operating system:
    macOS 10.14.6

Problem description

The "build" button does not respect the selected rust channel and always uses "stable"

Steps to reproduce

  1. Create an empty rust project or open an existing one
  2. Open "Run/Debug configurations" and select beta/nightly channel
  3. Build project

From the console output we can see that the "build" uses the default channel (i.e. stable in my case):

/Users/svetlin/.cargo/bin/cargo build --color=always --all --all-targets

My expectation is to use the selected channel -> i.e. beta/nightly:

/Users/svetlin/.cargo/bin/cargo +beta build --color=always --all --all-targets

For instance the "Run" button works as expected and properly adds "+beta/nightly" depending on the selected channel, but the build button ignores teh selected channel, which results in failing build.

As async/await is in beta, the following piece of code should fail to compile using stable. So select "beta" in the run configuration and click on the "build" button.

Expectation: build passes
Acgual behavior: build fails, because teh wrong rust channel is used

fn main() {
    let future = test();
}

async fn test() -> u32{
    42
}
@mchernyavsky mchernyavsky self-assigned this Oct 9, 2019
@bors bors bot closed this as completed in 39597ce Oct 23, 2019
@Undin Undin added the subsystem::IDE Issues related to general IDE functionality (tool windows, actions, etc.) label Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug subsystem::IDE Issues related to general IDE functionality (tool windows, actions, etc.)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants