bazel: generate //go:generate sh generate.sh within Bazel#61029
bazel: generate //go:generate sh generate.sh within Bazel#61029craig[bot] merged 1 commit intocockroachdb:masterfrom
//go:generate sh generate.sh within Bazel#61029Conversation
|
Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. I have added a few people who may be able to assist in reviewing: 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
| outs = ["wkt_generated.go"], | ||
| cmd = """ | ||
| $(location @org_golang_x_tools//cmd/goyacc) -o $(location wkt_generated.go) -p "wkt" $(location wkt.y) | ||
| cat $(location wkt_generated.go) | sed -e 's/wktErrorVerbose = false/wktErrorVerbose = true/' > wkt_generated.go.tmp |
There was a problem hiding this comment.
Use the -i option to sed so you don't have to make a temporary file yourself.
There was a problem hiding this comment.
-i works different on OSX and linux :\ (-i "" in OSX, -i in linux) -- theyre not compatible...
There was a problem hiding this comment.
^^
Yes I tried that and make it work, but at my local (OSX) adding an additional flag .
So I think is better to stay with this rename file strategy to avoid issues with -i as @otan said
pkg/geo/wkt/BUILD.bazel
Outdated
|
|
||
| # Based on pkg/geo/wkt/generate.sh file | ||
| genrule( | ||
| name = "wtk-generated", |
70a81ce to
e0a021d
Compare
|
Thank you for updating your pull request. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
e0a021d to
5c011e9
Compare
|
Thank you for updating your pull request. Before a member of our team reviews your PR, I have some potential action items for you:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
a7f013b to
e5a5012
Compare
|
bors r=rickystewart |
|
Build failed: |
|
looks like its failing lint |
As gazelle is not taking care by itself in any changes related to //go:generate ... (anything that has a go run as a prefix) we are creating a genrule and we need to handle every each of them separately. We are creating a genrule based on pkg/geo/wkt/generate.sh to avoid change that script as it seems it is only used to "change" a flag (has a TODO task inside it). Release note: None Release justification: non-production code change
e5a5012 to
b8e5e4d
Compare
|
bors r+ |
|
Build failed (retrying...): |
|
Build succeeded: |
Part of #57787 work.
As gazelle is not taking care by itself in any changes related to //go:generate ... (anything that has a go run as a prefix) we are creating a genrule and we need to handle every each of them separately.
We are creating a genrule based on pkg/geo/wkt/generate.sh to avoid change that script as it seems it is only used to "change" a flag (has a TODO task inside it).
Release note: None
Release justification: non-production code change