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

Replace go list#341

Merged
freeformz merged 1 commit intomasterfrom
list
Dec 8, 2015
Merged

Replace go list#341
freeformz merged 1 commit intomasterfrom
list

Conversation

@freeformz
Copy link
Copy Markdown

Main motivation is so that we can pick up packages across architectures and to have more control over the list of packages.

I consider this the first in several structural changes.

Most additions are inside of list.go.

For each run of listPackage a depScanner is made to track already seen packages (inspired by Scanner). That list is not cached between executions.

The current implementation of listPackage attempts to resolve vendor/ a bit better than we used to, but other changes need to be implemented elsewhere in godep before that can be fully realized.

All existing tests pass, but this doesn't mean it actually works better (yet).

/cc @kr @neurogeek

Fixes #271

@kr
Copy link
Copy Markdown
Member

kr commented Dec 2, 2015

I think this is the right approach in the long run. It had to happen eventually.

pkg.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this scans all comments, but build tags have to appear near the top of the file. Might get false positives from looking at too many comments.

Also… is this necessary at all? Why not include "ignore" files too for the purposes of dependencies? Ignore doesn't necessarily mean "this file is garbage", it simply means "don't build this file into the package", same as any other unsatisfied constraint.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not necessary, at least not now. This was left over from a different experiment. I've removed this method.

@freeformz
Copy link
Copy Markdown
Author

@kr sorry about the noise a bunch of stuff in pkg.go slipped in from another, earlier experiment.

@freeformz
Copy link
Copy Markdown
Author

Would close #337

Main motivation is so that we can attempt to pick up packages across
architectures and to have more control over the list of packages.

I consider this the first in several structural changes.

Most additions are inside of list.go.

For each run of listPackage a depScanner is made to track already seen
packages (inspired by Scanner). That list is not cached between
executions.

The current implementation of listPackage attempts to resolve vendor/ a
bit better than we used to, but other changes need to be implemented
elsewhere in godep before that can be fully realized.

All *existing* tests pass, but this doesn't mean it actually works
*better*.

A test was added to show that we fix #271.
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