Skip to content
This repository was archived by the owner on Mar 8, 2026. It is now read-only.

Add -a flag to vendor regardless of build tags#337

Closed
gyuho wants to merge 1 commit intotools:masterfrom
gyuho:vendor_build_tags
Closed

Add -a flag to vendor regardless of build tags#337
gyuho wants to merge 1 commit intotools:masterfrom
gyuho:vendor_build_tags

Conversation

@gyuho
Copy link
Copy Markdown

@gyuho gyuho commented Nov 27, 2015

This adds a flag -a when people need to vendor everything regardless of build
tags. This fixes #271.

@gyuho
Copy link
Copy Markdown
Author

gyuho commented Nov 27, 2015

@freeformz This might be a little hacky but I tried it and it worked.

Easy example is https://github.com/boltdb/bolt. It has only one external dependency of golang.org/x/sys/unix in https://github.com/boltdb/bolt/blob/master/bolt_unix_solaris.go. If you don't godep in Solaris, it will spin out empty Godeps.json.

I cannot think of an easier way because go list command gets its list from go build command, which is very hard to change. This approach would give us what we want, I hope.

Please let me know if you have any feedback.

@gyuho
Copy link
Copy Markdown
Author

gyuho commented Nov 27, 2015

Just pushed another updates to walk through the raw Go files without go list command.

This adds a flag -i when people need to vendor everything regardless of build
tags. This fixes #271.
@gyuho gyuho changed the title Add -i flag to vendor regardless of build tags Add -a flag to vendor regardless of build tags Dec 2, 2015
@freeformz
Copy link
Copy Markdown

LoadPackages still uses go list. I opened a PR yesterday that removes go list and also solves the missing deps problem: #341, effectively making your -a just the way godeps works (at least AFAICT).

@freeformz freeformz mentioned this pull request Dec 2, 2015
@gyuho
Copy link
Copy Markdown
Author

gyuho commented Dec 2, 2015

Great. Thanks @freeformz . I will close this in favor of #341.

@gyuho gyuho closed this Dec 2, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vendor everything regardless of build tags

2 participants