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

cmd/go: help for go.mod references example that has now been removed #27083

Closed
thepudds opened this issue Aug 19, 2018 · 5 comments

Comments

Projects
None yet
5 participants
@thepudds
Copy link

commented Aug 19, 2018

What version of Go are you using (go version)?

Documentation on tip.golang.org (Build version devel +bf80e3b564 Sat Aug 18 18:23:06 2018 +0000)

Does this issue reproduce with the latest release?

Yes (tip).

Issue

The old go help mod fix included this example near the top:

Fix updates go.mod to use canonical version identifiers and
to be semantically consistent. For example, consider this go.mod file:

        module M

        require (
                A v1
                B v1.0.0
                C v1.0.0
                D v1.2.3
                E dev
        )

        exclude D v1.2.3

Much of the content from go help mod fix has migrated to go help go.mod, and the text has been updated and generally improved.

However, even though example above was removed, many sections of the subsequent prose in the current go help go.mod still continue to refer to that now non-existent example, such as:

The update rewrites non-canonical version identifiers to semver form, so A's v1 becomes v1.0.0 and E's dev becomes the pseudo-version for the latest commit on the dev branch, perhaps v0.0.0-20180523231146-b3f5c0f6e5f1.

Side note: I personally think the new example is much better for someone who is new to Go modules (which at this point of course is most people).

@gopherbot, please add labels modules, Documentation.

@mvdan

This comment has been minimized.

Copy link
Member

commented Aug 19, 2018

ping @rsc for a decision

@mvdan mvdan added this to the Go1.11 milestone Aug 19, 2018

@mvdan mvdan added the NeedsDecision label Aug 19, 2018

@rsc

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2018

Thanks. golang.org/cl/130140.

@gopherbot

This comment has been minimized.

Copy link

commented Aug 21, 2018

Change https://golang.org/cl/130140 mentions this issue: cmd/go: fix 'go help go.mod' example

@gopherbot gopherbot closed this in 27ed675 Aug 21, 2018

@gopherbot

This comment has been minimized.

Copy link

commented Aug 21, 2018

Change https://golang.org/cl/130618 mentions this issue: [release-branch.go1.11] cmd/go: fix 'go help go.mod' example

gopherbot pushed a commit that referenced this issue Aug 22, 2018

[release-branch.go1.11] cmd/go: fix 'go help go.mod' example
Dropped the example referred to in the text
when copying this text out of 'go help mod fix'.

Fixes #27083.

Change-Id: I63dfa3033fa2b2408019eef9d8b5a055aa803c57
Reviewed-on: https://go-review.googlesource.com/130140
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
(cherry picked from commit 27ed675)
Reviewed-on: https://go-review.googlesource.com/130618
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
@perillo

This comment has been minimized.

Copy link

commented Feb 16, 2019

I'm a bit confused.

With the following go.mod

module github.com/perillo/test

require github.com/go-yaml/yaml dev

go reports an error: invalid module version "dev": unknown revision dev.

When I use v2 it works, because there is a v2 branch on the repository but the resulting version does not became v2.0.0 as reported in the example, but v2.1.0+incompatible.

Finally, when I use v2.2 it reports an error:
invalid module version "v2.2": no matching versions for query "v2.2"

Can I suppose that support for non-canonical version identifiers has been removed?

I'm using go1.11.5 linux/amd64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.