Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: golang/mod
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.4.2
Choose a base ref
...
head repository: golang/mod
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.5.0
Choose a head ref
  • 15 commits
  • 11 files changed
  • 5 contributors

Commits on Mar 10, 2021

  1. module: add InvalidPathError

    CheckPath, CheckImportPath, and CheckFilePath now return this error.
    
    To be used in CL 297634.
    
    Change-Id: Ibc4af7c5593f35216ab3ade0b024971061b8cf97
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/297891
    Trust: Jay Conrod <jayconrod@google.com>
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Go Bot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
    Jay Conrod committed Mar 10, 2021
    Configuration menu
    Copy the full SHA
    19d50ca View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2021

  1. module: move pseudo-version functions into module

    For golang/go#44969
    
    Change-Id: Ie094d59140764b7f1cffb879d99a13da23a977da
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/304150
    Trust: Jay Conrod <jayconrod@google.com>
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Go Bot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
    Jay Conrod committed Mar 23, 2021
    Configuration menu
    Copy the full SHA
    6b0bea4 View commit details
    Browse the repository at this point in the history
  2. semver: add ByVersion and Sort for sorting semantic version lists

    For golang/go#44969
    
    Change-Id: I148a18b676061cd8ea481c3f5130d0792c0b5233
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/304151
    Trust: Jay Conrod <jayconrod@google.com>
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Go Bot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
    Jay Conrod committed Mar 23, 2021
    Configuration menu
    Copy the full SHA
    1cc8812 View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2021

  1. modfile: clarify documentation for Parse

    Fixes golang/go#45149
    
    Change-Id: Ie76f4b46964a99015bcd5c8166c26b25bc61ce72
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/308452
    Trust: Jay Conrod <jayconrod@google.com>
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Go Bot <gobot@golang.org>
    Jay Conrod committed Apr 8, 2021
    Configuration menu
    Copy the full SHA
    244d49f View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2021

  1. modfile: parse deprecation notices in module comments

    Deprecation notices start with "Deprecated:" at the beginning of a
    line and run until the end of the paragraph.
    
    This CL reuses text extraction code for retraction rationale, so the
    same rules apply: comment text may be from the comments above a
    "module" directive or as a suffix on the same line.
    
    For golang/go#40357
    
    Change-Id: Id5524149c6bbda3effc64c6b668b701b5cf428af
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/301089
    Trust: Jay Conrod <jayconrod@google.com>
    Run-TryBot: Jay Conrod <jayconrod@google.com>
    TryBot-Result: Go Bot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Michael Matloob <matloob@golang.org>
    Jay Conrod committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    858fdbe View commit details
    Browse the repository at this point in the history

Commits on May 3, 2021

  1. go.mod: upgrade to go 1.17

    This change was produced using 'go mod tidy -go=1.17'
    with a go command built at CL 315210.
    
    This activates lazy loading, and updates the go.mod file to maintain
    the lazy-loading invariants (namely, including an explicit requirement
    for every package transitively imported by the main module).
    
    Note that this does *not* prevent users with earlier go versions from
    successfully building packages from this module.
    
    For golang/go#36460
    
    Change-Id: If672eca0dad61b3f6050a94c758d605b6586cbc3
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/316113
    Trust: Bryan C. Mills <bcmills@google.com>
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Go Bot <gobot@golang.org>
    Reviewed-by: Michael Matloob <matloob@golang.org>
    Bryan C. Mills committed May 3, 2021
    Configuration menu
    Copy the full SHA
    4435ecf View commit details
    Browse the repository at this point in the history

Commits on May 4, 2021

  1. module: accept leading dash in a file path

    For golang/go#45447
    
    Change-Id: I38b13bc912851aa9b6cdeb851330a5ed97b743ac
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/316629
    Trust: Ian Lance Taylor <iant@golang.org>
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    TryBot-Result: Go Bot <gobot@golang.org>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
    ianlancetaylor committed May 4, 2021
    Configuration menu
    Copy the full SHA
    fb786b1 View commit details
    Browse the repository at this point in the history
  2. modfile: take into account that // indirect comments may not be well …

    …formatted
    
    When there is an // indirect comment next to a dependency that is not actually indirect;
    go mod tidy should remove it.
    This was not the case when the //indirect comment was badly formatted.
    
    We now check whether such a comment exists irrespective of the formatting.
    
    Updates golang/go#45932
    
    Change-Id: I6a7dca23059a0aca6f8f940da975a0d79f701571
    GitHub-Last-Rev: b884ee1
    GitHub-Pull-Request: #3
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/316569
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
    Trust: Bryan C. Mills <bcmills@google.com>
    Trust: Jay Conrod <jayconrod@google.com>
    komuw authored and Bryan C. Mills committed May 4, 2021
    Configuration menu
    Copy the full SHA
    67f1c1e View commit details
    Browse the repository at this point in the history

Commits on May 12, 2021

  1. modfile: be less strict about go version syntax in dependency go.mod …

    …files
    
    It is unclear what the future holds for the go line in go.mod files.
    Perhaps at some point we will switch to semver numbering.
    Perhaps at some point we will allow specifying minor versions
    or even betas and release candidates.
    Those kinds of changes are difficult today because the go line
    is parsed in dependency modules, meaning that older
    versions of the Go toolchain need to understand newer go lines.
    
    This CL makes that case - parsing a go line in a dependency's
    go.mod file - a bit more lax about how to find the version.
    It allows a leading v and any trailing non-digit-prefixed string
    after the MAJOR.MINOR section.
    
    There are no concrete plans to make use of any of these changes,
    but if in the future we want to make them, having a few Go releases
    under out belt that will accept the syntax in dependencies will
    make any changes significantly easier.
    
    See also CL 317690 in the main repo.
    
    Change-Id: I7c7733c62259b3f25683ed618bc4918c98061396
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/317689
    Trust: Russ Cox <rsc@golang.org>
    Run-TryBot: Russ Cox <rsc@golang.org>
    TryBot-Result: Go Bot <gobot@golang.org>
    Reviewed-by: Bryan C. Mills <bcmills@google.com>
    rsc committed May 12, 2021
    Configuration menu
    Copy the full SHA
    6088ed8 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2021

  1. modfile: remove end-of-line comments in removeLine

    I added this test case while updating documentation for
    golang/go#45965, and it failed. This CL fixes the behavior,
    and the next CL in the stack documents it.
    
    For golang/go#45965
    
    Change-Id: Ia68dbd33530eec138745c6e291b096a9fa1e1d58
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/323170
    Trust: Bryan C. Mills <bcmills@google.com>
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Go Bot <gobot@golang.org>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
    Bryan C. Mills committed May 27, 2021
    Configuration menu
    Copy the full SHA
    e953053 View commit details
    Browse the repository at this point in the history
  2. modfile: document (*File).*Require methods

    For golang/go#45965
    
    Change-Id: If3c7255f44adc81b69e8109a5d9d62f116579bbd
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/323171
    Trust: Bryan C. Mills <bcmills@google.com>
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Go Bot <gobot@golang.org>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
    Bryan C. Mills committed May 27, 2021
    Configuration menu
    Copy the full SHA
    ad21a28 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2021

  1. modfile: clean up SetRequire

    I started this change by expanding the documentation and tests for
    SetRequire. Unfortunately, the tests failed when the existing
    contents included duplicates of a module path:
    
        --- FAIL: TestSetRequire/existing_duplicate (0.00s)
            rule_test.go:1011: after Cleanup, len(Require) = 3; want 1
        --- FAIL: TestSetRequire/existing_duplicate_multi (0.00s)
            rule_test.go:1011: after Cleanup, len(Require) = 3; want 1
    
    So then I fixed the detected bug, by updating the Line entries
    (possibly marking them for removal) in the same loop that updates the
    Require entries. (We don't need to loop over f.Syntax.Stmt separately
    to remove deleted entries because f.Syntax.Cleanup already does that.)
    
    For golang/go#45965
    
    Change-Id: I1b665c0832112de2c4273628f266dc3d966fefdd
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/325230
    Trust: Bryan C. Mills <bcmills@google.com>
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Go Bot <gobot@golang.org>
    Reviewed-by: Michael Matloob <matloob@golang.org>
    Bryan C. Mills committed Jun 8, 2021
    Configuration menu
    Copy the full SHA
    6e4e729 View commit details
    Browse the repository at this point in the history
  2. modfile: make marking for removal a method on Line instead of FileSyntax

    The act of marking a line for removal intentionally does not depend on
    the rest of the syntax tree, in order to avoid quadratic behavior.
    Make that property more explicit by defining it as a method on Line
    rather than FileSyntax.
    
    For golang/go#45965
    
    Change-Id: I475625eddf57396411a3fb73eaedd624dd7af3d6
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/325969
    Trust: Bryan C. Mills <bcmills@google.com>
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Go Bot <gobot@golang.org>
    Reviewed-by: Michael Matloob <matloob@golang.org>
    Bryan C. Mills committed Jun 8, 2021
    Configuration menu
    Copy the full SHA
    9eb10b1 View commit details
    Browse the repository at this point in the history
  3. modfile: factor out methods for changing Require properties

    For golang/go#45965
    
    Change-Id: I331d068d115b145239933da0d8341a1627124935
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/325970
    Trust: Bryan C. Mills <bcmills@google.com>
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Go Bot <gobot@golang.org>
    Reviewed-by: Michael Matloob <matloob@golang.org>
    Bryan C. Mills committed Jun 8, 2021
    Configuration menu
    Copy the full SHA
    22458ad View commit details
    Browse the repository at this point in the history
  4. modfile: add SetRequireSeparateIndirect

    The new method is a variant of SetRequire, but adds new indirect
    dependencies only in indirect-only blocks, and does not add new direct
    dependencies to existing indirect-only blocks.
    
    For golang/go#45965
    
    Change-Id: I6730b586396658e710e4bf2afcf64fb2c827203f
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/325971
    Trust: Bryan C. Mills <bcmills@google.com>
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Go Bot <gobot@golang.org>
    Reviewed-by: Michael Matloob <matloob@golang.org>
    Bryan C. Mills committed Jun 8, 2021
    Configuration menu
    Copy the full SHA
    0f08993 View commit details
    Browse the repository at this point in the history
Loading