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

Test-only dependencies are added to manifest.json #340

Closed
zombiezen opened this issue Mar 20, 2017 · 1 comment
Closed

Test-only dependencies are added to manifest.json #340

zombiezen opened this issue Mar 20, 2017 · 1 comment

Comments

@zombiezen
Copy link

I would like dep to treat my test-only dependencies differently than other dependencies. My use case is: I'm publishing a library and that library's tests depend on godebug. I don't want to bloat the vendor directory of projects that import my library, since I don't use it in the implementation, but it seems wrong to list them in my manifest.json. Is this intended behavior? Some docs on manifest.json would go a long way here.

I originally found #306, but that issue appears to be arguing the opposite of what I'd like.

@sdboyer
Copy link
Member

sdboyer commented Mar 20, 2017

Hi, thanks for the issue!

This is definitely not a situation we'd want to have happen - unnecessary vendor bloat in dependees. Happily, though, we're already there. Unlike other comparable systems (npm, cargo, bundler, etc.), having a dependency listed in the manifest does not guarantee its presence in the result (lock or vendor). The real import graph decides what must be present; what's in the manifest just constrains/governs how that'll work. So, having your test-only deps in your manifest will have no impact on your dependees.

And, yeah...we're working on docs: #331 😄

@sdboyer sdboyer closed this as completed Mar 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants