-
Notifications
You must be signed in to change notification settings - Fork 4k
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
same module_extension
name in different bzl files could not be resolved while using bzlmod in bazel 6.3.1
#19155
Labels
area-Bzlmod
Bzlmod-specific PRs, issues, and feature requests
P1
I'll work on this now. (Assignee required)
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: bug
Comments
Pavank1992
added
the
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
label
Aug 3, 2023
Can confirm that this is a bug. The two extensions are assigned the prefixes I am working on a fix. CC @Wyverald |
@bazel-io flag |
bazel-io
added
the
potential release blocker
Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone
label
Aug 3, 2023
@bazel-io fork 6.4.0 |
bazel-io
removed
the
potential release blocker
Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone
label
Aug 3, 2023
@iancha1992 This is a regression from Bazel 6.2.0, so unfortunately we may need a 6.3.2 release to cherry-pick this into. |
cc: @bazelbuild/triage |
Wyverald
added
P1
I'll work on this now. (Assignee required)
area-Bzlmod
Bzlmod-specific PRs, issues, and feature requests
and removed
untriaged
labels
Aug 3, 2023
iancha1992
pushed a commit
to iancha1992/bazel
that referenced
this issue
Aug 3, 2023
Fixes errors such as the following when a module provides two extensions that share a name: ``` ERROR: /my/workspace/library_path/BUILD:4:13: no such package '@_main~my_ext~2~xyz//': The repository '@_main~my_ext~2~xyz' could not be resolved: Repository '@_main~my_ext~2~xyz' is not defined and referenced by '//library_path:library_name' ERROR: Analysis of target '//my_path:my_target' failed; build aborted: ``` This was a consequence of the extension unique names followed by `~` being ``` _main~my_ext~2~ _main~my_ext~ ``` since 19a9710. Before, they were of the following form, which was prefix-free: ``` _main~my_ext2~ _main~my_ext~ ``` Fixes bazelbuild#19155 Closes bazelbuild#19156. PiperOrigin-RevId: 553567725 Change-Id: I98650663fea3bfee77752a06a99132e507d91aef
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this issue
Aug 3, 2023
Fixes errors such as the following when a module provides two extensions that share a name: ``` ERROR: /my/workspace/library_path/BUILD:4:13: no such package '@_main~my_ext~2~xyz//': The repository '@_main~my_ext~2~xyz' could not be resolved: Repository '@_main~my_ext~2~xyz' is not defined and referenced by '//library_path:library_name' ERROR: Analysis of target '//my_path:my_target' failed; build aborted: ``` This was a consequence of the extension unique names followed by `~` being ``` _main~my_ext~2~ _main~my_ext~ ``` since 19a9710. Before, they were of the following form, which was prefix-free: ``` _main~my_ext2~ _main~my_ext~ ``` Fixes bazelbuild#19155 Closes bazelbuild#19156. PiperOrigin-RevId: 553567725 Change-Id: I98650663fea3bfee77752a06a99132e507d91aef
iancha1992
added a commit
that referenced
this issue
Aug 3, 2023
…19164) Fixes errors such as the following when a module provides two extensions that share a name: ``` ERROR: /my/workspace/library_path/BUILD:4:13: no such package '@_main~my_ext~2~xyz//': The repository '@_main~my_ext~2~xyz' could not be resolved: Repository '@_main~my_ext~2~xyz' is not defined and referenced by '//library_path:library_name' ERROR: Analysis of target '//my_path:my_target' failed; build aborted: ``` This was a consequence of the extension unique names followed by `~` being ``` _main~my_ext~2~ _main~my_ext~ ``` since 19a9710. Before, they were of the following form, which was prefix-free: ``` _main~my_ext2~ _main~my_ext~ ``` Fixes #19155 Closes #19156. PiperOrigin-RevId: 553567725 Change-Id: I98650663fea3bfee77752a06a99132e507d91aef Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
Wyverald
pushed a commit
that referenced
this issue
Aug 3, 2023
…19167) Fixes errors such as the following when a module provides two extensions that share a name: ``` ERROR: /my/workspace/library_path/BUILD:4:13: no such package '@_main~my_ext~2~xyz//': The repository '@_main~my_ext~2~xyz' could not be resolved: Repository '@_main~my_ext~2~xyz' is not defined and referenced by '//library_path:library_name' ERROR: Analysis of target '//my_path:my_target' failed; build aborted: ``` This was a consequence of the extension unique names followed by `~` being ``` _main~my_ext~2~ _main~my_ext~ ``` since 19a9710. Before, they were of the following form, which was prefix-free: ``` _main~my_ext2~ _main~my_ext~ ``` Fixes #19155 Closes #19156. PiperOrigin-RevId: 553567725 Change-Id: I98650663fea3bfee77752a06a99132e507d91aef Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-Bzlmod
Bzlmod-specific PRs, issues, and feature requests
P1
I'll work on this now. (Assignee required)
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: bug
Description of the bug:
We're using bzlmod.
This is a part of
MODULE.bazel
, which works fine in bazel 6.2.1.When I updated bazel to 6.3.1, there was an error in analysis phase.
It seems that in bazel 6.2.1, if there is a same
module_extension
name in different bzl files, the second one will be named as@_main~my_ext2~xyz
in external directory. But in bazel 6.3.1, it seems that bazel is tring to find a module named as@_main~my_ext~2~xyz
(adds a~
afterext
) which doesn't actually exist.Which category does this issue belong to?
No response
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
No response
Which operating system are you running Bazel on?
macOS 13.4.1
What is the output of
bazel info release
?release 6.3.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
No response
Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: