-
Notifications
You must be signed in to change notification settings - Fork 4
Bring bazel generate
up-to-date with make bazel-generate
at HEAD
#5
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I think it's better to duplicate those 3 lines in-line here, as this diff ends up coupling the crdb SHA and the one here. It becomes difficult to amend that script/location once dev
is stable, as it could behave differently depending on which crdb SHA is currently checked out.
(It's also more of a "go-ism")
234bda1
to
5f97d34
Compare
bazel-generate.sh
to generate Bazel files.bazel generate
up-to-date with make bazel-generate
at HEAD
Mm, well, I don't agree with that advice but I guess that's not the first time Rob Pike and I disagreed on something :p Now
The error message is incredibly uninformative so I don't know what this means. Any ideas? |
command := exec.Command("bazel", "run", "//pkg/cmd/generate-test-suites", fmt.Sprintf("--run_under='cd %s && '", cwd))
command.Stderr = os.Stderr
command.Stdout = os.Stdout
if err := command.Run(); err != nil {
return err
}
return nil
// TODO: Capture output + write to pkg/BUILD.bazel.
I tried capturing the stdout/err for the raw exec command, and I think the |
Oh I think it's a string escape issue ( buf, err := exec.Command("bazel", "run", "//pkg/cmd/generate-test-suites", "--run_under", fmt.Sprintf("cd %s &&", cwd)).Output()
if err != nil {
return err
}
return ioutil.WriteFile(path.Join(cwd, "pkg/BUILD.bazel"), buf, 0644) |
(we could also carry over the re-ordering from cockroachdb/cockroach#60939) |
5f97d34
to
54a4752
Compare
That works, thanks for your help!! |
54a4752
to
6c54f71
Compare
No description provided.