1. 26 Jun, 2019 4 commits
  2. 25 Jun, 2019 15 commits
  3. 24 Jun, 2019 7 commits
  4. 23 Jun, 2019 2 commits
  5. 21 Jun, 2019 9 commits
    • Dmitri Shuralyov's avatar
      doc: add release notes for godoc and go doc · c11f6c49
      Dmitri Shuralyov authored
      Updates #30029
      Updates #31457
      
      Change-Id: I08414a544615e74afb47f7a10a00f1e22adfd40c
      Reviewed-on: https://go-review.googlesource.com/c/go/+/182619Reviewed-by: default avatarKatie Hockman <katie@golang.org>
      c11f6c49
    • Bryan C. Mills's avatar
      cmd/go: validate pseudo-versions against module paths and revision metadata · 1803ab1e
      Bryan C. Mills authored
      Previously, most operations involving pseudo-versions allowed any
      arbitrary combination of version string and date, and would resolve to
      the underlying revision (typically a Git commit hash) as long as that
      revision existed.
      
      There are a number of problems with that approach:
      
      • The pseudo-version participates in minimal version selection. If its
        version prefix is inaccurate, the pseudo-version may appear to have
        higher precedence that the releases that follow it, effectively
        “pinning” the module to that commit. For release tags, module
        authors are the ones who make the decision about release tagging;
        they should also have control over the pseudo-version precedence
        within their module.
      
      • The commit date within the pseudo-version provides a total order
        among pseudo-versions. If it is not accurate, the pseudo-version
        will sort into the wrong place relative to other commits with the
        same version prefix.
      
      To address those problems, this change restricts the pseudo-versions
      that the 'go' command accepts, rendering some previously
      accepted-but-not-canonical versions invalid. A pseudo-version is now
      valid only if all of:
      
      1. The tag from which the pseudo-version derives points to the named
         revision or one of its ancestors as reported by the underlying VCS
         tool, or the pseudo-version is not derived from any tag (that is,
         has a "vX.0.0-" prefix before the date string and uses the lowest
         major version appropriate to the module path).
      
      2. The date string within the pseudo-version matches the UTC timestamp
         of the revision as reported by the underlying VCS tool.
      
      3. The short name of the revision within the pseudo-version (such as a
         Git hash prefix) is the same as the short name reported by the
         underlying cmd/go/internal/modfetch/codehost.Repo. Specifically, if
         the short name is a SHA-1 prefix, it must use the same number of
         hex digits (12) as codehost.ShortenSHA1.
      
      4. The pseudo-version includes a '+incompatible' suffix only if it is
         needed for the corresponding major version, and only if the
         underlying module does not have a go.mod file.
      
      We believe that all releases of the 'go' tool have generated
      pseudo-versions that meet these constraints. However, a few
      pseudo-versions edited by hand or generated by third-party tools do
      not. If we discover invalid-but-benign pseudo-versions in widely-used
      existing dependencies, we may choose to add a whitelist for those
      specific path/version combinations.
      
      ―
      
      To work around invalid dependencies in leaf modules, users may add a
      'replace' directive from the invalid version to its valid equivalent.
      Note that the go command's go.mod parser automatically resolves commit
      hashes found in 'replace' directives to the appropriate
      pseudo-versions, so in most cases one can write something like:
      
      	replace github.com/docker/docker v1.14.0-0.20190319215453-e7b5f7dbe98c => github.com/docker/docker e7b5f7dbe98c
      
      and then run any 'go' command (such as 'go list' or 'go mod tidy') to
      resolve it to an appropriate pseudo-version. Note that the invalid
      version will still be used in minimal version selection, so this use
      of 'replace' directives is an incomplete workaround.
      
      ―
      
      One of the common use cases for higher-than-tagged pseudo-versions is
      for projects that do parallel development on release branches. For
      example, if a project cuts a 'v1.2' release branch at v1.2.0, they may
      want future commits on the main branch to show up as pre-releases for
      v1.3.0 rather than for v1.2.1 — especially if v1.2.1 is already tagged
      on the release branch. (On the other hand, a backport of a patch to
      the v1.2 branch should not show up as a pre-release for v1.3.0.)
      
      To address this use-case, module authors can make use of our existing
      support for pseudo-versions derived from pre-release tags: if the
      author adds an explicit pre-release tag (such as 'v1.3.0-devel') to
      the first commit after the branch, then the pseudo-versions for that
      commit and its descendents will be derived from that tag and will sort
      appropriately in version selection.
      
      ―
      
      Updates #27171
      Fixes #29262
      Fixes #27173
      Fixes #32662
      Fixes #32695
      
      Change-Id: I0d50a538b6fdb0d3080aca9c9c3df1040da1b329
      Reviewed-on: https://go-review.googlesource.com/c/go/+/181881
      Run-TryBot: Bryan C. Mills <bcmills@google.com>
      Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
      1803ab1e
    • Bryan C. Mills's avatar
      cmd/go/testdata: update addmod.go to work with the mainline go command · 851616d2
      Bryan C. Mills authored
      Updates #32715
      
      Change-Id: I4ea41d7bd1a2daeba8cebb283aaa096b6c3d4533
      Reviewed-on: https://go-review.googlesource.com/c/go/+/183401
      Run-TryBot: Bryan C. Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarDmitri Shuralyov <dmitshur@golang.org>
      851616d2
    • Robert Griesemer's avatar
      cmd/gofmt: fix normalization of imaginary number literals · 41b9e99d
      Robert Griesemer authored
      The old code only normalized decimal integer imaginary number
      literals. But with the generalized imaginary number syntax,
      the number value may be decimal, binary, octal, or hexadecimal,
      integer or floating-point.
      
      The new code only looks at the number pattern. Only for decimal
      integer imaginary literals do we need to strip leading zeroes.
      The remaining normalization code simply ignore the 'i' suffix.
      As a result, the new code is both simpler and shorter.
      
      Fixes #32718.
      
      Change-Id: If43fc962a48ed62002e65d5c81fddbb9bd283984
      Reviewed-on: https://go-review.googlesource.com/c/go/+/183378Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      41b9e99d
    • Than McIntosh's avatar
      cmd/link: revise previous __DWARF segment protection fix · 3f1422c7
      Than McIntosh authored
      Tweak the previous fix for issue 32673 (in CL 182958) to work around
      problems with c-shared build mode that crop up on some of the builders
      (10.11, 10.12).  We now consistently set vmaddr and vmsize to zero
      for the DWARF segment regardless of build mode.
      
      Updates #32673
      
      Change-Id: Id1fc213590ad00c28352925e2d754d760e022b5e
      Reviewed-on: https://go-review.googlesource.com/c/go/+/183237Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      Reviewed-by: default avatarDavid Chase <drchase@google.com>
      3f1422c7
    • Ian Lance Taylor's avatar
      cmd/go: add more docs for go directive in go.mod file · b3399ac5
      Ian Lance Taylor authored
      Updates #30791
      
      Change-Id: I67efd7fd3b3a550428b16518bb27a3d81c178d28
      Reviewed-on: https://go-review.googlesource.com/c/go/+/181840
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
      b3399ac5
    • guitarbum722's avatar
      bufio: add example for Scanner.Bytes · 44c9354c
      guitarbum722 authored
      Change-Id: I4a5c7573e13dd85531ee9f4dd2a0d1981bf8cdfa
      Reviewed-on: https://go-review.googlesource.com/c/go/+/51412
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      44c9354c
    • Ian Lance Taylor's avatar
      Revert "runtime: use dispatch semaphores on Darwin" · 1130cc74
      Ian Lance Taylor authored
      This reverts https://golang.org/cl/182258.
      
      The new code caused unpredictable crashes that are not understood.  The old code was occasionally flaky but still better than this approach.
      
      Fixes #32655
      Updates #31264
      
      Change-Id: I2e9d27d6052e84bf75106d8b844549ba4f571695
      Reviewed-on: https://go-review.googlesource.com/c/go/+/182880
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarKatie Hockman <katie@golang.org>
      Reviewed-by: default avatarKeith Randall <khr@golang.org>
      1130cc74
    • Robert Griesemer's avatar
      doc/go1.13: document changes to gofmt, go/* libs, and fix entry for text/scanner · b5a8dcb0
      Robert Griesemer authored
      Change-Id: I2230a97c681406f248b7f2fff45dd80a4b54a4b3
      Reviewed-on: https://go-review.googlesource.com/c/go/+/183357Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      b5a8dcb0
  6. 20 Jun, 2019 3 commits