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: master
Choose a base ref
...
head repository: golang/mod
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: release-branch.go1.17
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Sep 22, 2021

  1. [release-branch.go1.17] modfile: in SetRequireSeparateIndirect, arran…

    …ge requirements consistently
    
    SetRequireSeparateIndirect now makes a stronger attempt to keep
    automatically added requirements in two blocks: one containing only
    direct requirements and one containing only indirect
    requirements. SetRequireSeparateIndirect will find or add these two
    blocks (commented blocks are left alone). New requirements are added
    to one of these two blocks. Existing requirements may be moved between
    these two blocks if their markings change.
    
    SetRequireSeparateIndirect attempts to preserve existing structure in
    the file by not adding requirements to or moving requirements from
    blocks with block-level comments and blocks other than the last
    uncommented direct-only and indirect-only block.
    
    As an exception to aid with migration, if the file contains a single
    uncommented block of requirements (as would the be the case if the
    user started with a 1.16 go.mod file, changed the go directive to
    1.17, then ran 'go mod tidy'), SetRequireSeparateIndirect will split
    the block into direct-only and indirect-only blocks.
    
    This is a change in behavior, but it has no semantic effect, and it
    should result in cleaner, more stable go.mod files.
    
    For golang/go#47756
    
    Change-Id: Ifa20bb084c6bdaf1e00140600380857de8afa320
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/343431
    Trust: Jay Conrod <[email protected]>
    Trust: Bryan C. Mills <[email protected]>
    Run-TryBot: Jay Conrod <[email protected]>
    TryBot-Result: Go Bot <[email protected]>
    Reviewed-by: Bryan C. Mills <[email protected]>
    Reviewed-by: Michael Matloob <[email protected]>
    (cherry picked from commit 4be982b)
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/351317
    Jay Conrod authored and rsc committed Sep 22, 2021
    Configuration menu
    Copy the full SHA
    57376c6 View commit details
    Browse the repository at this point in the history
  2. [release-branch.go1.17] modfile: in SetRequireSeparateIndirect, conve…

    …rt lines to blocks
    
    When reading go.mod, SetRequireSeparateIndirect will insert new
    requirements into the last uncommented direct-only or indirect-only
    block OR line. If the last such statement is a line,
    SetRequireSeparateIndirect converts it to a block before inserting new
    requirements. Cleanup will convert it back to a line later if no
    requirements are inserted.
    
    For golang/go#47756
    
    Change-Id: Id8ee3b0ce2d005488ddb3d9a5349115bd93938e7
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/348576
    Trust: Jay Conrod <[email protected]>
    Run-TryBot: Jay Conrod <[email protected]>
    TryBot-Result: Go Bot <[email protected]>
    Reviewed-by: Bryan C. Mills <[email protected]>
    Reviewed-by: Michael Matloob <[email protected]>
    (cherry picked from commit 37dd689)
    Reviewed-on: https://go-review.googlesource.com/c/mod/+/351318
    Jay Conrod authored and rsc committed Sep 22, 2021
    Configuration menu
    Copy the full SHA
    49f84bc View commit details
    Browse the repository at this point in the history
Loading