Skip to content
Permalink
Branch: master
Commits on Oct 11, 2019
  1. cmd/go: integrate changes made in x/mod packages into internal packages

    jayconrod committed Oct 9, 2019
    This change integrates changes made to x/mod packages into our internal
    copies of those packages.
    
    This is the first step of a bidirectional synchronization. A follow-up
    change will copy changes made to the internal packages after x/mod was
    forked. After that, we can vendor x/mod, update imports, and delete
    the internal copies.
    
    The following packages are affected:
    
    * internal/module
    * internal/semver (no change)
    * internal/sumweb (renamed to internal/sumdb)
    * internal/dirhash
    * internal/note
    * internal/tlog
    
    Several integrated changes affect other packages:
    
    * cmd/go/internal/module.MatchPathMajor now wraps a new function,
      CheckPathMajor, which returns error. MatchPathMajor returns
      bool. This will avoid an incompatible change in the next step.
    * module.EncodePath renamed to EscapePath, EncodeVersion to
      EscapeVersion, DecodePath to UnescapePath, DecodeVersion to
      UnescapeVersion.
    * cmd/go/internal/sumweb moved to cmd/go/internal/sumdb and package
      renamed to sumdb.
    * sumdb.Client renamed to ClientOps, Conn to Client, Server to
      ServerOps, Paths to ServerPaths.
    * sumdb/encode.go and encode_test.go are not present in x/mod since
      they are redundant with functionality in module. Both files are
      deleted.
    * sumdb.TestServer doesn't implement sumdb.ServerOps after changes
      were were made to golang.org/x/mod/sumdb.ServerOps during the fork.
      Local changes made so tests will pass. These will be copied to x/mod
      in the next step.
    
    Updates #34801
    
    Change-Id: I7e820f10ae0cdbec238e59d039e978fd1cdc7201
    Reviewed-on: https://go-review.googlesource.com/c/go/+/200138
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Commits on Oct 10, 2019
  1. cmd/go: forbid module pattern 'all' when outside a module

    jayconrod committed Oct 10, 2019
    Also, in cmd/doc, avoid calling 'go list -m all' when in module mode
    outside a module since it's now an error.
    
    Fixes #32027
    
    Change-Id: I7224c7fdf7e950bce6c058ab2a5837c27ba3b899
    Reviewed-on: https://go-review.googlesource.com/c/go/+/200297
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Commits on Oct 9, 2019
  1. cmd/go: forbid resolving import to modules when outside of a module

    jayconrod committed Oct 2, 2019
    When in module mode outside of any module, 'go build' and most other
    commands will now report an error instead of resolving a package path
    to a module.
    
    Previously, most commands would attempt to find the latest version of
    a module providing the package. This could be very slow if many
    packages needed to be resolved this way. Since there is no go.mod file
    where module requirements can be saved, it's a repeatedly slow and
    confusing experience.
    
    After this change, 'go build' and other commands may still be used
    outside of a module on packages in std and source files (.go
    arguments) that only import packages in std. Listing any other package
    on the command line or importing a package outside std will cause an
    error.
    
    'go get' is exempted from the new behavior, since it's expected that
    'go get' resolves paths to modules at new versions.
    
    Updates #32027
    
    Change-Id: Ia9d3a3b4ad738ca5423472e17818d62b96a2c959
    Reviewed-on: https://go-review.googlesource.com/c/go/+/198778
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
  2. cmd/doc: show original import error when package cannot be found

    jayconrod committed Oct 8, 2019
    Updates #34669
    
    Change-Id: I8d0ee68885e804e131f42a512080486f9b25e9dd
    Reviewed-on: https://go-review.googlesource.com/c/go/+/199819
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
  3. go/build: import packages in module mode when GO111MODULE is "on"

    jayconrod committed Oct 8, 2019
    go/build.Import locates package dirctories using 'go list' when in
    module mode (finding, downloading, and extracting modules is
    complicated, so go/build does not handle it).
    
    Previously, Import used 'go list' if GO111MODULE was not explicitly
    off and a go.mod file was present (plus some other conditions). With
    this change, if GO111MODULE is "on", a go.mod file does not need to be
    present.
    
    Fixes #34669
    
    Change-Id: I9e56871054d4b07c3fc04b6f14a5c8c8e9f3c333
    Reviewed-on: https://go-review.googlesource.com/c/go/+/199818
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
  4. cmd/go: eliminate redundancy in import error messages

    jayconrod committed Oct 8, 2019
    This change introduces a new interface, load.ImportPathError. An error
    may satisfy this by providing an ImportPath method and including the
    import path in its error text. modload.ImportMissingError satisfies
    this interface. load.ImportErrorf also provides a convenient way to
    create an error satisfying this interface with an arbitrary message.
    
    When load.PackageError formats its error text, it may omit the last
    path on the import stack if the wrapped error satisfies
    ImportPathError and has a matching path.
    
    To make this work, PackageError.Err is now an error instead of a
    string. PackageError.MarshalJSON will write Err as a string for
    'go list -json' output.
    
    When go/build.Import invokes 'go list' in module mode, it now runs
    with '-e' and includes '.Error' in the output format instead of
    expecting the error to be in the raw stderr text. If a package error
    is printed and a directory was not found, the error will be returned
    without extra decoration.
    
    Fixes #34752
    
    Change-Id: I2d81dab7dec19e0ae9f51f6412bc9f30433a8596
    Reviewed-on: https://go-review.googlesource.com/c/go/+/199840
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
  5. cmd/go: document multiple conditions in TestScript

    jayconrod committed Oct 9, 2019
    This functionality already exists but was undocumented. Related to
    comments in CL 198797.
    
    Change-Id: Icce40bd7c362423e6ed9c20673ce3de1311e5fd5
    Reviewed-on: https://go-review.googlesource.com/c/go/+/200040
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
Commits on Oct 4, 2019
  1. cmd/go/internal/modfile: report error for extra text around version

    jayconrod committed Oct 4, 2019
    Fixes #34697
    
    Change-Id: Iedfa3d46d558510f3bd1fdf9466cd974793d9ecd
    Reviewed-on: https://go-review.googlesource.com/c/go/+/199017
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Commits on Sep 19, 2019
  1. cmd/go: don't construct module version info if there are import errors

    jayconrod committed Sep 19, 2019
    A precondition of modload.PackageBuildInfo is that its path and deps
    arguments correspond to paths that have been loaded successfully with
    modload.ImportPaths or one of the Load functions. load.Package.load
    should not call PackageBuildInfo if there were any errors resolving
    imports.
    
    Fixes #34393
    
    Change-Id: I107514f1c535885330ff266c85d3981b71b31c2d
    Reviewed-on: https://go-review.googlesource.com/c/go/+/196520
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
Commits on Sep 16, 2019
  1. cmd/go: don't split internal test main packages twice

    jayconrod committed Sep 16, 2019
    Fixes #34321
    
    Change-Id: Ia6253038c525089e20a1da64a2c5c9dcc57edd74
    Reviewed-on: https://go-review.googlesource.com/c/go/+/195677
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
  2. cmd/go: don't include package dir in cache key when -trimpath is set

    jayconrod committed Sep 13, 2019
    The '-trimpath' flag tells 'go build' to trim any paths from the
    output files that are tied to the current workspace or toolchain. When
    this flag is set, we do not need to include the package directory in
    the text hashed to construct the action ID for each package.
    
    Fixes #33772
    
    Change-Id: I20b902d2f58019709b15864ca79aa0d9255ae707
    Reviewed-on: https://go-review.googlesource.com/c/go/+/195318
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Commits on Sep 13, 2019
  1. cmd/go: fix link error for -coverpkg in GOPATH mode

    jayconrod committed Sep 13, 2019
    If a generated test main package transitively depends on a main
    package, the main package will now always be rebuilt as a library and
    will not be compiled with '-p main'.
    
    This expands the fix for #30907, which only applied to packages with
    the BuildInfo set (main packages built in module mode). Linking
    multiple packages with BuildInfo caused link errors, but it appears
    these errors apply to some symbols in GOPATH mode.
    
    Fixes #34114
    
    Change-Id: Ic1e53437942269a950dd7e45d163707922c92edd
    Reviewed-on: https://go-review.googlesource.com/c/go/+/195279
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
Commits on Sep 12, 2019
  1. cmd/go: document <module>/@latest endpoint in 'go help goproxy'

    jayconrod committed Aug 19, 2019
    Updates #32789
    
    Change-Id: Ie5e8e3b7b6a923aa9068c8af3ac8f081bd92c830
    Reviewed-on: https://go-review.googlesource.com/c/go/+/190838
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
Commits on Sep 11, 2019
  1. cmd/go: strip trailing slash from versioned arguments

    jayconrod committed Sep 10, 2019
    'go get' accepts arguments of the form path@version, and it passes
    them through search.CleanPatterns before querying proxies. With this
    change, CleanPatterns preserves text after '@' and will strip trailing
    slashes from the patn.
    
    Previously, we did not strip trailing slashes when a version was
    present, which caused proxy base URL validation to fail. Module paths
    that end with ".go" (for example, github.com/nats-io/nats.go) use
    trailing slashes to prevent 'go build' and other commands from
    interpreting packages as source file names, so this caused unnecessary
    problems for them.
    
    Updates #32483
    
    Change-Id: Id3730c52089e52f1cac446617c20132a3021a808
    Reviewed-on: https://go-review.googlesource.com/c/go/+/194600
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Commits on Aug 23, 2019
  1. all: update 'go get' command in standard library README.vendor

    jayconrod committed Aug 23, 2019
    The -m flag is removed in Go 1.13. -d should be used instead.
    
    Change-Id: Ia53764748309f16cb231e5ac6770400a73804484
    Reviewed-on: https://go-review.googlesource.com/c/go/+/191621
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
Commits on Aug 8, 2019
  1. cmd/go: improve 'go mod download' and 'go list -m' error messages

    jayconrod committed Aug 7, 2019
    modload.ListModules now wraps errors as module.ModuleError as
    appropriate. The resulting errors always include the module path and
    will include the version, if known.
    
    'go mod download' no longer ignores errors reported by ListModules.
    Previously, it started requesting module info, go.mod, and zip. Those
    requests would fail, overwriting the original failure. They were
    usually less descriptive.
    
    'go mod download' with a module not in the build list (and no version
    query) is now an error. Previously, this was silently ignored.
    
    Fixes #30743
    
    Change-Id: Icee8c1c6c5240de135a8b6ba42d6bbcdb757cdac
    Reviewed-on: https://go-review.googlesource.com/c/go/+/189323
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Commits on Aug 6, 2019
  1. cmd/go: improve error message for missing import starting with cmd/

    jayconrod committed Aug 6, 2019
    In modload.Import, confirm that the import path does not start with
    "cmd/" before calling QueryPackage, which returns a less helpful
    error.
    
    In load.loadPackageData, don't wrap errors with "unknown import path".
    The wrapped error should always include the import path, and it's also
    repeated in the PackageError wrapper.
    
    Fixes #31031
    
    Change-Id: I071efa22e3842c62831d096f888a8006811fe724
    Reviewed-on: https://go-review.googlesource.com/c/go/+/189157
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
  2. cmd/go: look for __go_buildinfo section when looking for Mach-O version

    jayconrod committed Aug 6, 2019
    This mirrors the ELF fix in CL 188957. TestScript/version failed on
    darwin after that change.
    
    Fixes #31861
    
    Change-Id: I4ce953ebec8dd5fa47e26d373c59d7e290b75a34
    Reviewed-on: https://go-review.googlesource.com/c/go/+/189159
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
Commits on Jul 19, 2019
  1. cmd/go: document go get @upgrade behavior in release notes

    jayconrod committed Jul 17, 2019
    Fixes #33149
    
    Change-Id: If9ff24fea6d087b4047a9f6e50f99f449f9b1c52
    Reviewed-on: https://go-review.googlesource.com/c/go/+/186618
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Commits on Jul 17, 2019
  1. cmd/go: include GOEXPERIMENT flags in tool id for cache key

    jayconrod committed Jul 15, 2019
    The go command invokes each tool with -V=full to discover its version
    to compute a tool id. For release versions (that don't include the
    word "devel"), the go command only used the third word in
    the output (e.g., "go1.13"), ignoring any toolchain experiments that
    followed. With this change, the go command will use whole version line
    in the tool id for release versions.
    
    Also, when -V=full is set and there are non-default experiments,
    experiments are no longer printed twice.
    
    Fixes #33091
    
    Change-Id: I19b96f939c7e2fbc5d8befe3659156ee4b58daef
    Reviewed-on: https://go-review.googlesource.com/c/go/+/186200
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Commits on Jul 16, 2019
  1. cmd/go: tweak wording of module path mismatch error message

    jayconrod committed Jul 16, 2019
    Changes "was loaded as" to "was required as". This is slightly more
    precise, since it hints at a requirement edge in the module version
    graph.
    
    Updates #28489
    
    Change-Id: I636268c33f1ea9858c214fe275f271538186ed6d
    Reviewed-on: https://go-review.googlesource.com/c/go/+/186377
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
  2. cmd/go: clarify error text for module path mismatch

    jayconrod committed Jul 12, 2019
    This error occurs when a module is loaded with one name (for example,
    github.com/golang/lint) but declares a different path in its go.mod
    (golang.org/x/lint). The current text "unexpected module path" is
    confusing. It doesn't explain why the path was unexpected, and it's
    not clear what was expected.
    
    With this change, the error text includes the module and version
    containing the go.mod file with the error, the declared module path,
    and the loaded module path. The paths are vertically aligned so
    differences are visually obvious. As with other module version errors,
    the shortest chain of requirements is printed.
    
    This change supercedes CL 158477.
    
    Fixes #28489
    
    Change-Id: Ieb07d00bcae182376d7be6aad111c84fbf784354
    Reviewed-on: https://go-review.googlesource.com/c/go/+/185985
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Commits on Jul 12, 2019
  1. cmd/go: improve module version query documentation

    jayconrod committed Jul 12, 2019
    Add "upgrade" and "patch" to 'go help modules' section 'Module queries'.
    Also explicitly call out the fact that @v2 will select the latest
    version starting with v2, not the branch named v2, since this is a
    common source of confusion.
    
    Fixes #33010
    
    Change-Id: I2fe27543b81a160fb6f6b8e8444a7a35f3661433
    Reviewed-on: https://go-review.googlesource.com/c/go/+/185979
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Commits on Jul 3, 2019
  1. cmd/go: update tests for new @upgrade query

    jayconrod committed Jul 3, 2019
    This should have been part of CL 184440.
    
    Updates #32846
    
    Change-Id: I78a1326f4a67b3b526859bd15cb9653b4a8551a7
    Reviewed-on: https://go-review.googlesource.com/c/go/+/184920
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
  2. cmd/go: restore @latest behavior and support @upgrade in 'go get'

    jayconrod committed Jul 1, 2019
    'go get path@latest' may now downgrade a module required at a
    pre-release or pseudo-version newer than the latest released
    version. This restores the 1.12 behavior and the ability to easily
    roll back from a temporary development version.
    
    'go get path@upgrade' is like @latest but will not downgrade.
    If no version suffix is specified ('go get path'), @upgrade is
    implied.
    
    Fixes #32846
    
    Change-Id: Ibec0628292ab1c484716a5add0950d7a7ee45f47
    Reviewed-on: https://go-review.googlesource.com/c/go/+/184440
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
  3. go/build: document characters allowed in build tags

    jayconrod committed Jul 3, 2019
    The documentation just said "alphanumeric", but underscores and dots
    are also accepted.
    
    Fixes #32886
    
    Change-Id: I1ba872a220d5c5bf64f1d851ddba9eb3b1afb89a
    Reviewed-on: https://go-review.googlesource.com/c/go/+/184917
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Commits on Jun 27, 2019
  1. go/build: don't check if srcDir in GOPATH when deciding to use modules

    jayconrod committed Jun 27, 2019
    go/build.Context.Import loads package information using 'go list' when
    in module mode. It does this when GO111MODULE is not "off", there is a
    go.mod file in any parent directory, and neither the path nor the
    source directory are in GOROOT. Import no longer checks whether the
    source directory is in GOPATH if GO111MODULE=auto or unset.
    
    Also fixed subdirectory checks that did not handle relative source
    directory paths. mod_gobuild_import should have failed when we changed
    the meaning of GO111MODULE=auto but didn't because of this.
    
    Fixes #32799
    
    Change-Id: Ic5210b7e00cb58f91ea9455b67b49d5aed4eec63
    Reviewed-on: https://go-review.googlesource.com/c/go/+/184098
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
Commits on Jun 26, 2019
  1. doc/go1.13: describe new 'go version' behavior

    jayconrod committed Jun 26, 2019
    Change-Id: I18e2546f89e68e77d6e829acc997851751a44f0c
    Reviewed-on: https://go-review.googlesource.com/c/go/+/183983
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
  2. cmd/go: 'go get' should not delete binaries when run from $GOBIN

    jayconrod committed Jun 25, 2019
    When 'go install' is run without arguments in a directory containing a
    main package, it deletes an executable file with the same name as the
    package (presumably created by 'go build' previously).
    
    'go get' in module mode executes the same code after updating and
    downloading modules. However, the special case was misfiring because
    we passed an empty list of patterns to InstallPackages.
    
    Fixes #32766
    
    Change-Id: I19aca64ee1fb5a216777dd7d559e8e6a45b3e90c
    Reviewed-on: https://go-review.googlesource.com/c/go/+/183846
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Commits on Jun 25, 2019
  1. doc/go1.13: binary-only package are no longer supported

    jayconrod committed Jun 24, 2019
    Change-Id: Ieb4a78730a0685627b4730381b72cbd01031c8fa
    Reviewed-on: https://go-review.googlesource.com/c/go/+/183633
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Commits on Jun 19, 2019
  1. cmd/go: install binaries in cmd/ in $GOROOT/bin instead of $GOBIN

    jayconrod committed Jun 19, 2019
    This was caused by CL 167748, which removed a special case for command
    line arguments starting with "cmd/". This CL restores the behavior
    from go1.12.
    
    Fixes #32674
    
    Change-Id: I72180d11fb0261ef0af9632e512bd9c03481b6c0
    Reviewed-on: https://go-review.googlesource.com/c/go/+/183058
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Commits on Jun 18, 2019
  1. cmd/go: fix sumdb test failure with misbehaving DNS server

    jayconrod committed Jun 18, 2019
    Broadened the regular expression used to test error messages for
    failing to connect to "localhost.localdev/sumdb". Some DNS servers
    resolve unknown domains like "localhost.localdev" to real IP addresses
    to serve ads. We may get a variety of error messages.
    
    Fixes #31779
    
    Change-Id: Ib389c633c9a9f70f8e89bbcba5282a375da4e708
    Reviewed-on: https://go-review.googlesource.com/c/go/+/182799
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
  2. cmd/go/internal/modload: query correct "latest" version through proxy

    jayconrod committed Jun 17, 2019
    This fixes a regression introduced in CL 180337. When we query a
    module at "latest" that has no tagged versions, we tried to use ""
    as the version because we used info.Name instead of info.Version. This
    only happened when using a proxy: in direct mode, info.Name is set to
    the underlying VCS revision, which is fine.
    
    Also: serve "/mod/path/@latest" through our test proxy.
    Previously, we served a 404, which made this bug hard to detect.
    
    Fixes #32636
    
    Change-Id: I5c60975656297f862cad66675170e819685ebd39
    Reviewed-on: https://go-review.googlesource.com/c/go/+/182697
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Commits on Jun 17, 2019
  1. cmd/go: document GOBIN and 'go install' locations

    jayconrod committed Jun 13, 2019
    * In doc/install-source.html, clarify the meaning of $GOBIN and
      describe where executables from the Go distribution are
      installed. Also describe $GOPATH, since it provides a default value
      for $GOBIN and may conflict with $GOROOT.
    * Add more detail to 'go help install' as well.
    
    Fixes #31576
    
    Change-Id: Ib8a8c21677c3aa0ebef97a3b587b6f8fe338b80e
    Reviewed-on: https://go-review.googlesource.com/c/go/+/182341
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Commits on Jun 14, 2019
  1. cmd/go: avoid accidental downgrades in 'go get' with latest and patch

    jayconrod committed May 31, 2019
    Currently, 'go get -u' and 'go get -u=patch' avoid accidentally
    downgrading modules by preventing upgrades in two cases:
    
    1) If the current version is a prerelease that is semantically later
       than the "latest" or "patch" version.
    2) If the current version is a pseudoversion that is chronologically
       newer than the "latest" or "patch" version.
    
    With this change, 'go get m@latest' and 'go get m@patch' prevent
    downgrades using the same checks.
    
    Also: 'go get m@patch' now works if m is a module path but not a
    package path (i.e., there is no package in the module root directory).
    
    Fixes #30634
    Fixes #32537
    
    Change-Id: I916630c385b5f3ba7c13e0d65ba08f73a1a67829
    Reviewed-on: https://go-review.googlesource.com/c/go/+/180337
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
Older
You can’t perform that action at this time.