bazelbuild / rules_go

Go rules for Bazel
Apache License 2.0
1.36k stars 643 forks source link

Use go yacc in rules_go #1928

Open achew22 opened 5 years ago

achew22 commented 5 years ago

Looking around the repo, I've been unable to find a way to invoke the go yacc compiler on a .y file. Is that correctly supported by rules_go?

jayconrod commented 5 years ago

There's no rule for this in rules_go right now.

I think the right way to do this would be to write a small rule that provides GoSource so it can be embedded in a go_library. It could live in //extras.

As prior art, the buildtools repo has a genrule in https://github.com/bazelbuild/buildtools/blob/master/build/build_defs.bzl.