Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatten the dependency tree by default #108

Closed
technosophos opened this issue Oct 17, 2015 · 3 comments
Closed

Flatten the dependency tree by default #108

technosophos opened this issue Oct 17, 2015 · 3 comments
Assignees
Milestone

Comments

@technosophos
Copy link
Member

Having now used the last few versions of Glide with some big projects like Kubernetes and Deis, I am discovering that nesting dependencies in deep vendor trees is a really horrible experience for developers. In one case, we saw a particular dependency download 22 times (Docker inside of one of the Deis projects). In several other cases, we are seeing vendored paths cause difficult to resolve package interdependency issues (two packages use a common third package, but because they have different vendor directories, the common paths are broken)

So I am working on a complete refactor. We used to do this:

vendor/
    |
    |- github.com/foo/bar/vendor
                             |- github/foo/baz

We will not be collapsing all dependencies to the top vendor directory:

vendor/
    |
    |- github.com/foo/bar
    |- github/foo/baz

This will give all dependencies the same ancestry chain.

Right now, we do not have a solution for the case where two packages have significantly different versions of the same dependency. The current strategy is as follows:

  • First dependency to declare that it needs a Ref wins
  • Any subsequent dependency that declares the same package, but a different Ref, will generate a warning
  • If you want to explicitly control, you should declare the package in the top glide.yaml

I'm still working on the initial version, but for projects like Kubernetes, this shaves over 45 minutes off of the initial glide up time (most being network time, so YMMV).

@technosophos
Copy link
Member Author

Other changes coming with this:

  • I am deprecating the --import flag. This will now be the default.
  • I am deprecating the --delete-flatten flag, since it doesn't do anything in this context.

I am not sure whether we need to set up an option to allow only shallow loops through the repo (e.g. a --no-recursive option). If we want that, I can add it.

technosophos added a commit that referenced this issue Oct 17, 2015
@mattfarina mattfarina added this to the 0.7.0 milestone Oct 20, 2015
@mattfarina
Copy link
Member

@technosophos what will it take to close this now that the flatten branch has been merged to master?

@technosophos
Copy link
Member Author

Now that it's merged, I think we can call it closed. I'm sure we'll have related bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants