bazel-contrib / bazel-contrib/buildtools

Buildozer remove_if_equal command should handle list values

Open
#1,140 3 comments 1 reaction 0 assignees View on GitHub
P3
Dominant language
Go
Stars
1.2k
Forks
470
Avg merge
2d 22h
Merged PRs (30d)
13

Description

Currently, it only supports attributes whose type is string or label: see https://github.com/bazelbuild/buildtools/blob/master/edit/buildozer.go#L420

It would be useful to have a single command for removing list-valued attributes such as deps. (The current alternative would be a script that e.g. uses `buildozer 'print name' 'print deps'` and post-processes the output to collect the list of targets on which to run `buildozer 'remove deps'`)

Contributor guide

Open the contributing guide

Research direction

Read edit/buildozer.go around line 420 and trace how remove_if_equal handles string and label attributes. Extend the command's behavior for list-valued attributes such as deps, and verify that matching list entries are removed while other values remain.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.