-
Notifications
You must be signed in to change notification settings - Fork 38
Support running without command file #2
Comments
I don't see how being able to pass commands via command line changes anything? It will still not be possible to specify labels like |
Why cannot you put all your |
@ash2k Doing so would require us to continually keep our commands file updated with all the paths we wanted buildozer to manage. That's a lot of paths owned by a lot of teams so I think that pattern would break down pretty fast. You're correct that the wildcard i.e. Today our documentation instructs engineers to run the following to update their BUILD files for whatever path of the monorepo they're working on: $ bazel run //:gazelle -- fix services/myservice
$ buildozer delete //services/myservice/vendor/...:%go_test I'd like to be able to simply change that documentation to be: $ bazel run //:gazelle -- fix services/myservice
$ bazel run //:buildozer -- delete //services/myservice/vendor/...:%go_test I feel that this is a more sustainable/maintainable pattern than having a large group of people maintain a buildozer commands file and run buildozer against the entire monorepo regularly. |
Ok, I understand your use case now, thank you. Feel free to submit a PR (don't forget to sign the CLA).
|
I think this was implemented in #107. |
fix: change atlassian path to ash2k path, fix atlassian#2
Hello,
I'd like to use this convenience buildozer rule, but wish it were a little less opinionated. Currently it seems to require Buildozer commands be fed in via a file while I would prefer to pass them in as an argument, for example
bazel run //:buildozer -- somecommand
.The context here is that for historical reasons my Bazel monorepo has a lot of Go vendor directories. We're also using an older Go vendoring tool that helpfully generates
go_test
rules for said vendor directories. This means our BUILD file generation strategy looks something like:I'm not a Bazel expert and could be wrong, but I don't believe there's any way to specify a label like
//.../vendor/...:%go_test
- if there were I'd be happy to throw such a command in//:buildozer_commands.txt
and stick with the existing pattern.The text was updated successfully, but these errors were encountered: