Skip to content
This repository has been archived by the owner on Feb 26, 2019. It is now read-only.

Replace go list #341

Merged
merged 1 commit into from
Dec 8, 2015
Merged

Replace go list #341

merged 1 commit into from
Dec 8, 2015

Conversation

freeformz
Copy link

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
Member

kr commented Dec 2, 2015

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

return nil, nil, err
}
if len(f.Comments) > 0 {
for _, c := range f.Comments {
Copy link
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
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
Author

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

@freeformz
Copy link
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