Skip to content

gopackagesdriver produces incorrect packages when go_library contains sources in different directories. #360

Description

@hartblanc

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions