bazel-contrib / bazel-contrib/buildtools

[buildozer] unusedLoads removes loads of structs

Open
#1,379 0 comments 0 reactions 0 assignees View on GitHub
bug P2
Dominant language
Go
Stars
1.2k
Forks
471
Avg merge
2d 22h
Merged PRs (30d)
13

Description

If you run `buildozer 'fix unusedLoads|//src/foo:__pkg__'` on a file that loads a `struct` from some `.bzl` file and is actively using it, I'm observing that buildozer erroneously removes the load.

I'm not sure if there's a test for this or not, or if I'm simply using the feature wrong. Please let me know if I'm mistaken!

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported `buildozer 'fix unusedLoads|//src/foo:__pkg__'` behavior with a file that loads and uses a struct from a `.bzl` file. Find the `unusedLoads` implementation and any related tests; done means an actively used struct load is retained, with regression coverage if the existing tests support it.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.