Comments (5)
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 //.../vendor/...:%go_test
.
from bazel-tools.
Why cannot you put all your delete //services/myservice/vendor/...:%go_test
commands into a file?
from bazel-tools.
@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 //.../vendor/...:%go_test
still won't work when passed as an argument to buildozer directly, but supporting arguments in addition to the commands file would allow us to keep our current pattern, but using bazel run
rather than an external buildozer binary.
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.
from bazel-tools.
Ok, I understand your use case now, thank you. Feel free to submit a PR (don't forget to sign the CLA).
However, if I were you, I'd instead do these two things:
- Open an issue (or a PR) with buildozer to add support for label wildcards like what you need
//.../vendor/...:%go_test
- Instead of recommending engineers to run
buildozer delete //services/myservice/vendor/...:%go_test
add a bazel target that generates the commands file with directories that you want fixed. Use something likefind . -type d -name vendor
in the script. And then have the buildozer rule depend on that generated commands file. That way your engineers would not need to maintain that pattern per service and only runbazel run //:buildozer
to fix all vendor folders. This may require some experimentation withglob()
to declare dependencies of that generator rule... I'm not 100% it will work nicely, but worth a try.
from bazel-tools.
I think this was implemented in #107.
from bazel-tools.
Related Issues (20)
- Failed to send SIGTERM, sending SIGKILL HOT 1
- roadmap for nogo, go modules, and generated code HOT 4
- Golangci-lint on generated code HOT 2
- Do not hard code version HOT 2
- Action Required: Fix Renovate Configuration
- Silence output in serial mode HOT 2
- Symlink cycle HOT 1
- Multirun cannot find bash runfiles HOT 7
- golangci-lint rule should cache output results HOT 2
- golangcilint unable to load external deps HOT 1
- Run golangci-lint in a subfolder HOT 2
- Pick up default config file for golangci.yml HOT 1
- [multirun] ctrl-c will leave the started processes running HOT 3
- Fix $@ expansion
- [multirun] shorter labels HOT 3
- Support data attribute in multirun command HOT 2
- Support make variable substitution in command.args HOT 6
- Buildkite builds cannot report status
- use of multirun with ibazel HOT 2
- golangcilint: errors on generated file imports HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bazel-tools.