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

feat: import toolchains to use for copy actions #135

Merged
merged 2 commits into from
Jan 31, 2024

Conversation

seh
Copy link
Contributor

@seh seh commented Dec 11, 2023

Register the "coreutils" toolchains using definitions imported from the bazel_lib Bazel repository in order to allow use of this module with bazel_lib version 2 and later.


Type of change

New feature or functionality (change which adds functionality)

Test plan

Covered by existing test cases

See aspect-build/rules_esbuild#165 for precedent.

Fixes #134.

Register the "coreutils" toolchains using definitions imported from
the "bazel_lib" Bazel repository in order to allow use of this module
with "bazel_lib" version 2 and later.
Copy link
Member

@kormide kormide left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Member

@gregmagolan gregmagolan left a comment

Choose a reason for hiding this comment

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

Looks great. Thanks for the update!

@gregmagolan
Copy link
Member

The CI failure with Bazel 5.3.2 looks familiar:

ERROR: /home/runner/.cache/bazel/_bazel_runner/3583e71b01fa1c6a4fe6bf126ed74da3/external/aspect_bazel_lib/lib/private/BUILD.bazel:253:12: no such target '@local_config_platform//:constraints.bzl': target 'constraints.bzl' not declared in package ''; however, a source file of this name exists.  (Perhaps add 'exports_files(["constraints.bzl"])' to /BUILD?) defined by /home/runner/.cache/bazel/_bazel_runner/3583e71b01fa1c6a4fe6bf126ed74da3/external/local_config_platform/BUILD.bazel and referenced by '@aspect_bazel_lib//lib/private:platform_utils'

We'll have to green this up before landing. I'll look deeper later tonight or tomorrow when I have some time.

@seh
Copy link
Contributor Author

seh commented Dec 12, 2023

The CI failure with Bazel 5.3.2 looks familiar:

Just by way of the error message, it sounds like it may be related to bazelbuild/bazel#15175, though in this case the failure was with Ubuntu Linux, not macOS.

Reading further, there is bazel-contrib/bazel-lib#392. You noted in bazel-contrib/bazel-lib#392 (comment) that there's a workaround that my patch here undid, by way of removing the "override_local_config_platform" attribute value supplied to aspect_bazel_lib_dependencies. That was me just aping what I saw in the similar patches against rules_esbuild and rules_ts. Should I try adding that attribute back in?

@seh
Copy link
Contributor Author

seh commented Dec 17, 2023

Should I try adding that attribute back in?

Commit 7848eb2 adds that "override_local_config_platform" attribute back into the call to aspect_bazel_lib_dependencies in the WORKSPACE file.

@seh
Copy link
Contributor Author

seh commented Dec 19, 2023

Can we please allow this most recent commit to pass through the CI workflow? I'd like to see whether it resolves the previous problem.

@seh
Copy link
Contributor Author

seh commented Dec 19, 2023

Commit 7848eb2 adds that "override_local_config_platform" attribute back into the call to aspect_bazel_lib_dependencies in the WORKSPACE file.

Well, clearly that didn't work. That attribute is no longer known to aspect_bazel_lib_dependencies.

@seh seh force-pushed the register-coreutils-toolchains branch from 7848eb2 to 452abb1 Compare January 8, 2024 15:29
@seh
Copy link
Contributor Author

seh commented Jan 8, 2024

I removed that previous attempt to use the "override_local_config_platform" attribute (per #135 (comment)).

Do we need to continue supporting Bazel version 5.3.2 in our CI workflow?

@gregmagolan
Copy link
Member

I'm working on a PR to bump all the bazel deps and test only on Bazel 7 & 6. That will drop Bazel 5 from the CI matrix.

@alexeagle alexeagle merged commit a7973b6 into aspect-build:main Jan 31, 2024
10 checks passed
@seh seh deleted the register-coreutils-toolchains branch January 31, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug]: aspect_bazel_lib's "coreutils_toolchain_type" is not configured as needed
4 participants