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

Hermetic Python commit breakage #157

Closed
lalten opened this issue Jan 8, 2024 · 9 comments
Closed

Hermetic Python commit breakage #157

lalten opened this issue Jan 8, 2024 · 9 comments

Comments

@lalten
Copy link

lalten commented Jan 8, 2024

Like @Attempt3035 noticed in 0e5b1aa#commitcomment-136462555 that commit caused a regression:

ERROR: error loading package under directory '': error loading package 'path/to/pkg': at /mnt/data/bazel-user-root/27884f8c6ca1cf5fd7f4e20c15176f40/external/hedron_compile_commands/refresh_compile_commands.bzl:61:6: Unable to find package for @python_3_11//:defs.bzl: The repository '@python_3_11' could not be resolved: Repository '@python_3_11' is not defined.

We're still on Python 3.8, and there is no 3.11

@lalten
Copy link
Author

lalten commented Jan 8, 2024

Funny enough I ran into a similar thing with rules_appimage the other day, and asked in Bazel Slack: https://bazelbuild.slack.com/archives/CA306CEV6/p1704300901665709
One workaround seems to be something like lalten/rules_appimage#115

@cpsauer
Copy link
Contributor

cpsauer commented Jan 8, 2024

Thanks for the friendly heads, guys. I'm so sorry about that--I'd intended to support bzlmod and realized I had a bug in my test setup 🤦🏻

I've been experimenting with fixes for the past bit. I think I've got something. I'll get back to you soon.

@cpsauer
Copy link
Contributor

cpsauer commented Jan 8, 2024

Should be fixed--but please test and let me know! Again, sorry guys, and thanks for letting me know.

Luke, thanks also for your offer of help. Please know that if you see something like this, I'd always love your help fixing and really appreciate your great bzlmod setup and contributions. I will, of course, try my best to not let more of these get through in the future.

@Attempt3035
Copy link
Contributor

No worries, will give it a go tonight! Thanks for such a quick development turnaround! Sorry I didn't have a chance to jump in and help, been preoccupied trying to get bazelbuild/bazel-central-registry#1280 working😝

@cpsauer
Copy link
Contributor

cpsauer commented Jan 8, 2024

I saw that you'd created something there! Will that obsolete rules_boost, do you think?

@Attempt3035
Copy link
Contributor

That's the idea😜 It will be far more modular and maintainable, and should be a faster and more efficient solution as only required deps will be downloaded and built. Still working on a transition solution for everyone using the workspace boost rules (which are great, and a lot of the code for the new bzlmod modules comes from). Trying to implement all the original boost tests into it too, so it should be a bit more thorough and complete. Also working on some maintenance tools at https://github.com/dynacondev/boost.rules.tools for bumping versions, creating the patch files and calculating integrity as it's a pain to do manually while developing every time something changes!

@cpsauer
Copy link
Contributor

cpsauer commented Jan 9, 2024

Definitely! Thanks for your good care on maintenance tools; I know I've spent many an evening working on fixing things there. Also set up lots of automation to help keep everything up-to-date by default; not sure if there's an equivalent.

@Attempt3035
Copy link
Contributor

Good point! Will look into automations a bit further down the line👍

@Attempt3035
Copy link
Contributor

Confirmed bzlmod support is fixed in newest commit, thank you!
Also got the warning:
DEBUG: /private/var/tmp/_bazel_lukea/b010c5e57725766be1c569e8ff75e29e/external/rules_python~0.28.0/python/private/bzlmod/python.bzl:44:10: WARNING: Ignoring toolchain 'python_3_11' from module 'rules_python': Toolchain 'python_3_11' from module 'hedron_compile_commands' already registered Python version 3.11 and has precedence
Which shouldn't be an issue, we do indeed want the already registered one from bzlmod to take precedence if I understand correctly 👍

ngiloq6 added a commit to ngiloq6/bazel-compile-commands-extractor that referenced this issue Aug 17, 2024
ngiloq6 added a commit to ngiloq6/bazel-compile-commands-extractor that referenced this issue Aug 17, 2024
Avoids rules_python internal clash
Works around bazelbuild/rules_python#1638 until the next rules_python is released
Should fix hedronvision/bazel-compile-commands-extractor#157
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

3 participants