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

[Bug]: rules_py imports do not "properly cross repos" #325

Open
randomNinja1000 opened this issue Apr 2, 2024 · 0 comments
Open

[Bug]: rules_py imports do not "properly cross repos" #325

randomNinja1000 opened this issue Apr 2, 2024 · 0 comments
Labels
bug Something isn't working funding needed Contribute to https://opencollective.com/aspect-build help wanted Aspect isn't prioritizing this, but the community could

Comments

@randomNinja1000
Copy link

randomNinja1000 commented Apr 2, 2024

What happened?

It seems with rules_py imports do not "properly cross repos".
When a source py_library is defined in a source repo1 and used in a target repo2, the sys.path does not get set up properly.

Version

Development (host) and target OS/architectures:

macos sonoma 14.2.1 M3 chip

Output of bazel --version:

bazel 7.1.0

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:

bazel_dep(name = "aspect_rules_py", version = "0.7.1")
bazel_dep(name = "rules_python", dev_dependency = True, version = "0.31.0")

Language(s) and/or frameworks involved:

python

How to reproduce

git clone git@github.com:randomNinja1000/repro-rules-py.git

Instructions

(cd repo1 && bazel run //python/test:test)

passes.

(cd repo2 && bazel run //python/test:test)

passes.

Comment / uncomment the load in repo1/python/BUILD.bazel

(cd repo2 && bazel run //python/test:test)

now fails and the sys.path does not contain repo1 anymore.

Unfortunately, it seems with rules_py imports do not "properly cross repos".

Any other information?

No response

@randomNinja1000 randomNinja1000 added the bug Something isn't working label Apr 2, 2024
@github-actions github-actions bot added the untriaged Requires traige label Apr 2, 2024
@alexeagle alexeagle added help wanted Aspect isn't prioritizing this, but the community could funding needed Contribute to https://opencollective.com/aspect-build and removed untriaged Requires traige labels Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working funding needed Contribute to https://opencollective.com/aspect-build help wanted Aspect isn't prioritizing this, but the community could
Projects
Status: No status
Development

No branches or pull requests

2 participants