bazelbuild / intellij

IntelliJ plugin for Bazel projects
https://ij.bazel.build/
Apache License 2.0
761 stars 303 forks source link

Triggering a new Go Run Configuration via keyboard shortcut results in `--test_filter=^null$` #4582

Open abayer opened 1 year ago

abayer commented 1 year ago

Description of the bug:

When I invoke a Go test by clicking the green arrow next to the test function, it correctly creates a Run Configuration with, for example, --test_filter=^TestUnquoteErrors$. But if I try to run a test by hitting the keyboard shortcut to create a new configuration and run it, instead, the created Run Configuration has --test_filter=^null$.

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

Clone https://github.com/bazelbuild/buildtools.git, navigate to https://github.com/bazelbuild/buildtools/blob/a6ca93fd072d573a22963c6213abeaca99e6b740/build/quote_test.go#L133, and hit whatever the configured keyboard shortcut you have is for "Run context configuration". A Run Configuration will be created, and in its "Bazel flags", you'll find --test_filter=^null$.

Then try clicking on the green arrow by that test function, and a new Run Configuration will be created (with a (1) suffix on its name), and its "Bazel flags" will contain --test_filter=^TestUnquoteErrors$.

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

IntelliJ IDEA 2022.3.3 (Ultimate Edition), Build #IU-223.8836.41

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

Go

What Bazel plugin version are you using?

2023.02.22.0.1-api-version-223

Have you found anything relevant by searching the web?

Nope, sorry!

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

I really should have opened an issue earlier - I started using Bazel in IntelliJ in November 2022, and hitting the keyboard shortcut worked fine initially. At some point since then (I think it was in January, but am not 100% sure), after upgrading the Bazel plugin (again, I can't remember the specific versions I upgraded from/to), this started happening. I'm not nearly familiar enough with the plugin's code to say this with any confidence, but I wonder if the change in #4131 might not work correctly with the "Run context configuration" keyboard shortcut?

github-actions[bot] commented 1 year ago

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] commented 12 months ago

This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team (@bazelbuild/triage). Thanks!

abayer commented 10 months ago

I completely forgot about this bug and just hit it again with 2023.11.07.0.1-api-version-232 installed. heh.

blorente commented 6 months ago

Unfortunately, It's unlikely that I'll have the time to work on this issue in the foreseeable future. I'd be happy to review a PR or give pointers if you'd like to give it a shot! Keeping open just in case someone wants to contribute a fix.

github-actions[bot] commented 1 week ago

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.