1. 04 Aug, 2015 6 commits
  2. 03 Aug, 2015 7 commits
    • Russ Cox's avatar
      cmd/go: clean up installHeader action · b3bf38e7
      Russ Cox authored
      This was confusing when I was trying to fix go build -o.
      Perhaps due to that fix, this can now be simplified from
      three functions to one.
      
      Change-Id: I878a6d243b14132a631e7c62a3bb6d101bc243ea
      Reviewed-on: https://go-review.googlesource.com/13027Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      b3bf38e7
    • Russ Cox's avatar
      cmd/go: document and fix 'go build -o' semantics · 961f456a
      Russ Cox authored
      Quoting the new docs:
      
      «
      If the arguments to build are a list of .go files, build treats
      them as a list of source files specifying a single package.
      
      When compiling a single main package, build writes
      the resulting executable to an output file named after
      the first source file ('go build ed.go rx.go' writes 'ed' or 'ed.exe')
      or the source code directory ('go build unix/sam' writes 'sam' or 'sam.exe').
      The '.exe' suffix is added when writing a Windows executable.
      
      When compiling multiple packages or a single non-main package,
      build compiles the packages but discards the resulting object,
      serving only as a check that the packages can be built.
      
      The -o flag, only allowed when compiling a single package,
      forces build to write the resulting executable or object
      to the named output file, instead of the default behavior described
      in the last two paragraphs.
      »
      
      There is a change in behavior here, namely that 'go build -o x.a x.go'
      where x.go is not a command (not package main) did not write any
      output files (back to at least Go 1.2) but now writes x.a.
      This seems more reasonable than trying to explain that -o is
      sometimes silently ignored.
      
      Otherwise the behavior is unchanged.
      
      The lines being deleted in goFilesPackage look like they are
      setting up 'go build x.o' to write 'x.a', but they were overridden
      by the p.target = "" in runBuild. Again back to at least Go 1.2,
      'go build x.go' for a non-main package has never produced
      output. It seems better to keep it that way than to change it,
      both for historical consistency and for consistency with
      'go build strings' and 'go build std'.
      
      All of this behavior is now tested.
      
      Fixes #10865.
      
      Change-Id: Iccdf21f366fbc8b5ae600a1e50dfe7fc3bff8b1c
      Reviewed-on: https://go-review.googlesource.com/13024Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: 's avatarDave Day <djd@golang.org>
      961f456a
    • Brad Fitzpatrick's avatar
      net/http: deflake TestZeroLengthPostAndResponse · e3c26b2b
      Brad Fitzpatrick authored
      It was failing with multiple goroutines a few out of every thousand
      runs (with errRequestCanceled) because it was using the same
      *http.Request for all 5 RoundTrips, but the RoundTrips' goroutines
      (notably the readLoop method) were all still running, sharing that
      same pointer. Because the response has no body (which is what
      TestZeroLengthPostAndResponse tests), the readLoop was marking the
      connection as reusable early (before the caller read until the body's
      EOF), but the Transport code was clearing the Request's cancelation
      func *AFTER* the caller had already received it from RoundTrip. This
      let the test continue looping and do the next request with the same
      pointer, fetch a connection, and then between getConn and roundTrip
      have an invariant violated: the Request's cancelation func was nil,
      tripping this check:
      
              if !pc.t.replaceReqCanceler(req.Request, pc.cancelRequest) {
                      pc.t.putIdleConn(pc)
                      return nil, errRequestCanceled
              }
      
      The solution is to clear the request cancelation func in the readLoop
      goroutine in the no-body case before it's returned to the caller.
      
      This now passes reliably:
      
      $ go test -race -run=TestZeroLengthPostAndResponse -count=3000
      
      I think we've only seen this recently because we now randomize scheduling
      of goroutines in race mode (https://golang.org/cl/11795). This race
      has existed for a long time but the window was hard to hit.
      
      Change-Id: Idb91c582919f85aef5b9e5ef23706f1ba9126e9a
      Reviewed-on: https://go-review.googlesource.com/13070
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      e3c26b2b
    • Brad Fitzpatrick's avatar
      net/http: fix server/transport data race when sharing the request body · 7aa4e29d
      Brad Fitzpatrick authored
      Introduced in https://go-review.googlesource.com/12865 (git rev c2db5f4c).
      
      This fix doesn't add any new lock acquistions: it just moves the
      existing one taken by the unreadDataSize method and moves it out
      wider.
      
      It became flaky at rev c2db5f4c, but now reliably passes again:
      $ go test -v -race -run=TestTransportAndServerSharedBodyRace -count=100 net/http
      
      Fixes #11985
      
      Change-Id: I6956d62839fd7c37e2f7441b1d425793f4a0db30
      Reviewed-on: https://go-review.googlesource.com/12909
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      7aa4e29d
    • Mikio Hara's avatar
      runtime: skip TestCgoCallbackGC on dragonfly · 5e15e28e
      Mikio Hara authored
      Updates #11990.
      
      Change-Id: I6c58923a1b5a3805acfb6e333e3c9e87f4edf4ba
      Reviewed-on: https://go-review.googlesource.com/13050Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      5e15e28e
    • Rob Pike's avatar
      doc: document new linker -X syntax in go1.5.html · 99912272
      Rob Pike authored
      Fixes #11973.
      
      Change-Id: Icffa3213246663982b7cc795982e0923e272f405
      Reviewed-on: https://go-review.googlesource.com/12919Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
      99912272
    • Andrew Gerrand's avatar
      doc: link to proposal process from contribution guidelines · 3c10bdd1
      Andrew Gerrand authored
      Change-Id: I992cb1afeef498353d529238e508fa438d6c069c
      Reviewed-on: https://go-review.googlesource.com/12912Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
      Reviewed-by: 's avatarRob Pike <r@golang.org>
      3c10bdd1
  3. 02 Aug, 2015 3 commits
  4. 31 Jul, 2015 15 commits
  5. 30 Jul, 2015 9 commits