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

Please document example of namespace handling #35

Closed
chickenandpork opened this issue Jul 1, 2020 · 7 comments
Closed

Please document example of namespace handling #35

chickenandpork opened this issue Jul 1, 2020 · 7 comments

Comments

@chickenandpork
Copy link

Hey @ali5h, I've got an instance of the google.* and azure.* namespace clash issue (bazelbuild/rules_python#93 bazelbuild/rules_python#55). You've indicated that you fixed it, but the problem still persists in v2.1.1, can you give an idea of what that fix looks like?

bazelbuild/rules_python#93 (comment)

i fixed this issue in https://github.com/ali5h/rules_pip

as well bazelbuild/rules_python#93 (comment)

fixed the issues, plz use latest release, thanks for the feedback

I'm using your latest release, and I'm still seeing the issue. Maybe there's additional text I've missed describing what else to do to activate this repair.

If you see https://github.com/chickenandpork/bazel-pip-import-namespace, it represents the issue I'm having. Note that transitory dependencies were tried as well, then commented back out in the BUILD file.

bazel test //... repro the error.

I believe this follows the instructions you've shared. Can you see what else is missing to work around the issue ?

@ali5h
Copy link
Owner

ali5h commented Jul 1, 2020

i will check, but in the meanwhile look in examples

@ali5h
Copy link
Owner

ali5h commented Jul 1, 2020

it passes for me, on mac, python 3.8

@ali5h
Copy link
Owner

ali5h commented Jul 1, 2020

also tested on linux

@chickenandpork
Copy link
Author

I appreciate your quick reply.

Can you confirm it is not leveraging your locally-installed packages?

I found the issue is avoided and the build passes if either package is locally-installed on my build system and available on PYTHONPATH (ie not brought in hermetically by Bazel). Locally-installed non-hermetic packages are not the intention though.

@ali5h
Copy link
Owner

ali5h commented Jul 1, 2020

they are not

@ali5h
Copy link
Owner

ali5h commented Jul 1, 2020

it would be great if you can add Dockerfile to reproduce this

@chickenandpork
Copy link
Author

Looks like I'm wrong; Sorry.

Your very specific request (thanks) helped me find a possible solution (build host taint trashing the first resolution of the google.* namespace, and failing, so no others checked.

Bazel builds should be hermetic !

  • pip list | grep google
  • pip uninstall {the google things}

For the next person who has this issue (and for when I forget :-/ ) I'm documenting the path to the solution at https://github.com/chickenandpork/bazel-pip-import-namespace#recommendation

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

No branches or pull requests

2 participants