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

[Bazel 5] NullPointerException thrown during Starlark evaluation (//tests/ios/app:SwiftLib_objc) #342

Open
jerrymarino opened this issue Oct 25, 2021 · 2 comments

Comments

@jerrymarino
Copy link
Contributor

Loading: 0 packages loaded
Analyzing: target //tests/ios/app:SwiftLib_objc (50 packages loaded, 468 targets configured)
currently loading: rules/test_host_app ... (3 packages)
FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.RuntimeException: Unrecoverable error while evaluating node 'ConfiguredTargetKey{label=//tests/ios/app:SwiftLib_objc, config=BuildConfigurationValue.Key[c1aab18881a67eadebc08dfe28cc5e00264832bc0f075ef703d8b6055e7b8ffc]}' (requested by nodes )
at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:674)
at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:382)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: net.starlark.java.eval.Starlark$UncheckedEvalException: NullPointerException thrown during Starlark evaluation (//tests/ios/app:SwiftLib_objc)
at .create_compilation_attributes(:0)
at ._build_common_variables(/virtual_builtins_bzl/common/objc/compilation_support.bzl:80)
at ._objc_library_impl(/virtual_builtins_bzl/common/objc/objc_library.bzl:114)
Caused by: java.lang.NullPointerException
at java.base/java.lang.String.replace(Unknown Source)
at com.google.devtools.build.lib.rules.objc.ObjcStarlarkInternal.expandFlag(ObjcStarlarkInternal.java:145)
at com.google.devtools.build.lib.rules.objc.ObjcStarlarkInternal.expandToolchainAndRuleContextVariables(ObjcStarlarkInternal.java:119)
at com.google.devtools.build.lib.rules.objc.ObjcStarlarkInternal.createCompilationAttributes(ObjcStarlarkInternal.java:82)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at net.starlark.java.eval.MethodDescriptor.call(MethodDescriptor.java:162)
at net.starlark.java.eval.BuiltinFunction.fastcall(BuiltinFunction.java:77)
at net.starlark.java.eval.Starlark.fastcall(Starlark.java:619)
at net.starlark.java.eval.Eval.evalCall(Eval.java:672)
at net.starlark.java.eval.Eval.eval(Eval.java:489)
at net.starlark.java.eval.Eval.execAssignment(Eval.java:109)
at net.starlark.java.eval.Eval.exec(Eval.java:268)
at net.starlark.java.eval.Eval.execStatements(Eval.java:82)
at net.starlark.java.eval.Eval.execFunctionBody(Eval.java:66)
at net.starlark.java.eval.StarlarkFunction.fastcall(StarlarkFunction.java:191)
at net.starlark.java.eval.Starlark.fastcall(Starlark.java:619)
at net.starlark.java.eval.Eval.evalCall(Eval.java:672)
at net.starlark.java.eval.Eval.eval(Eval.java:489)
at net.starlark.java.eval.Eval.execAssignment(Eval.java:109)
at net.starlark.java.eval.Eval.exec(Eval.java:268)
at net.starlark.java.eval.Eval.execStatements(Eval.java:82)
at net.starlark.java.eval.Eval.execFunctionBody(Eval.java:66)
at net.starlark.java.eval.StarlarkFunction.fastcall(StarlarkFunction.java:191)
at net.starlark.java.eval.Starlark.fastcall(Starlark.java:619)
at com.google.devtools.build.lib.analysis.starlark.StarlarkRuleConfiguredTargetUtil.buildRule(StarlarkRuleConfiguredTargetUtil.java:98)
at com.google.devtools.build.lib.analysis.ConfiguredTargetFactory.createRule(ConfiguredTargetFactory.java:353)
at com.google.devtools.build.lib.analysis.ConfiguredTargetFactory.createConfiguredTarget(ConfiguredTargetFactory.java:188)
at com.google.devtools.build.lib.skyframe.SkyframeBuildView.createConfiguredTarget(SkyframeBuildView.java:1108)
at com.google.devtools.build.lib.skyframe.ConfiguredTargetFunction.createConfiguredTarget(ConfiguredTargetFunction.java:990)
at com.google.devtools.build.lib.skyframe.ConfiguredTargetFunction.compute(ConfiguredTargetFunction.java:368)
at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:590)
at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:382)
at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

@thii
Copy link
Contributor

thii commented Oct 25, 2021

I filed this a while ago, seems related to the rewrite of objc_library in Starlark bazelbuild/bazel#13862

@jerrymarino
Copy link
Contributor Author

@thii awesome, do you happen to know if anyone is on point to fix this? I suspected lime uses this, and I know of a handful other rules in iOS the ecosystem did too.

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

2 participants