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

Ensure that extension unique names followed by ~ are prefix-free #19156

Closed
wants to merge 1 commit into from

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented 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 #19155

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~
```
@fmeum fmeum marked this pull request as ready for review August 3, 2023 13:37
@github-actions github-actions bot added awaiting-review PR is awaiting review from an assigned reviewer team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. labels Aug 3, 2023
Copy link
Member

@meteorcloudy meteorcloudy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@meteorcloudy meteorcloudy added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Aug 3, 2023
@fmeum
Copy link
Collaborator Author

fmeum commented Aug 3, 2023

@bazel-io flag

@bazel-io 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
@iancha1992
Copy link
Member

@bazel-io fork 6.4.0

@bazel-io 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
@copybara-service copybara-service bot closed this in 896b358 Aug 3, 2023
@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Aug 3, 2023
iancha1992 pushed a commit to iancha1992/bazel that referenced this pull request 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
Copy link
Member

@bazel-io fork 6.3.2

bazel-io pushed a commit to bazel-io/bazel that referenced this pull request 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 pull request 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 <[email protected]>
Wyverald pushed a commit that referenced this pull request 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 <[email protected]>
@fmeum fmeum deleted the 19155-extension-suffixes branch August 4, 2023 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

same module_extension name in different bzl files could not be resolved while using bzlmod in bazel 6.3.1
5 participants