Repository navigation
0.5.1
Pre-release
Pre-release
Go rules
- Dependency checking is now strict:
go_library,go_binary, andgo_testmust now include a library indepsfor each package they import. Previously, transitive deps were allowed. This lets us speed up the build by only passing direct deps to the compiler. cgo_genruleis deprecated. It now just invokescgo_librarywithtags = ["manual"]. Please usecgo_librarydirectly when possible.- Several internal improvements were made to
cgo_library. We are planning to consolidate it withgo_librarysome time in the future. depsare now propagated through thelibraryattribute. This means, for example, ago_testrule doesn't need to repeat deps specified in ago_libraryunder test, though doing so is encouraged if thego_testreferences those dependencies itself.go_testwill now always change to the package directory before running test cases. This was previously broken for tests in external repositories.
Gazelle
- Generated .go files will now be included in rules that Gazelle creates. Gazelle discovers these files by looking at filenames in
outandoutsattributes of other rules in BUILD files. - Gazelle only generate BUILD files in
testdatadirectories if there are no .go files, BUILD files, or BUILD.bazel files in any subdirectory. Previously, Gazelle did not recurse intotestdatadirectories at all. - Go release tags (e.g.,
go1.8) are treated as unknown (neither true nor false). Gazelle will include files with these tags, whether or not they are negated. This avoids some confusing situations where Gazelle is compiled with a different version of Go than the one used to build a project. - Several improvements for merging with existing files.
coptsandclinkoptsattributes are now merged.visibilitywon't be added if apackagerule with adefault_visibilityattribute is present. Comments are preserved on existing elements.depsare now sorted according to buildifier rules.