-
Notifications
You must be signed in to change notification settings - Fork 305
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
Plugin fails to sync after trying to run bazel dump_repo mapping #6807
Comments
@imarban what's your bazel version? |
Sorry, I forgot to add: 7.3.1 |
May I ask you if you have any specifc flags in bazelrc? We are aware of the problem, but can't really reproduce it. |
The issue linked seems to be about |
Interesting, sorry for this obvious recommendation, but can you please double-check if you set the right |
I dug more and found another piece of stack trace that is relevant:
It seems there is an issue reading the output of I'm trying to understand if I can influence the output of |
As a workaround, please double-press shift, find Registry there and disable bazel.read.external.workspace.data. We'll fix the issue next week cc @mtoader any ideas why this could happen? |
nvm, that might be a generic issue in the process spawner, maybe we don't wait until whole output is printed |
Great! The feature flag works perfectly :). I can confirm, this is happening because we augment the info printed by Bazel, hence it can't be parsed as JSON by the plugin. It's an edge case for the plugin to consider, though. |
How is the info augmented? The scraper there requires the proper json output from the command though. As a meta issue. |
We append a string that helps with debugging (IMO we shouldn't do it, and can look into removing it). But yeah, a failure from |
@imarban so I don't think we can correctly handle that. We can have better recovery ofc. I would recommend you to push the augmented data to stderr, or skip it for this case. Without that you won't be able to use external label completions - one of our greatest features developed recently by @mtoader :) |
I'm adding silent failures now but the parsing is a different story. @imarban For background:
So augmentation is probably a no-no in this case. |
@mtoader no hurry, we have a workaround |
Yeah, not much the plugin can do if the output does not adhere to the output format that you would get from standard bazel. I can fix that for our setup. Thanks for working on silent failures :) - I think printing a WARN message indicating that external repositories completion won't be available would be ideal. |
@tpasternak PR is up |
Problem
The plugin fails during Incremental Syncs with "Error:Could not run Bazel mod dump_repo_mapping". Upon inspecting the logs, this seems to be the relevant stack trace:
Expected
The plugin syncs successfully by handling the error better and/or fixing the underlying issue.
Which category does this issue belong to?
PyCharm
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Unsure if this is specific to my repository setup but just going from 2024.08.27.0.1 to 2024.09.10.0.1 breaks it for me.
Which Intellij IDE are you using? Please provide the specific version.
PyCharm 2024.2.3
What programming languages and tools are you using? Please provide specific versions.
Python: 3.9, Bazel: 7.3.1
What Bazel plugin version are you using?
2024.09.10.0.1
Have you found anything relevant by searching the web?
Issue #6664 for which a few commits have merged seems to be in play here.
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: