Checked in bazel run configurations in .ijwb/.run
are unstable
#3259
Labels
awaiting-maintainer
Awaiting review from Bazel team on issues
product: IntelliJ
IntelliJ plugin
type: bug
Some users in our repo have started creating and checking in run configurations in the
.ijwb/.run
directory. When a run configuration is added to this directory, it is loaded whenever the repo is opened.The issue is that these run configurations are unstable when generated by the bazel plugin. Depending on much the plugin knows about the target kind, it will generate different run configurations. This dirties the repo and is confusing. Users never know if they're supposed to check in the changed file or not.
The source of this instability appears to be these lines:
intellij/base/src/com/google/idea/blaze/base/run/BlazeCommandRunConfiguration.java
Lines 255 to 260 in ab966d7
Here, the correct
handlerProvider
is detected. This depends on the target state and target kind. When a run configuration is modified, and the target is not synced, the kind is set tonull
. This causesBlazeCommandGenericRunConfigurationHandlerProvider
to be selected. If the target is synced and the plugin knows the rule kind isjava_binary
it will selectBlazeJavaRunConfigurationHandlerProvider
. When this change is synced back to the run config in.ijwb/.run
it dirties the repo.I'm currently testing out the instructions provided here on how to share run configs, but it would be nice if the bazel plugin supported checking in
.ijwb/.run
.This issue was also reported here #2575 but it was closed without resolution.
The text was updated successfully, but these errors were encountered: