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

MACRO: disable name resolution for include with env("OUT_DIR") by default #4573

Merged
merged 1 commit into from
Oct 29, 2019

Conversation

Undin
Copy link
Member

@Undin Undin commented Oct 28, 2019

Recently supported name resolution for included files uses cargo build --build-plan to fetch value of OUT_DIR environment variable (see #4542).
Found out that cargo build --build-plan forces next build command to recompile whole project (including dependencies).
See rust-lang/cargo#5579 (comment).
At this moment it is part of refresh, i.e. it is invoked on each Cargo.toml change, project reopening, etc. So this command is invoked quite frequently.
It can be rather unexpected for large project to make full compilation after each project reopening

So we decided to disable it by default until it will be fixed from cargo side or we'll find a better way to get OUT_DIR value. To turn it on just enable org.rust.cargo.fetch.out.dir option in Experimental Features dialog

@Undin Undin added this to the v109 milestone Oct 28, 2019
@Undin Undin changed the title MACRO: disable build plan fetching by default MACRO: disable name resolution for include with env("OUT_DIR") by default Oct 29, 2019
…ault

Recently supported name resolution for included files uses `cargo build --build-plan` to fetch value of `OUT_DIR` environment variable (see #4542).
Found out that `cargo build --build-plan` force next `build` command to recompile whole project (including dependencies).
See rust-lang/cargo#5579 (comment).
At this moment it is part of refresh, i.e. it is invoked on each `Cargo.toml` change, project reopening, etc. So this command is invoked quite frequently.
It can be rather unexpected for large project to make full compilation after each project reopening

So we decided to disable it by default until it will be fixed from cargo side or we'll find better way to get `OUT_DIR` value
@Undin Undin force-pushed the undin/disable-out-dir-support branch from dbc228f to 92b0554 Compare October 29, 2019 06:11
@Undin
Copy link
Member Author

Undin commented Oct 29, 2019

bors r+

bors bot added a commit that referenced this pull request Oct 29, 2019
4573: MACRO: disable name resolution for include with env("OUT_DIR") by default r=Undin a=Undin

Recently supported name resolution for included files uses `cargo build --build-plan` to fetch value of `OUT_DIR` environment variable (see #4542).
Found out that `cargo build --build-plan` force next `build` command to recompile whole project (including dependencies).
See rust-lang/cargo#5579 (comment).
At this moment it is part of refresh, i.e. it is invoked on each `Cargo.toml` change, project reopening, etc. So this command is invoked quite frequently.
It can be rather unexpected for large project to make full compilation after each project reopening

So we decided to disable it by default until it will be fixed from cargo side or we'll find better way to get `OUT_DIR` value


Co-authored-by: Arseniy Pendryak <a.pendryak@yandex.ru>
@bors
Copy link
Contributor

bors bot commented Oct 29, 2019

@bors bors bot merged commit 92b0554 into master Oct 29, 2019
@bors bors bot deleted the undin/disable-out-dir-support branch October 29, 2019 07:06
@onelson
Copy link

onelson commented Jan 20, 2020

For anyone wondering about how to access the experimental features dialog, it's briefly mentioned here:

https://www.jetbrains.com/clion/features/run-and-debug.html

It's accessed via the maintenance dialog which is summoned with ctrl+alt+shift+/

@Undin
Copy link
Member Author

Undin commented Jan 21, 2020

Also, you can find almost any IDE action, setting, etc. including Experimental Features dialog via Help | Find Action (Ctrl+Shift+A) action

@panstromek
Copy link
Contributor

panstromek commented Jan 22, 2020

Or shift, shift to look for even more ;)

@elrob
Copy link

elrob commented Oct 14, 2022

You need to tick org.rust.cargo.evaluate.build.scripts in newer versions of the plugin

Nercury/rust-and-opengl-lessons#11 (comment)

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.

4 participants