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

Sync fails without --enable_workspace #6984

Closed
mai93 opened this issue Nov 9, 2024 · 1 comment · Fixed by #6990
Closed

Sync fails without --enable_workspace #6984

mai93 opened this issue Nov 9, 2024 · 1 comment · Fixed by #6990
Assignees
Labels
awaiting-maintainer Awaiting review from Bazel team on issues product: IntelliJ IntelliJ plugin type: bug

Comments

@mai93
Copy link
Collaborator

mai93 commented Nov 9, 2024

Description of the bug:

For a bzlmod project that uses Bazel 8 where WORKSPACE approach is disabled by default, the build invocation of the plugin sync operation can fail if --enable_workspace is not specified.

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

You can import the python example project from this branch https://github.com/bazelbuild/intellij/tree/bazel-8/examples/python (modified to use Bazel 8 rc). The initial sync will fail with:

FATAL: bazel crashed due to an internal error. Printing stack trace:
java.lang.IllegalStateException: Evaluation of SkyKey failed and no dependencies were requested: KeyForBuild{label=@@intellij_aspect//:intellij_info_bundled.bzl, isBuildPrelude=false} IncrementalInMemoryNodeEntry{key=KeyForBuild{label=@@intellij_aspect//:intellij_info_bundled.bzl, isBuildPrelude=false}, value=null, dirtyBuildingState=InitialBuildingState{state=REBUILDING, signaledDeps=6, externalDeps=0, dirtyDirectDepIndex=0}, version=com.google.devtools.build.skyframe.Version$MinimalVersion@4e5f9c78, directDeps=GroupedDeps{size=6, elements=[PRECOMPUTED:autoload_symbols, Starlark @_builtins, CONTAINING_PACKAGE_LOOKUP:@@intellij_aspect//, FILE:[/usr/local/google/home/messa/.cache/bazel/_bazel_messa/33693a4fea7b855dcfbe5494050fe249/external/intellij_aspect]/[intellij_info_bundled.bzl], PRECOMPUTED:starlark_semantics, Key{repoName=@@intellij_aspect, rootModuleShouldSeeWorkspaceRepos=true}]}, reverseDeps=ReverseDeps{reverseDeps=[], singleReverseDep=false, dataToConsolidate=[BuildTopLevelAspectsDetailsKey{topLevelAspectsClasses=[@@intellij_aspect//:intellij_info_bundled.bzl%intellij_info_aspect], topLevelAspectsParameters={}}]}}
	at com.google.common.base.Preconditions.checkState(Preconditions.java:838)
	at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:697)
	at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:435)
	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)

The error is gone when --enable_workspace is added. Do we have plans to address this by passing --enable_workapce by default for now or some other way?

Which Intellij IDE are you using? Please provide the specific version.

No response

What programming languages and tools are you using? Please provide specific versions.

No response

What Bazel plugin version are you using?

No response

Have you found anything relevant by searching the web?

bazelbuild/bazel#22691 (comment)

Any other information, logs, or outputs that you want to share?

No response

@mai93
Copy link
Collaborator Author

mai93 commented Nov 13, 2024

@tpasternak what are the plans for this one?

tpasternak pushed a commit to tpasternak/bazel-intellij that referenced this issue Nov 13, 2024
tpasternak pushed a commit that referenced this issue Nov 13, 2024
* fix: Support bazel 8 and `--noenable_workspace` mode

closes #6984
@github-project-automation github-project-automation bot moved this from Untriaged to Done in Bazel IntelliJ Plugin Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-maintainer Awaiting review from Bazel team on issues product: IntelliJ IntelliJ plugin type: bug
Projects
Development

Successfully merging a pull request may close this issue.

4 participants