-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Fix crash when mixing use_repo_rule and --inject_repository
#27967
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
Conversation
Bazel crashes at HEAD when `use_repo_rule` is used with `local_repository` while also using `--inject_repository`. Make bugs like this less likely by extracting out a safe "get or create" helper for extension usages.
|
@bazel-io fork 9.0.0 |
|
@meteorcloudy This probably has to go out in an 8.5.1 release :-( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request addresses a crash that occurs when use_repo_rule and --inject_repository are used together for local_repository. The fix involves refactoring the creation of ModuleExtensionUsageBuilder into a centralized getOrCreateExtensionUsageBuilder helper method. This ensures that a single builder is used for the same non-isolated extension, preventing the duplication that caused the crash. The changes are logical, well-contained, and include a regression test to prevent this issue in the future. The code quality is improved by this refactoring.
|
@fmeum Could you please take a look at the failing checks? |
|
@bharadwaj08-one That's an unrelated preexisting failure. @Wyverald |
|
I'm already importing this. |
Bazel crashes at HEAD when `use_repo_rule` is used with `local_repository` while also using `--inject_repository`. Make bugs like this less likely by extracting out a safe "get or create" helper for extension usages. Fixes bazelbuild#27953 Closes bazelbuild#27967. PiperOrigin-RevId: 844683022 Change-Id: I1edcf1e7c72ef8d46c67e51b4f9ffd6a6ce82ec8
|
@iancha1992 Let's do a 8.5.1 |
…y` (#27983) Bazel crashes at HEAD when `use_repo_rule` is used with `local_repository` while also using `--inject_repository`. Make bugs like this less likely by extracting out a safe "get or create" helper for extension usages. Fixes #27953 Closes #27967. PiperOrigin-RevId: 844683022 Change-Id: I1edcf1e7c72ef8d46c67e51b4f9ffd6a6ce82ec8 Commit 21d7fec Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
|
@bazel-io fork 8.5.1 |
Bazel crashes at HEAD when `use_repo_rule` is used with `local_repository` while also using `--inject_repository`. Make bugs like this less likely by extracting out a safe "get or create" helper for extension usages. Fixes bazelbuild#27953 Closes bazelbuild#27967. PiperOrigin-RevId: 844683022 Change-Id: I1edcf1e7c72ef8d46c67e51b4f9ffd6a6ce82ec8
|
@bazel-io fork 8.6.0 |
Bazel crashes at HEAD when `use_repo_rule` is used with `local_repository` while also using `--inject_repository`. Make bugs like this less likely by extracting out a safe "get or create" helper for extension usages. Fixes bazelbuild#27953 Closes bazelbuild#27967. PiperOrigin-RevId: 844683022 Change-Id: I1edcf1e7c72ef8d46c67e51b4f9ffd6a6ce82ec8
…y` (#27995) Bazel crashes at HEAD when `use_repo_rule` is used with `local_repository` while also using `--inject_repository`. Make bugs like this less likely by extracting out a safe "get or create" helper for extension usages. Fixes #27953 Closes #27967. PiperOrigin-RevId: 844683022 Change-Id: I1edcf1e7c72ef8d46c67e51b4f9ffd6a6ce82ec8 Commit 21d7fec Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
…y` (#27999) Bazel crashes at HEAD when `use_repo_rule` is used with `local_repository` while also using `--inject_repository`. Make bugs like this less likely by extracting out a safe "get or create" helper for extension usages. Fixes #27953 Closes #27967. PiperOrigin-RevId: 844683022 Change-Id: I1edcf1e7c72ef8d46c67e51b4f9ffd6a6ce82ec8 Commit 21d7fec Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
Bazel crashes at HEAD when
use_repo_ruleis used withlocal_repositorywhile also using--inject_repository.Make bugs like this less likely by extracting out a safe "get or create" helper for extension usages.
Fixes #27953