Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Dep should ignore packages only imported in files with tools build tag #2112

Closed
@johanbrandhorst

Description

@johanbrandhorst

Hi!

I recently tried migrating one of my repositories to go modules (sorry!). I had some tool dependencies and the current go modules way of declaring such are through a tools.go file with a tools build tag.

This works fine until you have someone using dep depending on a package that contains your tools.go file. It seems dep, when resolving the transitive dependencies of such a dependency, concludes that these tool dependencies are also part of the graph. I think this is incorrect behaviour.

I propose that dep should ignore files that use the build tag tools.

Related issue: #463.
My repo with the problematic transative import behaviour: johanbrandhorst/certify#48.

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