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

Error:Could not run Bazel mod dump_repo_mapping #6801

Closed
AlexBurdu opened this issue Sep 26, 2024 · 11 comments
Closed

Error:Could not run Bazel mod dump_repo_mapping #6801

AlexBurdu opened this issue Sep 26, 2024 · 11 comments
Assignees
Labels
awaiting-maintainer Awaiting review from Bazel team on issues more-data-needed Awaiting response from issue author product: IntelliJ IntelliJ plugin topic: external dependencies type: bug

Comments

@AlexBurdu
Copy link

AlexBurdu commented Sep 26, 2024

Description of the issue. Please be specific.

Sync fails with the error in the title on the latest intellij idea.

  • Reinstalling the plugin does not fix the issue.

What's the simplest set of steps to reproduce this issue? Please provide an example project, if possible.

Sync project with the latest intellij

Updating VCS...
Running Bazel info...
Command: bazel info --tool_tag=ijwb:IDEA:ultimate "--override_repository=intellij_aspect=/Users/alex/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/ijwb/aspect" --curses=no --color=yes --progress_in_terminal_title=no bazel-bin bazel-genfiles bazel-testlogs execution_root package_path output_path output_base release starlark-semantics --
Command: git diff --name-status --no-renames 2fc365e8100b57d27d614abda5d5b2c284aeb47e
Resolving module repository mapping...
Command: bazel mod --tool_tag=ijwb:IDEA:ultimate "--override_repository=intellij_aspect=/Users/alex/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/ijwb/aspect" --curses=no --color=yes --progress_in_terminal_title=no --noenable_workspace dump_repo_mapping "" --
 checking cached actions

Version information

IdeaUltimate: 2024.2.3
Platform: Mac OS X 14.6.1
Bazel for IntelliJ plugin: 2024.09.10.0.1-api-version-242
Bazel: 7.3.1

@sgowroji sgowroji added type: bug product: IntelliJ IntelliJ plugin more-data-needed Awaiting response from issue author topic: external dependencies awaiting-maintainer Awaiting review from Bazel team on issues labels Sep 26, 2024
@sgowroji
Copy link
Member

@AlexBurdu Could you please provide more details?

@AlexBurdu
Copy link
Author

Please let me know what extra info would help and how I can provide debug info.

I'm using bazel with bazel mod and before updating to the latest intellij it was working fine. After update the above issue is happening.

@tpasternak
Copy link
Collaborator

@AlexBurdu can you run the latest command just from CLI?

@AlexBurdu
Copy link
Author

bazel mod --tool_tag=ijwb:IDEA:ultimate "--override_repository=intellij_aspect=/Users/alex/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/ijwb/aspect" --curses=no --color=yes --progress_in_terminal_title=no --noenable_workspace dump_repo_mapping ""
bazel 7.3.1
{"":"","rules_jvm_external":"rules_jvm_external~","alexlibraria":"","buildifier_prebuilt":"buildifier_prebuilt~","local_config_platform":"local_config_platform","maven":"_main~maven_deps~maven","bazel_skylib":"bazel_skylib~","robolectric":"rules_robolectric~","rules_java":"rules_java~","rules_android":"rules_android~","rules_kotlin":"rules_kotlin~","pip":"rules_python~~pip~pip","rules_python":"rules_python~","bazel_tools":"bazel_tools"}

@AlexBurdu
Copy link
Author

Sync window doesn't provide much details. It doesn't show any error. Is it misinterpreted by the ide?

image

@AlexBurdu
Copy link
Author

Some logs:

2024-09-26 17:58:10,209 [1453878]   INFO - #com.google.idea.async.process.CommandLineTask - Running task:
  /usr/bin/git rev-parse @{u}
  with PWD: /Users/alex/alexlibraria
2024-09-26 17:58:10,209 [1453878]   INFO - #com.google.idea.async.process.CommandLineTask - Running task:
  /Users/alex/alexlibraria/bazelw info --tool_tag=ijwb:IDEA:ultimate "--override_repository=intellij_aspect=/Users/alex/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/ijwb/aspect" --curses=no --color=yes --progress_in_terminal_title=no bazel-bin bazel-genfiles bazel-testlogs execution_root package_path output_path output_base release starlark-semantics --
  with PWD: /Users/alex/alexlibraria
2024-09-26 17:58:10,224 [1453893]   INFO - #com.google.idea.async.process.CommandLineTask - Running task:
  /usr/bin/git rev-parse --show-toplevel
  with PWD: /Users/alex/alexlibraria
2024-09-26 17:58:10,237 [1453906]   INFO - #com.google.idea.async.process.CommandLineTask - Running task:
  /usr/bin/git diff --name-status --no-renames 2fc365e8100b57d27d614abda5d5b2c284aeb47e
  with PWD: /Users/alex/alexlibraria
2024-09-26 17:58:10,253 [1453922]   INFO - #com.google.idea.async.process.CommandLineTask - Running task:
  /usr/bin/git ls-files --others --exclude-standard
  with PWD: /Users/alex/alexlibraria
2024-09-26 17:58:11,002 [1454671]   WARN - #com.google.idea.blaze.base.command.buildresult.BuildResultHelperBep - Could not delete BEP output file: /var/folders/zt/b019qxhx5dv03qf2ggdbtsv80000gn/T/intellij-bep-c7595deb-5681-4fa8-8bbd-f33f876a4111
2024-09-26 17:58:11,002 [1454671]   INFO - #com.google.idea.blaze.base.scope.scopes.TimingScope - ==== TIMING REPORT ====
2024-09-26 17:58:11,002 [1454671]   INFO - #com.google.idea.blaze.base.scope.scopes.TimingScope - BazelInfo: 793ms
2024-09-26 17:58:11,003 [1454672]   INFO - #com.google.idea.async.process.CommandLineTask - Running task:
  /Users/alex/alexlibraria/bazelw mod --tool_tag=ijwb:IDEA:ultimate "--override_repository=intellij_aspect=/Users/alex/Library/Application Support/JetBrains/IntelliJIdea2024.2/plugins/ijwb/aspect" --curses=no --color=yes --progress_in_terminal_title=no --noenable_workspace dump_repo_mapping "" --
  with PWD: /Users/alex/alexlibraria
2024-09-26 17:58:11,656 [1455325]   WARN - #com.google.idea.blaze.base.command.buildresult.BuildResultHelperBep - Could not delete BEP output file: /var/folders/zt/b019qxhx5dv03qf2ggdbtsv80000gn/T/intellij-bep-43abcc6f-03b8-44f2-8d98-7f543c7cb9f5
2024-09-26 17:58:11,656 [1455325]   INFO - #com.google.idea.blaze.base.scope.scopes.TimingScope - ==== TIMING REPORT ====
2024-09-26 17:58:11,656 [1455325]   INFO - #com.google.idea.blaze.base.scope.scopes.TimingScope - BazelMod: 653ms
2024-09-26 17:58:13,351 [1457020]   INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities com.intellij.platform.workspace.jps.entities.SdkEntity to files
2024-09-26 17:58:13,352 [1457021]   INFO - #c.i.w.i.i.j.s.JpsGlobalModelSynchronizerImpl - Saving global entities com.intellij.platform.workspace.jps.entities.LibraryEntity to files

@tpasternak
Copy link
Collaborator

Can you please set the full path to your bazel executable in settings?

@AlexBurdu
Copy link
Author

Nice catch, thanks!

I'm using wrapper around bazelisk.

#!/bin/bash
# A wrapper script around bazelisk, which handles installing and running Bazel
# https://github.com/bazelbuild/bazelisk

BAZELISK_VERSION="v1.20.0"

#if [[ ! $(hash bazelisk) ]]; then
if [[ "$OSTYPE" == "linux-gnu" || "$OSTYPE" == "darwin"* ]]; then
   # For go >= 1.17
   go install "github.com/bazelbuild/bazelisk@${BAZELISK_VERSION}"
else
  echo "Unsupported OS type: $OSTYPE"
  return 1
fi
#fi

# https://github.com/bazelbuild/intellij/issues/2328#issuecomment-1088068381
args=("$@")
for index in "${!args[@]}"; do
  [[ "${args[index]}" == "--nolaunch_app" ]] && unset 'args[index]'
done

bazelisk --version
bazelisk "${args[@]}"

I'll poke at the script a bit. Something must have changed recently.

@tpasternak
Copy link
Collaborator

Can we close the issue then?

@AlexBurdu
Copy link
Author

Yes, please. Thank you for helping out!

@tpasternak
Copy link
Collaborator

We need to provide better output error for that, we even got 1-star review because of that recently 😅

https://plugins.jetbrains.com/plugin/8609-bazel-for-intellij/reviews#90022

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 more-data-needed Awaiting response from issue author product: IntelliJ IntelliJ plugin topic: external dependencies type: bug
Projects
None yet
Development

No branches or pull requests

5 participants