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

Mitigate & document problems with mixed generated sources #3127

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sam-mccall
Copy link
Contributor

  • deterministically prefer rust_library's crate spec over rust_test's.
    This means root_module gets remapped to a workspace path more often,
    and fixes flakiness of generated_srcs_test.
  • document the reasons and tradeoffs for this remapping.
  • stop adding include_dirs when remapping, it doesn't do anything to
    help with this problem, and is confusing.
  • fix test to strictly assert the path, which I broke in
    74f164b

Partially fixes #3126

- deterministically prefer rust_library's crate spec over rust_test's.
  This means root_module gets remapped to a workspace path more often,
  and fixes flakiness of generated_srcs_test.
- document the reasons and tradeoffs for this remapping.
- stop adding `include_dirs` when remapping, it doesn't do anything to
  help with this problem, and is confusing.
- fix test to strictly assert the path, which I broke in
  74f164b

Partially fixes bazelbuild#3126
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.

rust_analyzer: unpredictable/broken behavior with generated sources
1 participant