A valid go_library rule can contain go sources in different directories in some cases.
The simplest example of this is e.g. when a child directory is part of the same please package (i.e. it does not contain a BUILD file) and the go sources are in different directories but the same package (there are other cases though).
In these cases, the gopackagesdriver returns one package for each directory that contains go sources that is a child of the directory where the go_library is defined. This can cause source files to be missing (if the sources are in a parent directory) or to be distributed across different packages in the response. This causes consumers of the gopackagesdriver to produce undefined symbol errors when the symbols used within a package are defined in a source file that is either entirely missing, or present in another package.
A valid
go_libraryrule can contain go sources in different directories in some cases.The simplest example of this is e.g. when a child directory is part of the same please package (i.e. it does not contain a BUILD file) and the go sources are in different directories but the same package (there are other cases though).
In these cases, the gopackagesdriver returns one package for each directory that contains go sources that is a child of the directory where the
go_libraryis defined. This can cause source files to be missing (if the sources are in a parent directory) or to be distributed across different packages in the response. This causes consumers of the gopackagesdriver to produce undefined symbol errors when the symbols used within a package are defined in a source file that is either entirely missing, or present in another package.