Skip to content
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

Rename/refactor operations should update/check BUILD.bazel files too. #6211

Open
gspofford-lw opened this issue Mar 5, 2024 · 0 comments
Open
Assignees
Labels
awaiting-maintainer Awaiting review from Bazel team on issues P3 We're not considering working on this, but happy to review a PR. (No assignee) product: IntelliJ IntelliJ plugin type: feature request

Comments

@gspofford-lw
Copy link

gspofford-lw commented Mar 5, 2024

Description of the feature request:

This would be a feature for file-level operations and language-definition operations. If I rename a class in IntelliJ, IJ will rename the .java file to match, and it will also change the names of all references in Java code. However, even if that file is referenced directly in a BUILD.bazel file, it is not renamed. Ideally, the name change would take place everywhere. it is as though the BUILD.bazel is invisible to the operation.

Similarly, if I rename or delete a file (like a/b/c/Tiltfile), when I delete the file, IJ will prompt me to do a safe delete, looking for usages and appearances in text strings. It does not treat the specific usage in a BUILD.bazel file as a "usage", so if I choose only that option on safe delete, no warning will be raised. If I enable the check in comments and strings, it will actually miss it in the BUILD.bazel that uses the Tiltfile and find it in other random BUILD.bazel files (but not all of them, and not all places in the repo). I suspect a general IJ bug since it was not finding references elsewhere in the repo.
When I safe-delete a file, the Bazel add in will point out globs that include the file. For example, src/**/*..java. This is rather useless, I would rather that did not happen. It tells me that there is some interpretation of BUILD.bazel, so I am surprised it's not thorough enough to catch non-glob usages.

Without this feature, many refactorings that I perform require manual searching of references in BUILD.bazel files, which is the same experience as not using an IDE in the first place.

Which category does this issue belong to?

Intellij

What underlying problem are you trying to solve with this feature?

Developer productivity

What operating system, Intellij IDE and programming languages are you using? Please provide specific versions.

MacOS Sonoma 14.1, IJ 2023.4, Java and golang

Have you found anything relevant by searching the web?

I have looked and seen nothing

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

No response

@gspofford-lw gspofford-lw added awaiting-maintainer Awaiting review from Bazel team on issues type: feature request labels Mar 5, 2024
@github-actions github-actions bot added the product: IntelliJ IntelliJ plugin label Mar 5, 2024
@sgowroji sgowroji assigned mai93 and unassigned sgowroji and iancha1992 Mar 5, 2024
@mai93 mai93 assigned ujohnny and tpasternak and unassigned mai93 Mar 11, 2024
@tpasternak tpasternak added the P3 We're not considering working on this, but happy to review a PR. (No assignee) label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-maintainer Awaiting review from Bazel team on issues P3 We're not considering working on this, but happy to review a PR. (No assignee) product: IntelliJ IntelliJ plugin type: feature request
Projects
None yet
Development

No branches or pull requests

6 participants