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

cycle support which replaces :pkg with :_pkgbreaks aspects #1760

Closed
johnynek opened this issue Feb 14, 2024 · 0 comments · Fixed by #1822
Closed

cycle support which replaces :pkg with :_pkgbreaks aspects #1760

johnynek opened this issue Feb 14, 2024 · 0 comments · Fixed by #1822

Comments

@johnynek
Copy link
Member

🐞 bug report

Affected Rule

pip_parse/pip_repository

Is this a regression?

Yes this is a regression.

Description

The change in this PR: https://github.com/bazelbuild/rules_python/pull/1166/files

specifically unconditionally introducing an impl label _pkg https://github.com/bazelbuild/rules_python/pull/1166/files#diff-ca70482c01526a5439dab7ac2cb14e637684e50daca723d8e6b4e58ca45cbc67R20

that is aliased back to pkg breaks aspects. In an aspect, you will get the target of the alias, which will be _pkg. So, with this change, we need to realias back to the public alias.

This causes breakages for anyone using aspects.

🔬 Minimal Reproduction

You can clearly see the generated build files now make the real :_pkg target private.

🌍 Your Environment

Operating System:

  
macos and linux
  

Output of bazel version:

  
Bazelisk version: v1.16.0
Build label: 6.3.2
Build target: bazel-out/darwin_arm64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Aug 8 15:51:44 2023 (1691509904)
Build timestamp: 1691509904
Build timestamp as int: 1691509904
  

Rules_python version:

  
0.31.0
  
aignas added a commit to aignas/rules_python that referenced this issue Mar 23, 2024
This removes the `alias` additions when the package groups are not used
fixing alias that attempt to traverse the entire py_library dependency
tree.

I noticed that for some code that I want to write for `whl_library`
having it explicit whether we are using groups or not in the `pip.parse`
and or `whl_library` makes the code easier to understand and write.

Fixes bazelbuild#1760
github-merge-queue bot pushed a commit that referenced this issue Mar 27, 2024
This removes the `alias` additions when the package groups are not used
fixing alias that attempt to traverse the entire py_library dependency
tree.

I noticed that for some code that I want to write for `whl_library`
having it explicit whether we are using groups or not in the `pip.parse`
and or `whl_library` makes the code easier to understand and write.

Fixes #1760
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants