-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: document behavior of vgo when missing dep (or empty mod file) vs migrating from legacy format #25385
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
Comments
I've confirmed this is an issue on vgo master (change above has been submitted). Above mentioned change is not the culprit. A few observations:
|
@ardan-bkennedy I've looked into this a bit more. Please pull the latest from vgo master and try again. However, you will need to be patient. What's happening: As far as I can tell, everything is working normally**. Most of the time appears to be spent in
it may help with timing analysis. The network access I saw above was fetching the remote repos from the network after inspecting the Gopkg file. I was wrong in my previous analysis. The behavior that we see here is somewhat dependent on issue #25073 , though I suspect for converting an existing vendor lock file it will need to hit the network in any case. |
I am current using patch (https://golang.org/cl/111264). Does master contain this fix as well? |
Yes. It has been merged.
…On Sat, May 19, 2018, 11:00 William Kennedy ***@***.***> wrote:
I am current using patch (https://golang.org/cl/111264). Does master
contain this fix as well?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#25385 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAuFseFqVssly4svYeTeDVyDpEWc15zWks5t0F3DgaJpZM4T95YN>
.
|
I want to start from a clean state. I was hoping |
Remove mod.go. remove the GOPATH/v path
…On Sat, May 19, 2018, 11:22 William Kennedy ***@***.***> wrote:
I want to start from a clean state. I was hoping vgo clean -a would do
that but it re-creates the go.mod file. I don't know what
hidden/temporary files are created by vgo nor how to remove them?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#25385 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAuFsRzFGSJqyKDF6eqTT7pYwfbRXWGEks5t0GLwgaJpZM4T95YN>
.
|
I looked at GOPATH and did not see a
This is much faster now. That being said, I still don't see a |
Sorry, I was on a mobile before:
|
There is different behavior depending if you start with an empty
Start with clean system.
Output of build command.
View the
Start clean again but this time use an existing but empty
Output.
View the
|
Great diagnostic. The difference between the two situations is without a go mod file it attempts to convert the existing lock file. With an empty go mod file it will read the dependencies from the file and get the latest like go get does. In this case we are only building the root package so it gets very few dependencies. You can also try running "vgo build ./..." with an empty go.mod file present. |
Why the different semantic based on whether the file exists or not? Either vgo should respect what has been vendored or not? |
One is a first time migration.
…On Sun, May 20, 2018, 15:13 William Kennedy ***@***.***> wrote:
Why the different semantic based on whether the file exists or not? Either
vgo should respect what has been vendored or not?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#25385 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAuFsXrmULSnWdPcKwLNk94BHR4QjUrTks5t0eqLgaJpZM4T95YN>
.
|
Basic conclustion is this.
This run is starting with an empty Start with clean system again and an empty
Different result from the other options.
View the
MVS: These dependencies only show up in the
LOC: These dependencies only show up in the
These are the version differences between MVS and LOC.
|
@ardan-bkennedy I'm not sure if there is a bug here at this point. vgo will always use MVS to solve constrains. If there is no go.mod file, then it will search for existing lock type files and use those as the initial version seed. If there is a go.mod file (either empty or incomplete) it will get the latest version of the module (similar to how From glancing at the the config above, it looks like it is working correctly. |
I feel like I would like to update documentation before this is closed. Is there a place where we can document these semantics? |
Right now there is a wiki page for vgo, but it does feel like there should be a short concise "user guide" in a prominent, find-able location. For most people it will "just work", but even so we should be able to point people to something easy to consume documenting what it is doing. It probably also needs to be at least partially present in the command line, but online link would be good too. |
How does this read: https://github.com/golang/go/wiki/vgo-user-guide |
I will spend time on this then. I am sorry but I can't find the wiki page in the repo or in the main Go repo. I have never contributed code before but I would like to help document on the command line as well at some point. The wiki is probably a good starting point. |
The wiki is outside the git repo, hosted on github. |
LOL, you had the link there. https://github.com/golang/go/wiki/vgo-user-guide I will update this wiki and then we can talk about the command line documentation. |
Would you perfer I put this in a Google document and we can review there before updating? |
I don't have any official word on this. We may want to wait until @rsc
chimes in here. But if you want to do so before then I could read it over
and work with you.
…On Wed, May 23, 2018 at 10:32 AM William Kennedy ***@***.***> wrote:
Would you perfer I put this in a Google document and we can review there
before updating?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#25385 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAuFseEQBD95LPlkrjpIKRtS8wldkMunks5t1Z0wgaJpZM4T95YN>
.
|
I don't feel comfortable just editing the wiki and saving it. I rather have it reviewed first. |
How is this, replacing the content in the https://docs.google.com/document/d/1hoVUltVZDV7EgcpvFUdWXPZaCSlUObbGjLLxHPbhWSo/edit?usp=sharing New Project SetupThere are two options when using
Note: When vgo looks for the latest version of an unconstrained dependency, it gives precedence to semver tagged releases. If it fails to find a semver tagged release, it falls back to using the latest commit. Option 1The project has already has vendored dependencies using
In this option you will navigate to the root of the projects path. Verify there is no existing Option 2You want
In this option you will navigate to the root of the projects path. Verify there is no existing Updating DependenciesTo update dependencies to the latest version, run |
Add me as a commentator on the gdoc pls. One thing to avoid is now we can ignore GOPATH, we just |
What email do I use? |
@ardan-bkennedy I messaged you on Slack about the vgo guide. Please can you let me know if you prefer email/other? Thanks |
This discussion revolves around a very very old version of the code that's now completely gone. Rather than try to port whatever is still relevant forward, I'm just going to close this. The general problem - that vgo took a very very long time during conversions - has been fixed. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.10.2 darwin/amd64 vgo:2018-02-20.1
Does this issue reproduce with the latest release?
No, I am using this patch
What operating system and processor architecture are you using (
go env
)?What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
This project is already on my machine inside the GOPATH
https://github.com/ardanlabs/gotraining
So I tried building it
What did you expect to see?
I expected the project to build.
What did you see instead?
vgo seemed to hang. I had to hit control C.
Once I hit Control C, I added an empty
go.mod
file and tried again and it worked.The text was updated successfully, but these errors were encountered: