Skip to content

Fixes rust-analyzer include_dirs for crates with generated sources#3840

Open
csmulhern wants to merge 1 commit intobazelbuild:mainfrom
csmulhern:include
Open

Fixes rust-analyzer include_dirs for crates with generated sources#3840
csmulhern wants to merge 1 commit intobazelbuild:mainfrom
csmulhern:include

Conversation

@csmulhern
Copy link
Contributor

When a crate contains generated sources, include_dirs needs to include BOTH the root_module directory, and the generated sources directory.

When include_dirs is empty, the inclusion of the root_module directory is done automatically, but when setting include_dirs, this needs to be done manually.

See:
https://github.com/rust-lang/rust-analyzer/blob/a84d92ff213e30fb00d7b812e07c4f67e99dcd29/crates/project-model/src/project_json.rs#L123-L131

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.

1 participant