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

Inform user to build dependencies/project to create sources generated by build scripts #4546

Closed
Undin opened this issue Oct 20, 2019 · 1 comment
Labels
feature subsystem::build scripts subsystem::macros Issues related to macros subsystem::tools Issues about integration with external tools like rustup, cargo, rustfmt, etc.

Comments

@Undin
Copy link
Member

Undin commented Oct 20, 2019

Environment

  • IntelliJ Rust plugin version: 0.2.108.2762-193-nightly
  • Rust toolchain version: 1.38.0 (625451e37 2019-09-23) x86_64-apple-darwin
  • IDE name and version: IntelliJ IDEA 2019.3 EAP Ultimate Edition (IU-193.4386.10)
  • Operating system: macOS 10.13.6

Problem description

#4542 finishes support of all common cases how include macro can be used. More precisely, it provides support of env("OUT_DIR") inside macro call. OUT_DIR variable is used by build scripts where they generated including code.

But if a user hasn't compiled a project yet, all code insight features don't work because the plugin relies on existence of generated code in file system. And it's not clear that something doesn't work because build scripts haven't generated code yet.

It would be great to solve it somehow. For example, the plugin can show a notification to a user that expected generated sources are not present on file system. Or we can have an option to automatically build project/libraries/build scripts (see rust-lang/cargo#7068 and rust-lang/cargo#7178) to have an actual version of generated source code.

@Undin Undin added subsystem::tools Issues about integration with external tools like rustup, cargo, rustfmt, etc. feature subsystem::macros Issues related to macros labels Oct 20, 2019
@Undin
Copy link
Member Author

Undin commented Sep 27, 2021

Currently, we use cargo check instead of cargo build-plan to get values of compile-time variables (as well as another compile-time information). And cargo check also runs all build scripts so all necessary files are generated and available for plugin analysis. So I think this issue can be closed

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

No branches or pull requests

1 participant