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

Repeat build/error messages when (Ctrl + F9) #3843

Closed
ava57r opened this issue May 15, 2019 · 4 comments · Fixed by #3926
Closed

Repeat build/error messages when (Ctrl + F9) #3843

ava57r opened this issue May 15, 2019 · 4 comments · Fixed by #3926
Assignees
Labels
improvement subsystem::tools Issues about integration with external tools like rustup, cargo, rustfmt, etc.

Comments

@ava57r
Copy link

ava57r commented May 15, 2019

Environment

  • Intellij-Rust plugin version: v0.2.97.2123-191
  • Rust toolchain version: 1.34.1
  • IDE name and version: IntelliJ IDEA 2019.1.2 (Community Edition)
  • Operating system: Linux

Problem description

Error messages are repeated when you run an building project by using Ctrl+ F9.

Steps to reproduce

Output build console:

error[E0412]: cannot find type `Node` in this scope
  --> src/lib.rs:10:24
   |
10 |     fn root(&self) -> &Node;
   |                        ^^^^ not found in this scope

error[E0412]: cannot find type `Node` in this scope
  --> src/lib.rs:38:24
   |
38 |     fn root(&self) -> &Node {
   |                        ^^^^ not found in this scope

warning: unused import: `core::borrow::BorrowMut`
 --> src/lib.rs:1:5
  |
1 | use core::borrow::BorrowMut;
  |     ^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(unused_imports)] on by default

error[E0412]: cannot find type `Node` in this scope
  --> src/lib.rs:10:24
   |
10 |     fn root(&self) -> &Node;
   |                        ^^^^ not found in this scope

error[E0412]: cannot find type `Node` in this scope
  --> src/lib.rs:38:24
   |
38 |     fn root(&self) -> &Node {
   |                        ^^^^ not found in this scope

warning: unused import: `core::borrow::BorrowMut`
 --> src/lib.rs:1:5
  |
1 | use core::borrow::BorrowMut;
  |     ^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(unused_imports)] on by default

error: aborting due to 2 previous errors
@ava57r ava57r changed the title Repeat build/error messages when (Ctrl-F9) Repeat build/error messages when (Ctrl + F9) May 30, 2019
@mchernyavsky
Copy link
Member

mchernyavsky commented Jul 3, 2019

When you build your project Rust project via Ctrl-F9 IDEA runs cargo build --all --all-targets command. Cargo may duplicate some error messages when --all-targets attribute is used. You can prevent the use of --all-targets option (Preferences > Languages & Frameworks > Rust > Cargo > Compile all project targets if possible).

I filter out repeated errors/warnings in this PR. The command's original output is shown in a separate window.

@mchernyavsky mchernyavsky added improvement subsystem::tools Issues about integration with external tools like rustup, cargo, rustfmt, etc. labels Jul 3, 2019
@mchernyavsky mchernyavsky self-assigned this Jul 3, 2019
bors bot added a commit that referenced this issue Aug 12, 2019
3926: RUN: Support build tool window r=ortem a=mchernyavsky

Closes #2638. Fixes #3777. Fixes #3843.

![toolwindow](https://user-images.githubusercontent.com/6079006/60440179-efefd380-9c1c-11e9-9ea3-4c319552694c.gif)

Overview:
- TODO

rust-lang/cargo#6994

Co-authored-by: mchernyavsky <mikhail.chernyavsky@jetbrains.com>
Co-authored-by: Mikhail Chernyavsky <mikhail.chernyavsky@jetbrains.com>
@bors bors bot closed this as completed in #3926 Aug 12, 2019
@JakkuSakura
Copy link

When you build your project Rust project via Ctrl-F9 IDEA runs cargo build --all --all-targets command. Cargo may duplicate some error messages when --all-targets attribute is used. You can prevent the use of --all-targets option (Preferences > Languages & Frameworks > Rust > Cargo > Compile all project targets if possible).

I filter out repeated errors/warnings in this PR. The command's original output is shown in a separate window.

I fixed the problem by your means, but I still can see repeated warnings with --all-targets until now

@mchernyavsky
Copy link
Member

Currently, the new build tool window (#3926) is experimental. You can enable it by setting cargo.build.tool.window.enabled variable to false (see Actions > Registry...). It should fix your problem.

@ratijas
Copy link

ratijas commented Sep 24, 2020

Good to know about "Compile all project targets if possible" checkbox. Thanks. The problem still persist on default fresh install today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement subsystem::tools Issues about integration with external tools like rustup, cargo, rustfmt, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants