-
Notifications
You must be signed in to change notification settings - Fork 879
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
submodule file conflicts break glide/git #581
Comments
Howdy, @vikstrous sorry you're running into trouble. Assuming you don't have any alterations to the SDK that you need to keep, the easiest way forward is to checkout a fresh copy of the SDK. For the benefit of others who have found this thread, I'll include instructions for folks using glide and otherwise. edit: the advice below doesn't address @vikstrous's problem. It applies only to people having trouble adopting the latest bits, not folks running into trouble with checking out older commits that didn't contain the submodule. That said, if I delete the vendor'd copy as mentioned below, glide does seem to work with all versions of the SDK. edit2: I cleared my glide cache, and I'm now able to repro this issue reliably. I'll work on this. Thanks for bringing it to my attention, @vikstrous. Glide
Go Get
|
This is not sufficient. `glide update` works by cloning the repo first, running get submodule init/update, then checking out the version specified in the glide.yaml file. By the time it has cloned master, and initialized submodules it's too late and checking out an old version will fail unless the submodule directory is deleted. There is no workaround without code changes to glide from what I can tell.
…On April 4, 2017 10:49:54 AM PDT, Martin Strobel ***@***.***> wrote:
Howdy, @vikstrous sorry you're running into trouble.
**Assuming you don't have any alterations to the SDK that you need to
keep**, the _easiest_ way forward is to checkout a fresh copy of the
SDK. For the benefit of others who have found this thread, I'll include
instructions for folks using glide and otherwise.
## Glide
1. `cd <project directory>/vendor/github.com/Azure`
2. `rm -rf azure-sdk-for-go`
3. `cd ../../..`
4. `glide install`
## Go Get
1. `cd $GOPATH/src/github.com/Azure/`
2. `rm -rf azure-sdk-for-go`
3. `go get -u github.com/Azure/azure-sdk-for-go`
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#581 (comment)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
|
Sorry @vikstrous, I'm having trouble repro'ing your issue. When I go to migrate our samples (e.g. Azure-Samples/network-go-manage-network-security-group) to the latest version, I don't get a conflict. Mind sharing some details about the version of glide you're using, maybe send me a link to the repository where you're running into trouble? edit: grammar |
We also have been running into problems from this issue. We use a different For example:
This fails with the "error: The following untracked working tree files would be overwritten by checkout:" problem, and has broken our continuous integration process. Unfortunately no automatic dependency management system Perhaps git subtree might be a better fit here? Another more conventional possibility might be to move the storage package into its own repository outside of azure-sdk-for-go. That would require clients to change their import paths, but that might be acceptable depending on your API compatibility guarantees. |
I just updated my first comment. After clearing my glide cache I'm running into the same issue. Thanks for bringing this to my attention, @vikstrous and @rogpeppe. |
Alright, my knee-jerk plan here is that we NEED to revert the addition of the submodule and replace it with the actual source files in order to unblock folks using older versions. We'll release that as version v9.1.0-beta. The plan will still be to move storage into its own repository. But we'll have to do something else to support folks still using it through this repository. edit: Because it was just a bug fix and didn't actually change anything contractually, I released it as v9.0.1-beta instead of v9.1.0-beta. |
Alright, this should be resolved for now. Can you confirm @vikstrous and/or @rogpeppe? |
works for me! |
Works for me too. Thanks very much for the quick fix. |
We use glide to vendor this repo and a recent change broke glide's ability to depend on old versions of this repo.
The issue is that glide clones the latest version of Azure/azure-sdk-for-go and then tries to check out an old version. When it does that, it gets the following errors:
This happens because the storage directory was replaced with a submodule.
See Masterminds/glide#749
We can blame git, glide or azure-sdk-for-go, but I think the simplest solution that doesn't require new code to be written is here. That's why I'm hoping that you guys can simply rename the storage directory on master to something else. That way these conflicts won't exist and we can move on without having to wait for code changes elsewhere.
Meanwhile, we'll probably just fork this repo and remove the latest commits as a workaround :(
Edit: I believe the breaking change was introduced in #569
The text was updated successfully, but these errors were encountered: