intellij icon indicating copy to clipboard operation
intellij copied to clipboard

`IDEA` conflicts with `GoLand` when using `import_run_configurations` feature of Project Views

Open auzhva opened this issue 3 years ago • 8 comments

Description of the bug:

.bazelproject files alow to export/import run configurations, using import_run_configurations feature - https://ij.bazel.build/docs/project-views.html#import_run_configurations

This allows to share run configurations across the teams.

But when one team member uses IntelliJ IDEA Ultimate and the another one uses GoLand those two systems exports those files differently.

The difference appears to be only technical and boils down to BlazeGoRunConfigurationHandlerProvider (GoLand) vs BlazeCommandGenericRunConfigurationHandlerProvider (IDEA), but that generates a lot of noise in source control system and makes peoples' IDEs compete for that file.

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

  1. create .bazelproject file
  2. add some import_run_configurations
  3. Open it with IntelliJ IDEA, commit the file
  4. Open same with GoLand, check git diff
  5. Diff will be there (which should not be)

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

2022.2.3

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

Go

What Bazel plugin version are you using?

2022.10.18.0.1-api-version-222

Have you found anything relevant by searching the web?

Yes

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

Some parts that may be relevant for that:

  • https://github.com/bazelbuild/intellij/blob/master/golang/src/META-INF/go-contents.xml#L39
  • https://github.com/bazelbuild/intellij/blob/master/base/src/com/google/idea/blaze/base/run/confighandler/BlazeCommandGenericRunConfigurationHandler.java

auzhva avatar Nov 14 '22 12:11 auzhva

Hello! Sorry for the late response on this. Currently we're not (as far as I'm aware) looking into this. Would importing .bazelproject files be a suitable workaround for this case? You could have a common.bazelproject file with:

directories: ...

build_flags: ...

And then have some intellij.bazelproject and goland.bazelproject files, each with their run configurations:

# example: intellij.bazelproject
import "common.bazelproject"

import_run_configurations: ...

I know this is not perfect and ideally the run configurations wouldn't conflict, but ideally it will help enough until we can get to this work.

blorente avatar Jan 11 '23 10:01 blorente

Thank you for contributing to the IntelliJ repository! This issue has been marked as stale since it has not had any activity in the last 6 months. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-maintainer". Please reach out to the triage team (@bazelbuild/triage) if you think this issue is still relevant or you are interested in getting the issue resolved.

github-actions[bot] avatar Aug 05 '23 01:08 github-actions[bot]

Hi this is not stale and still relevant

auzhva avatar Aug 05 '23 13:08 auzhva

@auzhva , did you have a chance to try the solution I outlined above? If so, how did you find it?

blorente avatar Sep 19 '23 08:09 blorente

Hi,

As far as I see that would require to have separate run configs for IDEA and GoLand. If so, this is not feasible for our team, as it's quite a big team, that partially uses Ultimate+Go plugin, and partially GoLand. It's over 100 devs, and they have their preferences, so forcing them to use "the single right tool" is quite challenging. Having separate run configs also duplicates work.

We implemented a post-processing those run configs in pre-commit hook, so we just manually hack XMLs on commit to be always as if they are from IDEA, and not to generate unnecessary noise.

auzhva avatar Sep 19 '23 16:09 auzhva

Gotcha. I'm sorry but right now I don't have the bandwidth to work on this. I'd be happy to review a PR that fixes it, though.

blorente avatar Nov 21 '23 10:11 blorente

Thank you for contributing to the IntelliJ repository! This issue has been marked as stale since it has not had any activity in the last 6 months. It will be closed in the next 14 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.

github-actions[bot] avatar May 23 '24 01:05 github-actions[bot]

This is still relevant

auzhva avatar May 23 '24 10:05 auzhva

We are also encountering this!

wittekm avatar Nov 11 '24 18:11 wittekm

Unfortunately we don't have capacity to work on this now, I have to assign P3

tpasternak avatar Nov 12 '24 10:11 tpasternak

oh, it's already there :/

tpasternak avatar Nov 12 '24 10:11 tpasternak

Thank you for contributing to the IntelliJ repository! This issue has been marked as stale since it has not had any activity in the last 6 months. It will be closed in the next 14 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.

github-actions[bot] avatar May 15 '25 02:05 github-actions[bot]

It's still relevant

auzhva avatar May 15 '25 06:05 auzhva

Thank you for contributing to the IntelliJ repository! This issue has been marked as stale since it has not had any activity in the last 6 months. It will be closed in the next 14 days unless any other activity occurs. If you think this issue is still relevant and should stay open, please post any comment here and the issue will no longer be marked as stale.

github-actions[bot] avatar Nov 16 '25 02:11 github-actions[bot]