Skip to content

gopackagesdriver returns incorrect ExportFile for dependencies in subrepos #355

Description

@hartblanc

When calling the gopackagesdriver for a file with a dependency in a subrepo the module path is missing in the ExportFile field in the response.

For example, I see:

/home/callum/core3/src/plz-out/gen/third_party/go/google.golang.org_protobuf/protowire.a

rather than

/home/callum/core3/src/plz-out/gen/third_party/go/google.golang.org_protobuf/encoding/protowire/protowire.a

This is due to a bug in the logic in packageinfo.WritePackageInfo which sets the export file for subrepo targets. I have a fix in my fork for this that resolves the issue.

This issue causes tools which rely on these export files to fail.

For example, running testifylint with the go packages driver on a file with stdlib dependencies surfaces this error message.

testifylint: internal error: package "google.golang.org/protobuf/types/known/timestamppb" without types was imported from "core3/common/go/api/validate"

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