Skip to content
Permalink
Branch: master
Commits on Nov 11, 2019
  1. cmd/go: convert TestNonCanonicalImportPaths to a script test

    bcmills committed Nov 11, 2019
    This test failed in a pending CL, and I would rather debug it as a script.
    
    Change-Id: I231367c86415ab61d0f9e08b88c9546d32b373b7
    Reviewed-on: https://go-review.googlesource.com/c/go/+/206498
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  2. cmd/go: convert TestFmtLoadErrors to a script test

    bcmills committed Nov 11, 2019
    This test failed in a pending CL, and I would rather debug it as a script.
    
    Change-Id: I0ae7486a9949bea40d5dd36afe6919f86f14dfa7
    Reviewed-on: https://go-review.googlesource.com/c/go/+/206499
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  3. cmd/dist: write binaries to to GOTMPDIR instead of GOROOT in runHostTest

    bcmills committed Nov 11, 2019
    Updates #32407
    Updates #28387
    
    Change-Id: I2ab933896940787b67ab5464c8213670e6e108c2
    Reviewed-on: https://go-review.googlesource.com/c/go/+/206459
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
  4. cmd/go: in 'go build -o', allow the destination file to exist if it i…

    bcmills committed Nov 11, 2019
    …s empty
    
    This allows the target of 'go build' to be a filename constructed
    using ioutil.TempFile or similar, without racily deleting the file
    before rebuilding it.
    
    Updates #32407
    Updates #28387
    
    Change-Id: I4c5072830a02b93f0c4186b50bffa9de00257afe
    Reviewed-on: https://go-review.googlesource.com/c/go/+/206477
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
  5. misc: ensure that test overlay directories are writable

    bcmills committed Nov 11, 2019
    Otherwise, the test cannot create new files in the directory.
    
    Updates #32407
    Updates #30316
    
    Change-Id: Ief0df94a202be92f57d458d4ab4e4daa9ec189b1
    Reviewed-on: https://go-review.googlesource.com/c/go/+/206458
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  6. runtime/pprof: skip checks for inlined functions when inlining is dis…

    bcmills committed Nov 9, 2019
    …abled
    
    Fixes #35463
    
    Change-Id: I29af27b77cc651395c20570943847729ff12586c
    Reviewed-on: https://go-review.googlesource.com/c/go/+/206297
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Commits on Nov 8, 2019
  1. cmd/go/internal/lockedfile: skip flaky TestTransform on plan9

    bcmills committed Nov 8, 2019
    Updates #35471
    
    Change-Id: Ie06c442e405a267eb909621e1205444b6a00fda1
    Reviewed-on: https://go-review.googlesource.com/c/go/+/206197
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: David du Colombier <0intro@gmail.com>
  2. cmd/go/internal/lockedfile: add a unit-test for Transform

    bcmills committed Nov 8, 2019
    Updates #35425
    
    Change-Id: I9ca2251246ee2fa9bb7a335d5eff94d3c9f1f004
    Reviewed-on: https://go-review.googlesource.com/c/go/+/206143
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  3. cmd/go/internal/modload: use lockedfile.Read for the initial read of …

    bcmills committed Nov 8, 2019
    …the go.mod file
    
    Updates #34634
    Fixes #35425
    
    Change-Id: I878a8d229b33dcde9e7d4dfd82ddf9815d38a465
    Reviewed-on: https://go-review.googlesource.com/c/go/+/206142
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
  4. cmd/go: delete flaky TestQEMUUserMode

    bcmills committed Nov 8, 2019
    If QEMU user-mode is actually a supported configuration, then per
    http://golang.org/wiki/PortingPolicy it needs to have a builder
    running tests for all packages, not just a simple “hello world”
    program.
    
    Updates #1508
    Updates #13024
    Fixes #35457
    
    Change-Id: Ib6122b06ad1d265550a0e92131506266495893cc
    Reviewed-on: https://go-review.googlesource.com/c/go/+/206137
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  5. runtime: skip TestPingPongHog on builders

    bcmills committed Nov 8, 2019
    This test is failing consistently in the longtest builders,
    potentially masking regressions in other packages.
    
    Updates #35271
    
    Change-Id: Idc03171c0109b5c8d4913e0af2078c1115666897
    Reviewed-on: https://go-review.googlesource.com/c/go/+/206098
    Reviewed-by: Carlos Amedee <carlos@golang.org>
Commits on Nov 7, 2019
  1. cmd/go: add math/bits to runtime packages in TestNewReleaseRebuildsSt…

    bcmills committed Nov 7, 2019
    …alePackagesInGOPATH
    
    This fixes a test failure introduced in CL 190620.
    
    Updates #35112
    
    Change-Id: I568ae85a456ccd8103563b0ce2e42b7348776a5c
    Reviewed-on: https://go-review.googlesource.com/c/go/+/205877
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Michael Knyszek <mknyszek@google.com>
  2. Revert "sync: yield to the waiter when unlocking a starving mutex"

    bcmills committed Nov 7, 2019
    This reverts CL 200577.
    
    Reason for revert: broke linux-arm64-packet and solaris-amd64-oraclerel builders
    
    Fixes #35424
    Updates #33747
    
    Change-Id: I2575fd84d37995d458183caae54704f15d8b8426
    Reviewed-on: https://go-review.googlesource.com/c/go/+/205817
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Commits on Nov 6, 2019
  1. cmd/go: use lockedfile instead of renameio for go.mod and go.sum files

    bcmills committed Nov 6, 2019
    This change is based on the previous discussion in CL 202442.
    
    Fixes #34634
    
    Change-Id: I1319aa26d5cfcd034bc576555787b3ca79968c38
    Reviewed-on: https://go-review.googlesource.com/c/go/+/205637
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
  2. cmd/doc: understand vendor directories in module mode

    bcmills committed Oct 31, 2019
    This change employs the same strategy as in CL 203017
    to detect when vendoring is in use, and if so treats
    the vendor directory as a (non-module, prefixless) root.
    
    The integration test also verifies that the 'std' and 'cmd'
    modules are included and their vendored dependencies are
    visible (as they are with 'go list') even when outside of
    those modules.
    
    Fixes #35224
    
    Change-Id: I18cd01218e9eb97c1fc6e2401c1907536b0b95f7
    Reviewed-on: https://go-review.googlesource.com/c/go/+/205577
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
  3. cmd/go: make commands other than 'tidy' prune go.mod less agressively

    bcmills committed Nov 1, 2019
    Updates #31870
    Updates #33326
    Fixes #34822
    
    Change-Id: I1337f171133c20800eacc6b0955ede5a394ea7eb
    Reviewed-on: https://go-review.googlesource.com/c/go/+/204878
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
  4. cmd/doc: avoid calling token.IsExported on non-tokens

    bcmills committed Oct 31, 2019
    token.IsExported expects to be passed a token, and does not check for
    non-token arguments such as "C:\workdir\go\src\text".
    
    While we're at it, clean up a few other parts of the code that
    are assuming a package path where a directory may be passed instead.
    There are probably others lurking around here, but I believe this
    change is sufficient to get past the test failures on the
    windows-amd64-longtest builder.
    
    Fixes #35236
    
    Change-Id: Ic79fa035531ca0777f64b1446c2f9237397b1bdf
    Reviewed-on: https://go-review.googlesource.com/c/go/+/204442
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Rob Pike <r@golang.org>
    Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
  5. cmd/go: avoid upgrading to +incompatible versions if the latest compa…

    bcmills committed Oct 30, 2019
    …tible one has a go.mod file
    
    Previously we would always “upgrade” to the semantically-highest
    version, even if a newer compatible version exists.
    
    That made certain classes of mistakes irreversible: in general we
    expect users to address bad releases by releasing a new (higher)
    version, but if the bad release was an unintended +incompatible
    version, then no release that includes a go.mod file can ever have a
    higher version, and the bad release will be treated as “latest”
    forever.
    
    Instead, when considering a +incompatible version we now consult the
    latest compatible (v0 or v1) release first. If the compatible release
    contains a go.mod file, we ignore the +incompatible releases unless
    they are expicitly requested (by version, commit ID, or branch name).
    
    Fixes #34165
    Updates #34189
    
    Change-Id: I7301eb963bbb91b21d3b96a577644221ed988ab7
    Reviewed-on: https://go-review.googlesource.com/c/go/+/204440
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
Commits on Nov 5, 2019
  1. cmd: update x/mod to CL 205497

    bcmills committed Nov 5, 2019
    Also revert an incidental 'gofmt' of a vendored file from CL 205240.
    
    Updates #34822
    
    Change-Id: I82a015d865db4d865b4776a8013312f25dbb9181
    Reviewed-on: https://go-review.googlesource.com/c/go/+/205539
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  2. cmd/go/internal/modfetch: prune +incompatible versions more aggressively

    bcmills committed Oct 28, 2019
    codeRepo.Versions previously checked every possible +incompatible
    version for a 'go.mod' file. That is wasteful and counterproductive.
    
    It is wasteful because typically, a project will adopt modules at some
    major version, after which they will (be required to) use semantic
    import paths for future major versions.
    
    It is counterproductive because it causes an accidental
    '+incompatible' tag to exist, and no compatible tag can have higher
    semantic precedence.
    
    This change prunes out some of the +incompatible versions in
    codeRepo.Versions, eliminating the “wasteful” part but not all of the
    “counterproductive” part: the extraneous versions can still be fetched
    explicitly, and proxies may include them in the @v/list endpoint.
    
    Updates #34165
    Updates #34189
    Updates #34533
    
    Change-Id: Ifc52c725aa396f7fde2afc727d0d5950acd06946
    Reviewed-on: https://go-review.googlesource.com/c/go/+/204439
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
  3. cmd/go/internal/modget: synchronize writes to modOnly map in runGet

    bcmills committed Nov 4, 2019
    Fixes #35317
    
    Change-Id: Id858a25dc16a1bbff1802d25bcd4aca31c1133bc
    Reviewed-on: https://go-review.googlesource.com/c/go/+/205067
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
  4. cmd/go: make 'go mod why' require a main module

    bcmills committed Nov 4, 2019
    Updates #32027
    
    Change-Id: Ifc9427f35188c3fd356917d8510f3e01866ebca8
    Reviewed-on: https://go-review.googlesource.com/c/go/+/205065
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
  5. cmd/compile: do not skip TestFormats on short builders

    bcmills committed Nov 5, 2019
    TestFormats adds ~3s of running time to the test, which may be
    slightly annoying in an edit/compile/test cycle but is negligible in a
    TryBot run.
    
    The test keeps regressing in the longtest builders, requiring a manual
    fix. Instead, run it even in short mode on the builders, so that
    TryBot runs will detect regressions ahead of time.
    
    Updates #34907
    Updates #33915
    Updates #28621
    
    Change-Id: I6f9bf0f2ca929a743438310b86d85d8673c720bf
    Reviewed-on: https://go-review.googlesource.com/c/go/+/205440
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  6. cmd/go: derive TestExecutableGOROOT environment from tg.env instead o…

    bcmills committed Nov 4, 2019
    …f os.Environ()
    
    TestExecutableGOROOT, unlike most other tests in go_test.go, was
    running subcommands in a process with an environment derived directly
    from os.Environ(), rather than using tg.env on its testgoData object.
    
    Since tg.env is what sets GO111MODULE=off for GOPATH-mode tests, that
    caused TestExecutableGOROOT to unexpectedly run in module mode instead
    of GOPATH mode. If the user's environment included 'GOFLAGS=-mod=mod',
    that would cause the test to spuriously fail due to the inability to
    download modules to $HOME (which in this test binary is hard-coded to
    "/test-go-home-does-not-exist").
    
    Updates #33848
    
    Change-Id: I2f343008dd9e38cd76b9919eafd5a3181d0cbd6f
    Reviewed-on: https://go-review.googlesource.com/c/go/+/205064
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Ian Lance Taylor <iant@golang.org>
  7. cmd/go/internal/modfetch: remove non-hermetic test

    bcmills committed Nov 5, 2019
    The test for gopkg.in/yaml.v2@v2 assumes that there are
    no future upstream releases. That assumption empirically
    does not hold. Backporting fixes to this test is annoying,
    and other gopkg.in cases are already reasonably covered,
    so remove the problematic test.
    
    Updates #28856
    
    Change-Id: I6455baa1816ac69e02d1ad5d03b82a93e1481a17
    Reviewed-on: https://go-review.googlesource.com/c/go/+/205437
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  8. cmd/go.mod: upgrade x/mod to pull in CL 204821

    bcmills committed Nov 1, 2019
    Updates #34822
    
    Change-Id: I189d93ebd3ce6cd1b8f1e29336876fd82a7cfff7
    Reviewed-on: https://go-review.googlesource.com/c/go/+/204877
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Commits on Nov 1, 2019
  1. cmd/go: adjust module-related logging

    bcmills committed Nov 1, 2019
    Suppress “finding” messages unless they are unusually slow, and
    “extracting” messages always (they almost always occur conjunction
    with “downloading”, which is already logged).
    
    Log “found” messages for module dependencies added to satisfy missing
    import paths.
    
    Log top-level version changes in 'go get' when the selected version
    is not identical to the version requested on the command line.
    
    Updates #26152
    Updates #33284
    
    Change-Id: I4d0de60fab58d7cc7df8a2aff05c8b5b2220e626
    Reviewed-on: https://go-review.googlesource.com/c/go/+/204777
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
  2. cmd/go: default to mod=readonly when the go.mod file is read-only

    bcmills committed Oct 31, 2019
    Updates #30185
    Updates #33326
    Updates #34822
    
    Change-Id: Ie13651585898d1bbbf4f779b97ee50b6c7e7ad50
    Reviewed-on: https://go-review.googlesource.com/c/go/+/204521
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
Commits on Oct 29, 2019
  1. go/build: use the main module's root when locating module sources

    bcmills committed Oct 28, 2019
    Previously, we were using srcDir, which would apply the wrong module
    dependencies (including the wrong 'replace' and 'exclude' directives)
    when locating an import path within a module.
    
    Fixes #34860
    
    Change-Id: Ie59dcc2075a7b51ba40f7cd2f62dae27bf58c9b0
    Reviewed-on: https://go-review.googlesource.com/c/go/+/203820
    Reviewed-by: Jay Conrod <jayconrod@google.com>
Commits on Oct 26, 2019
  1. os: use an actual RemoveAll failure in TestRemoveAllWithMoreErrorThan…

    bcmills committed Oct 25, 2019
    …ReqSize
    
    Previously we injected an error, and the injection points were
    (empirically) not realistic on some platforms.
    
    Instead, we now make the directory read-only, which (on most
    platforms) suffices to prevent the removal of its files.
    
    Fixes #35117
    Updates #29921
    
    Change-Id: Ica4e2818566f8c14df3eed7c3b8de5c0abeb6963
    Reviewed-on: https://go-review.googlesource.com/c/go/+/203502
    Reviewed-by: Ian Lance Taylor <iant@golang.org>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Commits on Oct 25, 2019
  1. cmd/go: implement svn support in module mode

    bcmills committed Oct 24, 2019
    mod_get_svn passes, and I also tested this manually on a real-world svn-hosted package:
    
    	example.com$ go mod init example.com
    	go: creating new go.mod: module example.com
    
    	example.com$ GOPROXY=direct GONOSUMDB=llvm.org go get -d llvm.org/llvm/bindings/go/llvm
    	go: finding llvm.org/llvm latest
    	go: finding llvm.org/llvm/bindings/go/llvm latest
    	go: downloading llvm.org/llvm v0.0.0-20191022153947-000000375505
    	go: extracting llvm.org/llvm v0.0.0-20191022153947-000000375505
    
    	example.com$ go list llvm.org/llvm/bindings/...
    	llvm.org/llvm/bindings/go
    	llvm.org/llvm/bindings/go/llvm
    
    Fixes #26092
    
    Change-Id: Iefe2151b82a0225c73bb6f8dd7cd8a352897d4c0
    Reviewed-on: https://go-review.googlesource.com/c/go/+/203497
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
  2. net/http: skip failing test on windows-amd64-longtest builder

    bcmills committed Oct 25, 2019
    bradfitz is actively thinking about a proper fix.
    In the meantime, skip the test to suss out any other failures in the builder.
    
    Updates #35122
    
    Change-Id: I9bf0640222e3d385c1a3e2be5ab52b80d3e8c21a
    Reviewed-on: https://go-review.googlesource.com/c/go/+/203500
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  3. os/signal: derive TestAtomicStop timeout from overall test timeout

    bcmills committed Oct 25, 2019
    Previously, TestAtomicStop used a hard-coded 2-second timeout.
    
    That empirically is not long enough on certain builders. Rather than
    adjusting it to a different arbitrary value, use a slice of the
    overall timeout for the test binary. If everything is working, we
    won't block nearly that long anyway.
    
    Updates #35085
    
    Change-Id: I7b789388e3152413395088088fc497419976cf5c
    Reviewed-on: https://go-review.googlesource.com/c/go/+/203499
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Commits on Oct 24, 2019
  1. cmd/go/internal/modfetch/codehost: remove invariantly-empty return va…

    bcmills committed Oct 24, 2019
    …lue from Repo.ReadZip
    
    Previously, codehost.Repo.ReadZip returned an 'actualSubdir' value
    that was the empty string in all current implementations.
    
    Updates #26092
    
    Change-Id: I6708dd0f13ba88bcf1a1fb405e9d818fd6f9197e
    Reviewed-on: https://go-review.googlesource.com/c/go/+/203277
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
  2. cmd/go: correct GoMod field in 'go list' for replacements that lack a…

    bcmills committed Oct 24, 2019
    …n explicit go.mod file
    
    Change-Id: I241a3bbaf9c4b779b74146232d2f144bb46a0dc7
    Reviewed-on: https://go-review.googlesource.com/c/go/+/203178
    Run-TryBot: Bryan C. Mills <bcmills@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Jay Conrod <jayconrod@google.com>
Older
You can’t perform that action at this time.