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

Separate testing module and bzlmod tests for toolchains/python #335

Merged
merged 13 commits into from
Feb 23, 2023

Conversation

evertedsphere
Copy link
Contributor

@evertedsphere evertedsphere commented Feb 21, 2023

Adds a new Bazel module in testing/python and moves tests for toolchains/python into this module, following the motivation from tweag/rules_sh#41.

The toolchain registration step is also made optional and disabled in bzlmod mode, as it is not allowed to invoke native.register_toolchains outside MODULE.bazel in the latter case.

@evertedsphere
Copy link
Contributor Author

evertedsphere commented Feb 21, 2023

Tests only fail on macOS, due to some CC toolchain issues:

  ERROR: /private/var/tmp/_bazel_runner/4b8f17f3ba765bf36a9ba20170a1578c/external/_main~non_module_deps~nixpkgs_python_configure_test/BUILD.bazel:1:8: 
While resolving toolchains for target @_main~non_module_deps~nixpkgs_python_configure_test//:python2-test: 
invalid registered toolchain '@nixpkgs_config_cc_toolchains//:cc-toolchain-k8': 
no such target '@_main~non_module_deps~nixpkgs_config_cc_toolchains//:cc-toolchain-k8': 
target 'cc-toolchain-k8' not declared in package '' defined by /private/var/tmp/_bazel_runner/4b8f17f3ba765bf36a9ba20170a1578c/external/_main~non_module_deps~nixpkgs_config_cc_toolchains/BUILD.bazel (Tip: use `query "@nixpkgs_config_cc_toolchains//:*"` to see all the targets in that package)

Copy link
Member

@benradf benradf left a comment

Choose a reason for hiding this comment

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

Looks good!

The `@nixpkgs` workspace is now imported at the top of the same file.
Copy link
Member

@aherrmann aherrmann left a comment

Choose a reason for hiding this comment

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

Thank you!

@aherrmann aherrmann added the merge-queue merge on green CI label Feb 23, 2023
@mergify mergify bot merged commit ae5346b into master Feb 23, 2023
@mergify mergify bot deleted the es/bzlmod-python branch February 23, 2023 09:29
@mergify mergify bot removed the merge-queue merge on green CI label Feb 23, 2023
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

Successfully merging this pull request may close these issues.

3 participants