Split a large BUILD file into multiple files #3328
-
Hi, I have a very large BUILD file for third_party/go, is it possible to split it into multiple files and let plz to load them while treat them as one file? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You could probably do it with subincludes, but I wouldn't recommend it. There's a pretty clean alternative if you use
You can then refer to the module as It doesn't work out as cleanly as this if you use
you'd end up with the module at There shouldn't really be a performance problem associated with |
Beta Was this translation helpful? Give feedback.
You could probably do it with subincludes, but I wouldn't recommend it. There's a pretty clean alternative if you use
go_module
, though - you could split the module import paths on forward slash characters and have a separate intermediate directory for each component, e.g.You can then refer to the module as
//third_party/go/github.com/agnivade/levenshtein
. You'd have a lot ofBUILD
files this way, but each one would be tiny.It doesn't work out as cleanly as this if you use
go_repo
, becausego_repo
defines a subrepo insid…