-
Notifications
You must be signed in to change notification settings - Fork 540
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
Proposal: Resolve In Glide Cache Instead of Vendor #492
Comments
This is what i would prefer. I think the global cache lock is a good idea, and most people who want multiple glide processes can have multiple cache directories (each with their own lock). It seems like it would also make it easier to support updating individual vendored packages at a time. |
Yep, big +1. Also, this is what vsolver does already. If you're seriously considering merging in vsolver anytime soon, you might want to hold off on doing this work, as it'll be redundant. That doesn't necessarily mean #384 itself per se, as that's about using the solving engine for making actual decisions. It could just mean merging in vsolver in order to use the |
@sdboyer I'm not sure when vsolver will be merged in (mostly because I'm behind on it). This is a major change no matter when or how it happens and I wanted to open it up for discussion. |
@mattfarina sure, makes sense. It's near enough to MVP now that I do have docs near the top of my TODO list. Those should help. Work towards a central cache might also be an opportunity to catch up with the piece that's more easily grokked (the |
would it be possible to customize the cache location? It would be great if you could pass as a parameter an alternative locaion such as a different GOPATH where you already have the correct origin/version of the dependencies, so that they would not have to be fetched over networked. For us it would greatly speed up the builds. |
@dmitris you can set the location of the cache, though somewhat indirectly - you set the location of glide's "home", and the cache is located under there. So, no, you can't set it to an existing GOPATH. There are two separate things in your question, though, so lemme address them separately
In the general case, the only safe assumption we can make is that GOPATH is an unkempt mess of versions, specifically because GOPATH tends to have been populated by The good news there is that the init process is generally responsible for pulling the information from your GOPATH into the
This is much more doable, and is in part what the |
@dmitris A
The general open source case where you get it from the root source is easy. Managing the complicated cases get's harder. But, using the cache (which can be hot and update only the missing bit) can allow for some real speed improvements. It's in place but turned off because the copy from cache element is too slow. It's implemented in a cross platform way (to support things like windows). For many the network is actually faster. Part of this end up making the cache operations much faster. For example, if a commit being installed was already in the cache there's no reason to update. Exporting (using the vcs optimized tools) is amazingly fast and can be used. |
This was just merged. |
@mattfarina not sure how as I have not looked at the code for the implementation, but this is causing some issues with my docker (~1.1x) containers/environments. I have a workflow where I directly mount my local repository into a golang workspace within a docker container. This is so that I can restart running programs by just doing a
The issue is that
A temporary workaround that I've found was something like:
Which is very sad. Is this a known issue? Any ideas on how to deal with this in a saner fashion? Wont fix? Or will fix? 😄 |
Oh! I just saw #554 - which I believe is the same issue. Sorry for the spam, thanks for reading :) |
Currently, Glide fetches packages (as repos) into the
vendor/
directory and then resolves the dependency tree. As new packages are needed they are fetched and set to the needed version.This proposal is to break this process apart. Packages would be fetched and versions resolved in the Glide cache and then exported (just the versions source without vcs information) to the
vendor/
directory.Pros:
vendor/
directory in a bad state that needs to be fixed. This would no longer happen as only when Glide finds a new good state would it put source invendor/
.--cache
,--strip-vcs
,--update-vendored
would all no longer be needed.Cons:
vendor/
directory, make changes to it from there, and push those changes you wouldn't be able to do that while Glide was working on your tree.There are likely more pros and cons. If you know of any please note them in the comments.
Thoughts?
The text was updated successfully, but these errors were encountered: