Skip to content

Conversation

fzakaria
Copy link
Contributor

@fzakaria fzakaria commented Feb 20, 2025

IntelliJ IDE uses a query with no arguments which seems to cause havoc when this is run via aspect.

I added support to check for --tool_tag and not prompt the user for a query selection to better handle this usecase.

fixes #813

Test plan

> /Users/fzakaria/code/github.com/aspect-build/aspect-cli/bazel-bin/cmd/aspect/aspect_/aspect query --tool_tag=ijwb:IDEA:ultimate "--override_repository=intellij_aspect=/Users/fzakaria/Library/Application Support/JetBrains/IntelliJIdea2024.1/plugins/ijwb/aspect" --override_repository=intellij_aspect_template=/Users/fzakaria/code/github.com/confluentinc/ce-kafka/.ijwb/aspect --output=label_kind --keep_going --query_file=/Users/fzakaria/code/github.com/confluentinc/ce-kafka/.ijwb/queries/query-13438905584701813446
> echo $?
2

IntelliJ IDE uses a query with no arguments which seems to cause havoc when
this is run via aspect.

I added support to check for `--tool_tag` and not prompt the user
for a query selection to better handle this usecase.

fixes aspect-build#813
Copy link

aspect-workflows bot commented Feb 20, 2025

Test

11 test targets passed

Targets
//integration_tests/aspect:configure_test [k8-fastbuild] 45s
//integration_tests/aspect:flags_test [k8-fastbuild]     1m 25s
//integration_tests/aspect:help_test [k8-fastbuild]      36s
//integration_tests/aspect:hints_test [k8-fastbuild]     19s
//integration_tests/aspect:info_test [k8-fastbuild]      24s
//integration_tests/aspect:init_test [k8-fastbuild]      39s
//integration_tests/aspect:lint_test [k8-fastbuild]      1m 11s
//integration_tests/aspect:reenter_test [k8-fastbuild]   27s
//integration_tests/aspect:version_test [k8-fastbuild]   24s
//pkg/aspect/aquery:aquery_test [k8-fastbuild]           51ms
//pkg/aspect/cquery:cquery_test [k8-fastbuild]           57ms

Total test execution time was 6m 11s. 208 tests (95.0%) were fully cached saving 30s.


Buildifier      Format

feedback from @alexeagle that its from query_file not tool_tag
@fzakaria
Copy link
Contributor Author

@alexeagle changed to query_file

@alexeagle
Copy link
Member

thank you!

Copy link
Member

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @jbedard can sync this into our internal monorepo which is the SoT

@fzakaria fzakaria changed the title Check for tool_tag when running queries Check for query_file when running queries Feb 21, 2025
@fzakaria
Copy link
Contributor Author

Nice!
Let me know when it releases; this has been a big pain point for our devs as they all use IntelliJ IDE Bazel Plugin.
(I'm surprised no one has raised this issue)

@alexeagle alexeagle closed this Feb 21, 2025
@alexeagle alexeagle closed this Feb 21, 2025
jbedard added a commit that referenced this pull request Feb 25, 2025
Synced from #814 by
fzakaria:

IntelliJ IDE uses a query with no arguments which seems to cause havoc
when this is run via aspect.

I added support to check for `--tool_tag` and not prompt the user for a
query selection to better handle this usecase.

Fixes #813

### Changes are visible to end-users: yes

- Searched for relevant documentation and updated as needed: yes
- Breaking change (forces users to change their own code or config): no
- Suggested release notes appear below: yes

Support running queries via `--query_file`

### Test plan

```
> /Users/fzakaria/code/github.com/aspect-build/aspect-cli/bazel-bin/cmd/aspect/aspect_/aspect query --tool_tag=ijwb:IDEA:ultimate "--override_repository=intellij_aspect=/Users/fzakaria/Library/Application Support/JetBrains/IntelliJIdea2024.1/plugins/ijwb/aspect" --override_repository=intellij_aspect_template=/Users/fzakaria/code/github.com/confluentinc/ce-kafka/.ijwb/aspect --output=label_kind --keep_going --query_file=/Users/fzakaria/code/github.com/confluentinc/ce-kafka/.ijwb/queries/query-13438905584701813446
> echo $?
2
```

Closes #814

Co-authored-by: Farid Zakaria <fzakaria@confluent.io>
GitOrigin-RevId: bf38a5b5e7d9ace6eb7d7719887cde69fc125783
jbedard added a commit that referenced this pull request Feb 25, 2025
Synced from #814 by
fzakaria:

IntelliJ IDE uses a query with no arguments which seems to cause havoc
when this is run via aspect.

I added support to check for `--tool_tag` and not prompt the user for a
query selection to better handle this usecase.

Fixes #813

### Changes are visible to end-users: yes

- Searched for relevant documentation and updated as needed: yes
- Breaking change (forces users to change their own code or config): no
- Suggested release notes appear below: yes

Support running queries via `--query_file`

### Test plan

```
> /Users/fzakaria/code/github.com/aspect-build/aspect-cli/bazel-bin/cmd/aspect/aspect_/aspect query --tool_tag=ijwb:IDEA:ultimate "--override_repository=intellij_aspect=/Users/fzakaria/Library/Application Support/JetBrains/IntelliJIdea2024.1/plugins/ijwb/aspect" --override_repository=intellij_aspect_template=/Users/fzakaria/code/github.com/confluentinc/ce-kafka/.ijwb/aspect --output=label_kind --keep_going --query_file=/Users/fzakaria/code/github.com/confluentinc/ce-kafka/.ijwb/queries/query-13438905584701813446
> echo $?
2
```

Closes #814

Co-authored-by: Farid Zakaria <fzakaria@confluent.io>
GitOrigin-RevId: bf38a5b5e7d9ace6eb7d7719887cde69fc125783
jbedard added a commit that referenced this pull request Feb 25, 2025
Synced from #814 by
fzakaria:

IntelliJ IDE uses a query with no arguments which seems to cause havoc
when this is run via aspect.

I added support to check for `--tool_tag` and not prompt the user for a
query selection to better handle this usecase.

Fixes #813

### Changes are visible to end-users: yes

- Searched for relevant documentation and updated as needed: yes
- Breaking change (forces users to change their own code or config): no
- Suggested release notes appear below: yes

Support running queries via `--query_file`

### Test plan

```
> /Users/fzakaria/code/github.com/aspect-build/aspect-cli/bazel-bin/cmd/aspect/aspect_/aspect query --tool_tag=ijwb:IDEA:ultimate "--override_repository=intellij_aspect=/Users/fzakaria/Library/Application Support/JetBrains/IntelliJIdea2024.1/plugins/ijwb/aspect" --override_repository=intellij_aspect_template=/Users/fzakaria/code/github.com/confluentinc/ce-kafka/.ijwb/aspect --output=label_kind --keep_going --query_file=/Users/fzakaria/code/github.com/confluentinc/ce-kafka/.ijwb/queries/query-13438905584701813446
> echo $?
2
```

Closes #814

Co-authored-by: Farid Zakaria <fzakaria@confluent.io>
GitOrigin-RevId: bf38a5b5e7d9ace6eb7d7719887cde69fc125783
jbedard added a commit that referenced this pull request Feb 26, 2025
Synced from #814 by
fzakaria:

IntelliJ IDE uses a query with no arguments which seems to cause havoc
when this is run via aspect.

I added support to check for `--tool_tag` and not prompt the user for a
query selection to better handle this usecase.

Fixes #813

### Changes are visible to end-users: yes

- Searched for relevant documentation and updated as needed: yes
- Breaking change (forces users to change their own code or config): no
- Suggested release notes appear below: yes

Support running queries via `--query_file`

### Test plan

```
> /Users/fzakaria/code/github.com/aspect-build/aspect-cli/bazel-bin/cmd/aspect/aspect_/aspect query --tool_tag=ijwb:IDEA:ultimate "--override_repository=intellij_aspect=/Users/fzakaria/Library/Application Support/JetBrains/IntelliJIdea2024.1/plugins/ijwb/aspect" --override_repository=intellij_aspect_template=/Users/fzakaria/code/github.com/confluentinc/ce-kafka/.ijwb/aspect --output=label_kind --keep_going --query_file=/Users/fzakaria/code/github.com/confluentinc/ce-kafka/.ijwb/queries/query-13438905584701813446
> echo $?
2
```

Closes #814

Co-authored-by: Farid Zakaria <fzakaria@confluent.io>
GitOrigin-RevId: bf38a5b5e7d9ace6eb7d7719887cde69fc125783
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Issue with IntelliJ sync
2 participants