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

Crash when using exec transition as incoming rule transition #13751

Closed
katre opened this issue Jul 27, 2021 · 0 comments
Closed

Crash when using exec transition as incoming rule transition #13751

katre opened this issue Jul 27, 2021 · 0 comments
Assignees
Labels
P1 I'll work on this now. (Assignee required) team-Configurability platforms, toolchains, cquery, select(), config transitions type: bug

Comments

@katre
Copy link
Member

katre commented Jul 27, 2021

Reproduce:

def _impl(ctx):
    pass

demo = rule(
    implementation = _impl,
    cfg = config.exec(),
)

Error:

FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.ClassCastException: class com.google.devtools.build.lib.packages.AutoValue_RuleTransitionData cannot be cast to class com.google.devtools.build.lib.packages.AttributeTransitionData (com.google.devtools.build.lib.packages.AutoValue_RuleTransitionData and com.google.devtools.build.lib.packages.AttributeTransitionData are in unnamed module of loader 'app')
	at com.google.devtools.build.lib.analysis.config.ExecutionTransitionFactory.create(ExecutionTransitionFactory.java:39)
	at com.google.devtools.build.lib.analysis.config.TransitionResolver.applyTransitionFromFactory(TransitionResolver.java:114)
	at com.google.devtools.build.lib.analysis.config.TransitionResolver.applyRuleTransition(TransitionResolver.java:99)
	at com.google.devtools.build.lib.analysis.config.TransitionResolver.evaluateTransition(TransitionResolver.java:83)
	at com.google.devtools.build.lib.analysis.AnalysisUtils.targetsToDeps(AnalysisUtils.java:203)
	at com.google.devtools.build.lib.analysis.AnalysisUtils.getTargetsWithConfigs(AnalysisUtils.java:191)
	at com.google.devtools.build.lib.analysis.BuildView.update(BuildView.java:244)
	at com.google.devtools.build.lib.buildtool.AnalysisPhaseRunner.runAnalysisPhase(AnalysisPhaseRunner.java:217)
	at com.google.devtools.build.lib.buildtool.AnalysisPhaseRunner.execute(AnalysisPhaseRunner.java:129)

(This is copied from an internal bug report)

@katre katre added type: bug P1 I'll work on this now. (Assignee required) team-Configurability platforms, toolchains, cquery, select(), config transitions labels Jul 27, 2021
@katre katre self-assigned this Jul 27, 2021
bazel-io pushed a commit that referenced this issue Jul 27, 2021
Part of the fix for #13751.

Closes #13749.

PiperOrigin-RevId: 387147712
katre added a commit to katre/bazel that referenced this issue Jul 27, 2021
bazel-io pushed a commit that referenced this issue Jul 27, 2021
Part of the fix for #13751.

Closes #13754.

PiperOrigin-RevId: 387161899
katre added a commit to katre/bazel that referenced this issue Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 I'll work on this now. (Assignee required) team-Configurability platforms, toolchains, cquery, select(), config transitions type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant