Skip to content

gopackagesdriver does not include package-local sources from dependencies for non-external tests #357

Description

@hartblanc

When calling the gopackagesdriver on a non-external test which depends on a go_library that it tests, the tested go_library's source files are not included in the GoFiles in the response.

This causes tools which use analysis on these files to report undefined symbols where the symbols are defined in the tested go_library's source file

config_test.go:18:12: undefined: AuditOpts
testifylint: analysis skipped due to errors in package

I have a fix for this in my fork which includes the package local sources in the _go_pkg_info call for non-external tests, in a very similar way to how they are exposed to the internal go_library rule for the go_test.

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