Skip to content

Use toolchains_aspects to propagate aspects to toolchains #7300

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

Closed
wants to merge 1 commit into from

Conversation

mai93
Copy link
Collaborator

@mai93 mai93 commented Feb 11, 2025

with bazel @ head _cc_toolchain attribute is removed and we should modify the aspect to propagate to the toolchain via the toolchain type not the attribute name.

The feature for aspect to toolchains propagation is only available at Bazel 8, so we would need to version the aspect based on the user Bazel version if we want to merge this.

Fixes: https://buildkite.com/bazel/bazel-at-head-plus-disabled/builds/2312#0194e951-36e8-4a84-b666-c0b53fd4c698

@github-actions github-actions bot added the awaiting-review Awaiting review from Bazel team on PRs label Feb 11, 2025
odisseus

This comment was marked as outdated.

@odisseus
Copy link
Collaborator

Looks like these changes break the project import:

ERROR: Traceback (most recent call last):
	File ".../testdata/.ijwb/aspect/intellij_info_bundled.bzl", line 89, column 49, in <toplevel>
		intellij_info_aspect = make_intellij_info_aspect(_aspect_impl, semantics, toolchains_aspects = TOOLCHAIN_TYPE_DEPS,)
	File ".../testdata/.ijwb/aspect/intellij_info_impl_bundled.bzl", line 1384, column 18, in make_intellij_info_aspect
		return aspect(
Error in aspect: aspect() got unexpected keyword argument 'toolchains_aspects'
ERROR: initialization of module '.ijwb/aspect/intellij_info_bundled.bzl' failed
ERROR: Analysis of aspects '[//.ijwb/aspect:intellij_info_bundled.bzl%intellij_info_aspect] with parameters {} on //:foo' failed; build aborted: initialization of module '.ijwb/aspect/intellij_info_bundled.bzl' failed

@mai93
Copy link
Collaborator Author

mai93 commented Feb 11, 2025

Looks like these changes break the project import:

yes, as I mentioned in the description. we still need to add some versioning to the aspect so that it only uses toolchains_aspects with bazel > 8. Maybe someone can help with that?

@LeFrosch
Copy link
Collaborator

I can take a more extensive look on Friday. The aspect templating is sadly in no state that would make this easy. Is this urgent?

@mai93
Copy link
Collaborator Author

mai93 commented Feb 11, 2025

we need to reenable integration tests with Bazel@head

@sgowroji sgowroji added the product: IntelliJ IntelliJ plugin label Feb 17, 2025
@LeFrosch
Copy link
Collaborator

After taking a more extensive look, I am not sure if we can support this (especially in testing) without major changes to the aspect handling.

@LeFrosch LeFrosch closed this Mar 10, 2025
@github-project-automation github-project-automation bot moved this from Untriaged to Done in Bazel IntelliJ Plugin Mar 10, 2025
@github-actions github-actions bot removed the awaiting-review Awaiting review from Bazel team on PRs label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: IntelliJ IntelliJ plugin
Projects
Development

Successfully merging this pull request may close these issues.

4 participants