google/go-cmp 1988
Package for comparing Go values in tests
sketches for the Go 2 Type Parameters proposal
Reference implementations for golang/go#38203 and golang/go#19367.
go.mod files specifying consistent versions of k8s.io dependencies
bcmills/go-experience-reports 1
Experience reports for the Go programming languange (http://golang.org/wiki/ExperienceReports)
utility to export golang/go issues to CSV
Experiments and bad ideas
bcmills/extra-keyboards-for-chrome-os 0
Extra keyboard layouts and input methods for Chrome OS
Miscellaneous Go hacks
example repository for golang.org/issue/29268
issue openedgolang/go
x/tools/gopls: "no object found" when renaming a function from within its doc comment
example.com$ go version
go version devel +f7e26467b Fri Oct 30 01:31:10 2020 +0000 linux/amd64
example.com$ go version -m $(which gopls)
/usr/local/google/home/bcmills/bin/gopls: devel +186f0220d0 Mon Oct 5 11:12:24 2020 -0400
path golang.org/x/tools/gopls
mod golang.org/x/tools/gopls v0.5.1 h1:AF3Uh7HF08SZpKFfgJO6zfF3bbxyDXWqdkK4kMXiQ1o=
dep github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
dep github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
dep github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
dep golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
dep golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
dep golang.org/x/tools v0.0.0-20200930165741-f1523d29dbb9 h1:1R38tQp22dcHpTKJPjgVa16FhlDy/kHEaCM/ndi/FIc=
dep golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
dep honnef.co/go/tools v0.0.1-2020.1.5 h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k=
dep mvdan.cc/gofumpt v0.0.0-20200802201014-ab5a8192947d h1:t8TAw9WgTLghti7RYkpPmqk4JtQ3+wcP5GgZqgWeWLQ=
dep mvdan.cc/xurls/v2 v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=
What did you do?
example.go:
package example
// Foo returns a word associated with "foo".
func Foo() string {
return "bar"
}
emacs example.go- Move the point to the word
Foowithin the comment (example.go:3:4). M-x eglot-rename- Type in a new name.
What did you expect to see?
The function described in the comment should be renamed to the new name, and all known references to that function should be updated.
What did you see instead?
no object found
<details>
[Trace - 14:23:12.755 PM] Sending request 'initialize - (1)'.
Params: {"processId":1038918,"rootPath":"/tmp/tmp.nT6diPQffo/example.com/","rootUri":"file:///tmp/tmp.nT6diPQffo/example.com/","initializationOptions":null,"capabilities":{"workspace":{"applyEdit":true,"executeCommand":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":false},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":false},"configuration":true},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":true},"contextSupport":true},"hover":{"dynamicRegistration":false,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true}}},"references":{"dynamicRegistration":false},"definition":{"dynamicRegistration":false},"declaration":{"dynamicRegistration":false},"implementation":{"dynamicRegistration":false},"typeDefinition":{"dynamicRegistration":false},"documentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"documentHighlight":{"dynamicRegistration":false},"codeAction":{"dynamicRegistration":false,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"formatting":{"dynamicRegistration":false},"rangeFormatting":{"dynamicRegistration":false},"rename":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":false}},"experimental":null}}
[Trace - 14:23:12.757 PM] Received response 'initialize - (1)' in 1ms.
Result: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor.extract","refactor.rewrite","source.fixAll","source.organizeImports"]},"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":""},"renameProvider":true,"foldingRangeProvider":true,"executeCommandProvider":{"commands":["generate","fill_struct","regenerate_cgo","test","tidy","undeclared_name","upgrade_dependency","vendor","extract_variable","extract_function","gc_details","generate_gopls_mod"]},"callHierarchyProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"Build info\n----------\ngolang.org/x/tools/gopls v0.5.1\n golang.org/x/tools/[email protected] h1:AF3Uh7HF08SZpKFfgJO6zfF3bbxyDXWqdkK4kMXiQ1o=\n github.com/BurntSushi/[email protected] h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=\n github.com/google/[email protected] h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=\n github.com/sergi/[email protected] h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=\n golang.org/x/[email protected] h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=\n golang.org/x/[email protected] h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=\n golang.org/x/[email protected] h1:1R38tQp22dcHpTKJPjgVa16FhlDy/kHEaCM/ndi/FIc=\n golang.org/x/[email protected] h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=\n honnef.co/go/[email protected] h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k=\n mvdan.cc/[email protected] h1:t8TAw9WgTLghti7RYkpPmqk4JtQ3+wcP5GgZqgWeWLQ=\n mvdan.cc/xurls/[email protected] h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=\n"}}
[Trace - 14:23:12.758 PM] Sending notification 'initialized'.
Params: {}
[Trace - 14:23:12.758 PM] Received notification 'window/showMessage'.
Params: {"type":4,"message":"Loading packages..."}
[Trace - 14:23:12.758 PM] Received request 'workspace/configuration - (1)'.
Params: {"items":[{"scopeUri":"file:///tmp/tmp.nT6diPQffo/example.com/","section":"gopls"},{"scopeUri":"file:///tmp/tmp.nT6diPQffo/example.com/","section":"gopls-example.com"}]}
[Trace - 14:23:12.759 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.nT6diPQffo/example.com/example.go","version":0,"languageId":"go","text":"package example\n\n// Foo returns a word associated with \"foo\".\nfunc Foo() string {\n\treturn \"bar\"\n}\n"}}
[Trace - 14:23:12.760 PM] Sending notification 'workspace/didChangeConfiguration'.
Params: {"settings":{"gopls":{"staticcheck":true,"matcher":"CaseSensitive"}}}
[Trace - 14:23:12.760 PM] Sending request 'textDocument/documentSymbol - (2)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.nT6diPQffo/example.com/example.go"}}
[Trace - 14:23:12.765 PM] Sending response 'workspace/configuration - (1)' in 6ms.
Result: [{"staticcheck":true,"matcher":"CaseSensitive"},null]
[Trace - 14:23:12.793 PM] Received request 'client/registerCapability - (2)'.
Params: {"registrations":[{"id":"workspace/didChangeWatchedFiles-0","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"**/*.{go,mod,sum}","kind":7},{"globPattern":"/tmp/tmp.nT6diPQffo/example.com/**/*.{go,mod,sum}","kind":7}]}}]}
[Trace - 14:23:12.793 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/10/30 14:23:12 go env for /tmp/tmp.nT6diPQffo/example.com/\n(root /tmp/tmp.nT6diPQffo/example.com)\n(go version go version devel +f7e26467b Fri Oct 30 01:31:10 2020 +0000 linux/amd64\n)\n(valid build configuration = true)\n(build flags: [])\nGOPATH=/tmp/tmp.nT6diPQffo/_gopath\nGOPRIVATE=\nGOPROXY=https://proxy.golang.org,direct\nGO111MODULE=auto\nGOMOD=/tmp/tmp.nT6diPQffo/example.com/go.mod\nGOSUMDB=sum.golang.org\nGOINSECURE=\nGONOSUMDB=\nGOROOT=/usr/local/google/home/bcmills/sdk/gotip\nGOCACHE=/usr/local/google/home/bcmills/.cache/go-build\nGOMODCACHE=/tmp/tmp.nT6diPQffo/_gopath/pkg/mod\nGOFLAGS=\nGONOPROXY=\n\n"}
[Trace - 14:23:12.794 PM] Sending response 'client/registerCapability - (2)' in 1ms.
Result:
[Trace - 14:23:12.887 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/10/30 14:23:12 go/packages.Load\n\tsnapshot=0\n\tdirectory=/tmp/tmp.nT6diPQffo/example.com\n\tquery=[./... builtin]\n\tpackages=2\n"}
[Trace - 14:23:12.887 PM] Received notification 'window/showMessage'.
Params: {"type":3,"message":"Finished loading packages."}
[Trace - 14:23:12.888 PM] Received request 'workspace/configuration - (3)'.
Params: {"items":[{"scopeUri":"file:///tmp/tmp.nT6diPQffo/example.com/","section":"gopls"},{"scopeUri":"file:///tmp/tmp.nT6diPQffo/example.com/","section":"gopls-example.com"}]}
[Trace - 14:23:12.905 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///tmp/tmp.nT6diPQffo/example.com/example.go","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":15}},"severity":2,"source":"ST1000","message":"at least one file in a package should have a package comment"}]}
[Trace - 14:23:12.910 PM] Sending response 'workspace/configuration - (3)' in 22ms.
Result: [{"staticcheck":true,"matcher":"CaseSensitive"},null]
[Trace - 14:23:12.911 PM] Received response 'textDocument/documentSymbol - (2)' in 150ms.
Result: [{"name":"Foo","detail":"()","kind":12,"range":{"start":{"line":3,"character":0},"end":{"line":5,"character":1}},"selectionRange":{"start":{"line":3,"character":5},"end":{"line":3,"character":8}}}]
[Trace - 14:23:30.744 PM] Sending request 'textDocument/signatureHelp - (3)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.nT6diPQffo/example.com/example.go"},"position":{"line":2,"character":3}}
[Trace - 14:23:30.745 PM] Received response 'textDocument/signatureHelp - (3)' in 0ms.
Result: null
[Trace - 14:23:30.745 PM] Sending request 'textDocument/hover - (4)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.nT6diPQffo/example.com/example.go"},"position":{"line":2,"character":3}}
[Trace - 14:23:30.746 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2020/10/30 14:23:30 no signature help: cannot find an enclosing function\n\tposition={2 3}\n"}
[Trace - 14:23:30.746 PM] Received response 'textDocument/hover - (4)' in 0ms.
Result: null
[Trace - 14:23:30.747 PM] Sending request 'textDocument/documentHighlight - (5)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.nT6diPQffo/example.com/example.go"},"position":{"line":2,"character":3}}
[Trace - 14:23:30.747 PM] Received response 'textDocument/documentHighlight - (5)' in 0ms.
Result: []
[Trace - 14:23:37.443 PM] Sending request 'textDocument/rename - (6)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.nT6diPQffo/example.com/example.go"},"position":{"line":2,"character":3},"newName":"Baz"}
[Error - Received] 14:23:37.444 PM #6 no object found
</details>
created time in 7 hours
issue commentgolang/go
x/build: frequent timeouts running js-wasm TryBots
In several occurrences that I saw, the js-wasm TryBot started running and partially completed, then descheduled and started over again from the beginning. I think there is some sort of failure being buried by retry logic, rather than just a slow test.
If we don't have the bandwidth to diagnose this at the moment, perhaps we should temporarily demote js-wasm to an opt-in SlowBot?
comment created time in 12 hours
issue openedgolang/go
cmd/go: completion of lazy loading [freeze exception]
I've been putting in as many hours as I reasonably can over the last week trying to get lazy module loading (#36460) ready before the Nov. 1 freeze. I've made a lot of progress but there's no way I'll realistically have the capstone CL ready to mail before the freeze.
I'd like to request a freeze exception to continue work on in for an extra week or two beyond the freeze. Here's my reasoning.
On the “pro” side:
Continuing work for a week or two adds relatively little risk to the release, and mitigates some other risks.
The feedback we receive on modules changes in cmd/go during the freeze is, unfortunately, minimal.
For various reasons, the Google-internal regression testing of the release throughout the cycle by and large does not cover cmd/go or the module system. While the period from the freeze to the beta is a rich source of feedback about the compiler, standard library, and runtime, it provides essentially no additional confidence for cmd/go changes. (As evidence: consider the many regressions that went unreported during the Go 1.13 freeze — even up through the release candidates! — such as: #34747, #34679, #34497, #34215.)
Contributors to the Go project do use cmd/go regularly throughout the cycle, but they only rarely update dependencies, and the Go project's dependency graphs — especially the dependencies of the standard library — are quite small and hygienic and do not exhibit the kinds of cases that would uncover subtle bugs in the module loader, nor the cases where lazy loading is likely to make much of a difference in user experience.
Moreover, cmd/go is much more deterministic than many of the other parts of the distribution (particularly the runtime), so we are unlikely to benefit very much from additional soak time in the Go project builders. (Regressions caught by cmd/go tests tend to break builders consistently — they do not generally manifest as low-frequency flakes that would benefit from many repetitions.)
Finally, lazy loading is gated on the go version specified in the go.mod file, so even if we were to wait for the 1.17 cycle it would not trigger even for most users running a go command built from head.
We have intentionally front-loaded the integration-testing for #36460.
Having learned my lesson about the lack of pre-release feedback in Go 1.13, I spent the early part of the 1.16 cycle adding extensive regression and integration tests for the planned lazy-loading feature work, such as those in CL 222341. Those tests are derived from the lazy loading design doc and intended to be easy to adapt when lazy loading is ready, so that we can have reasonable test coverage for lazy loading as soon as the implementation is complete. (Even without lazy loading, the “control cases” for the new tests incidentally revealed many existing bugs in the go command, which I then fixed as part of the refactoring leading up to lazy loading — part of the reason it's been taking so long.)
Getting lazy loading into the 1.16 release mitigates risks from other modules changes.
We have already merged module retraction (#24031), go install pkg@version (#40276), and defaulting to -mod=readonly (#40728). All of those features benefit substantially from also having lazy loading.
-
Module retraction will report fewer retracted modules when irrelevant dependencies are pruned.
-
go installoutside of a module can be much more efficient if it does not need to resolve potentially-large chains of irrelevant dependencies. In particular,go install pkg@versionintentionally does not allowreplacedirectives, and one common use-case forreplacedirectives is to prune out invalid versions required by irrelevant transitive dependencies. With lazy loading, fewerreplacedirectives will be needed, so fewer authors will need to work around the limitations ofgo install pkg@version. -
-mod=readonlywill require users to rungo getandgo mod tidyin more situations. We have been ironing out bugs fromgo get(particularly #37438 / [CL 263267]), but those commands will be less likely to stumble over any other existing bugs — and will hopefully execute much more efficiently — if they do not have to deal with large, irrelevant transitive dependency graphs.
We are also reasonably likely to encounter interesting interactions between -mod=readonly, go get, go install, and lazy loading at some point after the first beta in which they are all present. If that necessitates changes to any of those other features, it would be nice to be able to make those changes holistically instead of working within the parameters of behaviors cemented into the final 1.16 release without accompanying lazy-loading feedback.
The lazy-loading changes will be relatively easy to roll back if needed.
Having the final changes for lazy loading land very late in the cycle would mean that very little else is built on top of them. If for some reason we ended up needing to roll them back, we wouldn't have to disentangle a lot of intervening changes.
(The only other UX change so far for lazy loading is the narrowing of the all package pattern, which is already flag-gated and IMO is a positive change regardless of lazy loading proper.)
On the “con” side:
The refactoring needed for lazy loading is difficult to flag-gate
Lazy loading requires that we replace the flat modload.buildList variable with a more structured graph. I am not comfortable writing the change in a way that maintains the flat list in parallel with the graph: there would be a high risk of skew between the graph and list implementations, and most of the existing tests would only exercise one representation or the other, substantially reducing the effective code coverage of our new and existing tests.
It will be relatively easy to gate off the actual lazy-loading behavior using the existing constants, but there isn't much we can do to gate the effects of refactoring proper without losing vital code coverage and/or introducing even more risk due to more-complex-than-necessary code.
Continuing development somewhat eats in to our documentation bandwidth.
We know that the module documentation still needs work (#33637 and others), and lazy loading is another use-case that will require documentation. The longer we spend implementing it, the higher the risk that we will under-document it.
Taking the above into account, I suggest that we:
- Continue development of lazy loading for two weeks into the freeze, then reassess progress and risks with an eye toward not delaying the planned December 1 beta.
- Keep the existing change to the
allpackage pattern, but rename its flag-constant if the rest of lazy-loading proper does not make the cut.
CC @jayconrod @matloob @rsc @golang/release
created time in a day
issue commentgolang/go
x/build: linux-386-longtest failure missing error output
2020-10-29T05:07:11-15131ca/linux-386-longtest 2020-10-27T20:04:19-de2d1c3/linux-386-longtest 2020-10-26T18:29:05-b08dfba/linux-386-longtest 2020-10-22T23:20:22-ad36f87/linux-386-longtest 2020-10-21T16:19:42-214136b/linux-386-longtest 2020-10-20T08:08:15-55b2d47/linux-386-longtest 2020-10-17T02:48:03-5faa828/linux-386-longtest 2020-10-14T20:17:49-2ec71e5/linux-386-longtest 2020-10-14T15:19:33-1671509/linux-386-longtest 2020-10-14T15:19:28-52669c4/linux-386-longtest 2020-10-13T18:26:39-6b66b59/linux-386-longtest 2020-09-28T18:46:39-f33263d/windows-amd64-2008 2020-09-26T16:04:46-f5c3eda/linux-386-longtest 2020-09-16T08:49:14-e82c9bd/linux-386-longtest 2020-09-15T02:52:12-bae9cf6/windows-amd64-2008 2020-08-26T21:17:11-32c09ae/linux-386-longtest 2020-08-19T21:49:56-6b42016/linux-386-longtest 2020-08-18T20:06:41-a401718/linux-386-longtest 2020-08-17T17:26:57-a26d687/linux-386-longtest 2020-08-14T21:04:00-016e13d/linux-386-longtest 2020-08-06T17:24:10-027d724/linux-386-longtest 2020-06-01T18:13:51-8be0de1/linux-386-longtest 2020-04-08T14:51:58-0dfb051/windows-amd64-2008 2020-01-06T19:03:05-6b1a3f7/linux-386-longtest 2019-06-02T19:28:21-ce656af/linux-amd64-longtest
comment created time in 2 days
issue commentgolang/go
runtime,time: test timeouts / deadlocks after CL 232298
Looks like x/sync/semaphore may trigger the same issue:
2020-10-20T16:03:32-67f06af/openbsd-386-62
2020-10-20T16:03:32-67f06af/openbsd-amd64-62
comment created time in 2 days
issue openedgolang/go
database/sql: failures in TestTxStmtDeadlock starting Oct. 28
--- FAIL: TestTxStmtDeadlock (0.01s)
sql_test.go:2835: unexpected error while executing stmt, err: sql: statement is closed
FAIL
FAIL database/sql 0.624s
Possibly due to CL 250178 (@tz70s, @odeke-em @kardianos).
Marking as release-blocker because deadlock and regression.
2020-10-28T19:19:04-bc0d7fd/freebsd-amd64-12_0 2020-10-28T16:55:17-d4c1ad8/openbsd-386-64
created time in 2 days
issue closedgolang/go
cmd/go: 'go list -mod=readonly' erroneously resolves imports from replaced modules
When -mod=readonly is set, go list should refuse to resolve missing dependencies, and normally does.
However, if the dependency can be satisfied by adding a requirement on a module mentioned in a replace directive, the usual lookup disabled error message is suppressed, and go list instead fails with updates to go.mod needed:
example.com$ go version
go version devel +150bd4ff Wed Sep 23 07:51:17 2020 +0000 linux/amd64
example.com$ go list -mod=readonly example.com/x
cannot find module providing package example.com/x: import lookup disabled by -mod=readonly
example.com$ go mod edit -replace=example.com/[email protected]=./x
example.com$ go list -mod=readonly example.com/x
go: found example.com/x in example.com/x v0.1.0
go: updates to go.mod needed, disabled by -mod=readonly
-- go.mod --
module example.com
go 1.16
-- x/go.mod --
module example.com/x
go 1.16
-- x/x.go --
package x
closed time in 2 days
bcmillsissue commentgolang/go
cmd/go: 'go list -mod=readonly' erroneously resolves imports from replaced modules
Fixed by CL 258220.
comment created time in 2 days
issue commentgolang/go
cmd/go: crashes when -buildmode=shared is set and modules enabled
The attached go env output appears to be truncated, and I'm a bit confused at why the path in the panic traceback indicates go1.15.
@shawn-xdji, can you confirm the version of the go command you are using, and how to installed it (i.e. built from source, from an release downloaded from https://golang.org/dl/, or from some other package manager)?
comment created time in 2 days
issue commentgolang/go
net/http: frequent failures in TestNoSnippExpectRequestBody_h2 since Oct. 28
CC @neild @odeke-em @ianlancetaylor
comment created time in 2 days
issue openedgolang/go
net/http: frequent failures in TestNoSnippExpectRequestBody_h2 since Oct. 28
2020-10-28T14:25:56-b85c2dd/aix-ppc64 2020-10-28T13:46:11-a0a4439/solaris-amd64-oraclerel 2020-10-28T13:25:44-72dec90/aix-ppc64 2020-10-28T04:20:39-02335cf/aix-ppc64 2020-10-28T01:22:47-2414e1f/aix-ppc64 2020-10-28T01:18:38-7be9158/solaris-amd64-oraclerel
Marking as release-blocker because this appears to be a regression in 1.16.
The failures so far are on somewhat esoteric builders, but those are also some of our slowest builders — this could be a timing bug that just happens to reproduce more easily on them.
created time in 2 days
issue commentgolang/go
cmd/go: do not skip the cmd/go tests for linux/mips64le
Or, at the very least, perhaps we should use skipExternal = testing.Short() instead of skipExternal = true. That way, users can indicate their willingness to wait via the -short flag.
comment created time in 3 days
issue commentgolang/go
cmd/go: do not skip the cmd/go tests for linux/mips64le
I think the skipExternal = true cases in func init should be moved into the testenv.Builder() != "" condition.
I agree that we still don't want to run these tests on the Go project's builders, but we should not assume that our builders are the only ones running the tests on these platforms.
comment created time in 3 days
issue commentgolang/go
runtime,time: test timeouts / deadlocks after CL 232298
Looks like it may also affect Windows: TestTicker failed there once too.
2020-10-27T22:57:36-b4b0144/windows-amd64-longtest
2020-10-27T20:03:25-d68c01f/netbsd-386-9_0
2020-10-27T19:52:40-c515852/netbsd-386-9_0
comment created time in 3 days
issue openedgolang/go
runtime,time: test timeouts / deadlocks after CL 232298
There appears to be an uptick in test timeouts (perhaps deadlocks?) in the OpenBSD and NetBSD builders on or around CL 232298. Since that CL affects runtime timers, we should investigate the failures to see whether it introduced a regression that could account for these timeouts.
2020-10-27T18:38:48-f0c9ae5/netbsd-amd64-9_0 2020-10-27T18:23:46-e3bb53a/openbsd-amd64-62 2020-10-27T18:13:59-3f6b1a0/netbsd-386-9_0 2020-10-27T18:13:59-3f6b1a0/netbsd-amd64-9_0 2020-10-27T18:13:59-3f6b1a0/openbsd-amd64-62 2020-10-27T17:24:42-8fdc79e/openbsd-amd64-62
CC @ALTree @ChrisHines @ianlancetaylor @aclements
created time in 3 days
issue openedgolang/go
cmd/go: 'go vet cmd' fails with "use of internal package" when run in GOROOT/src/cmd
~/go-review/src/cmd$ go version
go version devel +320cc79002 Tue Oct 27 12:36:54 2020 +0000 linux/amd64
~/go-review/src/cmd$ go vet cmd
package cmd/vendor/github.com/google/pprof/driver
vendor/github.com/google/pprof/driver/driver.go:24:2: use of internal package github.com/google/pprof/internal/driver not allowed
package cmd/vendor/github.com/google/pprof/driver
vendor/github.com/google/pprof/driver/driver.go:25:2: use of internal package github.com/google/pprof/internal/plugin not allowed
…
~/go-review/src/cmd$ cd ..
~/go-review/src$ go vet cmd
~/go-review/src$
I'm not actually sure whether this bug is in cmd/go or in cmd/vet.
There was a similar issue (#41358) in cmd/api which we resolved by omitting the vendored packages. However, in this case I think we really should be running vet on these packages — we just need to get go vet to interpret the imports from within those packages correctly.
This comment in cmd/go is related:
https://github.com/golang/go/blob/ece7a33386a4fbd2ff9859902f780ed82120b985/src/cmd/go/internal/modload/load.go#L1151-L1155
CC @matloob @jayconrod
created time in 3 days
issue commentgolang/go
runtime: 'unexpected fault address 0x0' in crypto/sha256.blockGeneric on linux/mips64le
CC @randall77 @mengzhuo @cherrymui
comment created time in 3 days
issue commentgolang/go
runtime: 'unexpected fault address 0x0' in evacuate_fast32 on linux-mips64le-mengzhuo builder
#42229 has a very similar failure mode.
comment created time in 3 days
issue commentgolang/go
cmd/go/internal: signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x120259a80
I suspect that this is a bug in the compiler or runtime specific to mips64le or perhaps MIPS in general.
The symptom is similar to #34835.
comment created time in 3 days
issue commentgolang/go
cmd/go: revert special-case allowing "sync" to import "runtime/internal/atomic"
We definitely need to revert the change in src/cmd/go/internal/load/pkg.go, since that's adding the new special case that gopls is stumbling over.
It may be possible to rework the code to use go:linkname instead of directly importing the internal package. (I believe @aclements is looking into that now.) Otherwise, one possible approach might be to move runtime/internal/atomic to internal/atomic so that it can be imported in keeping with the existing internal rules.
comment created time in 4 days
issue commentgolang/go
x/tools/gopls: reports an 'invalid use of internal package' error in sync/pool.go
Marking as release-blocker for Go 1.16 because this regression was introduced by a change in cmd/go in Go 1.16.
comment created time in 4 days
issue openedgolang/go
runtime: lock ordering problem involving sysmon and rwmutexR
https://build.golang.org/log/c75fff17cab7b8b13d7261ea3463955e9536eb8b
--- FAIL: TestExec (0.03s)
exec_unix_test.go:255: 33555 ======
0 : sysmon 1 0x6b4cf8
1 : rwmutexR 30 0x6e6980
fatal error: lock ordering problem
runtime stack:
runtime.throw(0x5a65af, 0x15)
/workdir/go/src/runtime/panic.go:1112 +0x72
runtime.checkRanks(0xc000000900, 0x1, 0x1e)
/workdir/go/src/runtime/lockrank_on.go:159 +0x10c
runtime.lockWithRank.func1()
/workdir/go/src/runtime/lockrank_on.go:87 +0xbc
runtime.lockWithRank(0x6e6980, 0x1e)
/workdir/go/src/runtime/lockrank_on.go:76 +0xa5
runtime.(*rwmutex).runlock(0x6e6980)
/workdir/go/src/runtime/rwmutex.go:70 +0xa9
runtime.newm1(0xc000480000)
/workdir/go/src/runtime/proc.go:2005 +0xb5
runtime.newm(0x0, 0xc000102800, 0xc)
/workdir/go/src/runtime/proc.go:1988 +0xa6
runtime.startm(0x0, 0x0)
/workdir/go/src/runtime/proc.go:2196 +0xb4
runtime.sysmon()
/workdir/go/src/runtime/proc.go:5002 +0x366
runtime.mstart1()
/workdir/go/src/runtime/proc.go:1207 +0xc8
runtime.mstart()
/workdir/go/src/runtime/proc.go:1172 +0x6e
I'm guessing this is another missing partial-order edge.
CC @danscales @mknyszek
created time in 4 days
issue openedgolang/go
x/sys/unix: frequent test timeouts on Android builders
2020-10-24T13:24:49-ef9fd89/android-amd64-emu 2020-10-18T23:04:17-eeed37f/android-386-emu 2020-10-18T23:04:17-eeed37f/android-amd64-emu 2020-10-15T00:08:50-e3ed001/android-amd64-emu 2020-10-07T16:58:08-a893ed3/android-386-emu 2020-09-26T10:08:07-9d91bd6/android-386-emu 2020-08-24T13:15:25-c12d262/android-amd64-emu 2020-08-17T08:59:35-3ff754b/android-386-emu 2020-08-03T21:05:38-64077c9/android-amd64-emu 2020-06-15T20:00:32-f1bc736/android-amd64-emu 2020-06-15T19:00:26-2780627/android-amd64-emu 2020-05-11T23:29:37-7e40ca2/android-386-emu 2020-04-28T20:04:54-593003d/android-386-emu 2020-04-28T20:04:54-593003d/android-amd64-emu 2020-04-27T17:57:16-29b5707/android-386-emu 2020-04-27T17:57:16-29b5707/android-amd64-emu 2020-04-20T16:35:11-1957bb5/android-amd64-emu 2020-03-01T15:39:31-2f85c7e/android-amd64-emu 2020-01-24T20:44:21-9fbb57f/android-386-emu 2020-01-13T16:29:24-86b9105/android-386-emu 2020-01-13T16:29:24-86b9105/android-amd64-emu 2020-01-03T14:33:44-a1369af/android-amd64-emu 2019-11-28T01:58:09-6d18c01/android-amd64-emu 2019-11-13T15:49:46-fee6b63/android-amd64-emu 2019-10-29T15:55:21-f43be2a/android-amd64-emu 2019-10-27T21:15:39-f8518d3/android-386-emu 2019-10-23T15:13:26-f89234f/android-386-emu 2019-10-22T10:09:44-742c48e/android-amd64-emu
CC @tklauser @hyangah @golang/release
created time in 4 days
issue openedgolang/go
x/sys/windows/svc: test failures with "The specified service has been marked for deletion."
--- FAIL: TestExample (0.54s)
svc_test.go:88: CreateService(myservice) failed: The specified service has been marked for deletion.
FAIL
FAIL golang.org/x/sys/windows/svc 0.559s
…
--- FAIL: TestMyService (0.52s)
mgr_test.go:258: UpdateConfig failed: The specified service has been marked for deletion.
FAIL
FAIL golang.org/x/sys/windows/svc/mgr 0.547s
2020-10-18T23:04:17-eeed37f/windows-amd64-longtest 2020-10-09T02:54:20-dfb3f7c/windows-amd64-longtest 2020-08-19T03:55:08-9a32b3a/windows-amd64-longtest 2020-08-17T15:53:16-9781c65/windows-amd64-longtest 2020-08-17T08:59:35-3ff754b/windows-amd64-longtest 2019-11-20T15:59:48-bd43791/windows-amd64-longtest 2019-11-20T13:05:36-6bfc516/windows-amd64-longtest 2019-11-19T19:55:28-f068ffe/windows-amd64-longtest 2019-11-19T06:07:38-e882bf8/windows-amd64-longtest 2019-11-18T13:31:27-cf1e2d5/windows-amd64-longtest 2019-11-18T07:38:50-2f86c98/windows-amd64-longtest 2019-11-15T15:19:21-52ab431/windows-amd64-longtest 2019-11-05T14:28:33-ac3223d/windows-amd64-longtest 2019-10-29T15:55:21-f43be2a/windows-amd64-longtest 2019-10-25T09:01:51-53bf42e/windows-amd64-longtest 2019-10-25T02:14:31-6c3a3bf/windows-amd64-longtest 2019-10-24T07:30:52-e66fe6e/windows-amd64-longtest 2019-10-23T14:50:28-b69606a/windows-amd64-longtest 2019-10-22T10:09:44-742c48e/windows-amd64-longtest
CC @alexbrainman @zx2c4
created time in 4 days
issue openedgolang/go
x/sys/unix: TestPselect failures due to shorter-than-expected timeout
--- FAIL: TestPselect (0.00s)
syscall_linux_test.go:244: Pselect interrupted after 126.458µs
syscall_linux_test.go:256: Pselect: timeout should have been at least 2.5ms, got 2.471501ms
FAIL
FAIL golang.org/x/sys/unix 0.572s
2020-10-22T20:17:47-fb209a7/linux-amd64-nocgo 2020-09-28T20:51:50-006507a/linux-ppc64-buildlet 2020-09-05T00:46:54-be1d343/linux-386 2020-01-24T20:44:21-9fbb57f/linux-s390x-ibm
See previously #35555.
CC @tklauser @ianlancetaylor @bradfitz
created time in 4 days
issue openedgolang/go
x/sys/unix: "out of memory in thread_start" during TestPpoll on linux-386
<details>
runtime/cgo: out of memory in thread_start
SIGABRT: abort
PC=0xf7fb0b19 m=4 sigcode=4294967290
goroutine 0 [idle]:
runtime: unknown pc 0xf7fb0b19
stack: frame={sp:0xe6b18f80, fp:0x0} stack=[0xe6319730,0xe6b19330)
e6b18f00: 00000000 00000000 00000000 00000000
e6b18f10: 00000000 00000000 00000000 00000000
e6b18f20: 00000000 00000000 00000000 00000000
e6b18f30: 00000000 00000000 00000000 00000000
e6b18f40: 00000000 00000000 00000000 00000000
e6b18f50: 00000000 00000000 00000000 00000000
e6b18f60: 00000000 00000000 00000000 00000000
e6b18f70: 00000000 00000000 00000000 00000000
e6b18f80: <e6b18f90 00000000 e6b18f90 f7df9df0
e6b18f90: 00000000 00000000 00000000 00000000
e6b18fa0: 00000000 00000000 00000000 00000000
e6b18fb0: 00000000 00000000 00000000 00000000
e6b18fc0: 00000000 00000000 00000000 00000000
e6b18fd0: 00000000 00000000 00000000 00000000
e6b18fe0: 00000000 f7fbb4d0 f7de134c 08219287
e6b18ff0: 00000000 00000000 00000000 00000000
runtime: unknown pc 0xf7fb0b19
stack: frame={sp:0xe6b18f80, fp:0x0} stack=[0xe6319730,0xe6b19330)
e6b18f00: 00000000 00000000 00000000 00000000
e6b18f10: 00000000 00000000 00000000 00000000
e6b18f20: 00000000 00000000 00000000 00000000
e6b18f30: 00000000 00000000 00000000 00000000
e6b18f40: 00000000 00000000 00000000 00000000
e6b18f50: 00000000 00000000 00000000 00000000
e6b18f60: 00000000 00000000 00000000 00000000
e6b18f70: 00000000 00000000 00000000 00000000
e6b18f80: <e6b18f90 00000000 e6b18f90 f7df9df0
e6b18f90: 00000000 00000000 00000000 00000000
e6b18fa0: 00000000 00000000 00000000 00000000
e6b18fb0: 00000000 00000000 00000000 00000000
e6b18fc0: 00000000 00000000 00000000 00000000
e6b18fd0: 00000000 00000000 00000000 00000000
e6b18fe0: 00000000 f7fbb4d0 f7de134c 08219287
e6b18ff0: 00000000 00000000 00000000 00000000
goroutine 1 [runnable]:
testing.(*T).Run(0x9082460, 0x81df38a, 0xb, 0x81eb498, 0x401)
/workdir/go/src/testing/testing.go:1219 +0x236
testing.runTests.func1(0x90015e0)
/workdir/go/src/testing/testing.go:1491 +0x5a
testing.tRunner(0x90015e0, 0x9129eec)
/workdir/go/src/testing/testing.go:1173 +0xb7
testing.runTests(0x900e100, 0x82ec7a0, 0x3a, 0x3a, 0x8ef8d664, 0xbfdd17d3, 0xb2d56a52, 0x8b, 0x82ef0e0, 0x901c48c)
/workdir/go/src/testing/testing.go:1489 +0x25a
testing.(*M).Run(0x913e000, 0x0)
/workdir/go/src/testing/testing.go:1397 +0x178
main.main()
_testmain.go:159 +0x104
goroutine 71 [runnable]:
golang.org/x/sys/unix_test.TestPpoll.func1(0x9194380, 0x9192480)
/workdir/gopath/src/golang.org/x/sys/unix/syscall_linux_test.go:106 +0x90
created by golang.org/x/sys/unix_test.TestPpoll
/workdir/gopath/src/golang.org/x/sys/unix/syscall_linux_test.go:105 +0xa5
eax 0x0
ebx 0x2
ecx 0xe6b18f90
edx 0x0
edi 0x0
esi 0x8
ebp 0xe6b18f90
esp 0xe6b18f80
eip 0xf7fb0b19
eflags 0x282
cs 0x23
fs 0x0
gs 0x63
FAIL golang.org/x/sys/unix 0.117s
</details>
2020-10-22T20:17:47-fb209a7/linux-386-longtest 2020-10-18T23:04:17-eeed37f/linux-386-longtest 2020-10-17T00:35:18-b09fb70/linux-386 2020-10-16T16:01:50-f659759/linux-386-longtest 2020-10-14T08:05:44-cc95f25/linux-386-longtest 2020-10-13T13:26:46-2da7054/linux-386-longtest 2020-09-30T18:57:26-fdedc70/linux-386 2020-09-18T17:44:21-af09f73/linux-386-longtest 2020-09-09T08:10:42-eff7692/linux-386-longtest 2020-09-08T13:41:30-d2e65c1/linux-386-longtest 2020-08-31T18:03:12-196b9ba/linux-386-longtest 2020-08-26T17:35:25-f9321e4/linux-386 2020-08-14T20:00:57-3d37ad5/linux-386-longtest 2020-06-25T21:21:54-ddb9806/linux-386 2020-06-25T21:21:54-ddb9806/linux-386-longtest 2020-06-22T21:40:17-ed371f2/linux-386-longtest 2020-06-15T19:00:26-2780627/linux-386 2020-05-19T10:57:57-fe76b77/linux-386-longtest 2020-05-01T14:52:40-bc7a7d4/linux-386 2020-03-02T15:01:41-5c8b2ff/linux-386
This test was added for #16052, but it's not at all clear to me why the test would fail in this way.
CC @tklauser @kortschak @ianlancetaylor
created time in 5 days
issue closedgolang/go
x/sys/unix: TestPpoll and TestPoll fail a `test all`
What version of Go are you using (go version)?
go version go1.11 linux/amd64
What did you do?
cd $(mktemp -d)
cat >ex.go <<.
package main
import (
"fmt"
_ "golang.org/x/sys/unix"
)
func main() {
fmt.Println("example")
}
.
go mod init example && go test all; echo $?
What did you expect to see?
0
What did you see instead?
1
The tests fail, presumably because it's run in a non-writable place.
--- FAIL: TestPpoll (0.00s)
syscall_unix_test.go:613: mktmpfifo: failed to create FIFO: permission denied
--- FAIL: TestPoll (0.00s)
syscall_unix_test.go:613: mktmpfifo: failed to create FIFO: permission denied
FAIL
FAIL golang.org/x/sys/unix 0.171s
With modules, is there a place that tests can write to?
closed time in 5 days
hdonnayissue commentgolang/go
x/sys/unix: TestPpoll and TestPoll fail a `test all`
Fixed by CL 162987.
comment created time in 5 days
issue commentgolang/go
x/sys: TestFstatat failures on dragonfly-amd64
See previously #29401, #29447.
comment created time in 5 days
issue openedgolang/go
x/sys: TestFstatat failures on dragonfly-amd64
TestFstatat appears to be flaky on the Dragonfly BSD builder:
--- FAIL: TestFstatat (0.00s)
syscall_unix_test.go:674: Fstatat: returned stat does not match Stat
FAIL
FAIL golang.org/x/sys/unix 1.885s
Since the test output is not particularly useful, it's not clear to me whether this is a bug in x/sys, in the test itself, or in the Dragonfly kernel.
2020-10-24T23:29:16-9f70ab9/dragonfly-amd64-5_8 2020-10-24T13:24:49-ef9fd89/dragonfly-amd64-5_8 2020-10-20T23:07:47-6e5568b/dragonfly-amd64-5_8 2020-10-18T23:04:17-eeed37f/dragonfly-amd64-5_8 2020-10-16T16:01:50-f659759/dragonfly-amd64-5_8 2020-10-14T08:05:44-cc95f25/dragonfly-amd64 2020-10-14T08:05:44-cc95f25/dragonfly-amd64-5_8 2020-10-06T15:56:30-ac719f4/dragonfly-amd64 2020-09-23T18:26:05-d9f96fd/dragonfly-amd64-5_8 2020-09-22T07:02:32-aee5d88/dragonfly-amd64-5_8 2020-09-18T17:44:21-af09f73/dragonfly-amd64 2020-09-18T17:44:21-af09f73/dragonfly-amd64-5_8 2020-09-17T07:31:48-efd3b9a/dragonfly-amd64-5_8 2020-09-16T08:47:44-dbad9cb/dragonfly-amd64-5_8 2020-08-28T19:40:41-157a740/dragonfly-amd64 2020-07-27T15:44:30-2d971f7/dragonfly-amd64-5_8 2020-07-20T21:16:30-cb9d2d5/dragonfly-amd64 2020-04-13T16:56:38-669c56c/dragonfly-amd64 2020-01-22T13:43:26-e047566/dragonfly-amd64 2020-01-22T13:43:26-e047566/dragonfly-amd64-5_6 2020-01-21T08:24:15-34d2753/dragonfly-amd64-5_6 2020-01-17T14:54:32-59e60aa/dragonfly-amd64-5_6 2019-12-23T22:40:30-abf886d/dragonfly-amd64-5_6 2019-12-20T22:00:14-0732a99/dragonfly-amd64 2019-12-20T22:00:14-0732a99/dragonfly-amd64-5_6 2019-12-20T14:29:24-d4481ac/dragonfly-amd64 2019-12-19T23:57:34-af0d71d/dragonfly-amd64 2019-12-19T23:57:34-af0d71d/dragonfly-amd64-5_6 2019-12-18T08:49:08-4a24b40/dragonfly-amd64-5_6 2019-12-10T02:34:23-ac6580d/dragonfly-amd64 2019-12-10T02:34:23-ac6580d/dragonfly-amd64-5_6 2019-12-06T22:06:18-eeba5f6/dragonfly-amd64 2019-12-06T21:42:22-bc7efcf/dragonfly-amd64 2019-12-04T07:23:24-ce4227a/dragonfly-amd64 2019-11-28T01:58:09-6d18c01/dragonfly-amd64 2019-11-27T02:17:46-63cb32a/dragonfly-amd64 2019-11-26T13:16:56-8a8471f/dragonfly-amd64 2019-11-20T15:59:48-bd43791/dragonfly-amd64 2019-11-19T06:07:38-e882bf8/dragonfly-amd64 2019-11-18T13:31:27-cf1e2d5/dragonfly-amd64 2019-11-18T01:35:47-6254a7c/dragonfly-amd64 2019-11-17T21:15:29-81af739/dragonfly-amd64 2019-11-15T15:19:21-52ab431/dragonfly-amd64 2019-11-13T16:50:36-4c7a9d0/dragonfly-amd64
CC @tklauser @tuxillo
created time in 5 days
issue commentgolang/go
x/sync/errgroup: why not recover the fn's err in errgroup
@ash2k, it is possible for a library to change the behavior either way.
Consider:
func unrecover(f func()) {
defer func() {
if r := recover(); r != nil {
go panic(r) // Move the panic to a new goroutine so that it cannot be recovered.
}
}()
f()
}
comment created time in 5 days
issue commentgolang/go
proposal: path/filepath: add WalkDir (Walk using DirEntry)
To me, the ability to easily convert callers using filepath.Walk to use io/fs and the DirEntry API is compelling. Any cleaner / simpler / different-style API is not likely to address that use-case, so it seems to me that we will want some API very close to filepath.Walk regardless of whether we also decide to add an iterator-based API.
WalkDir addresses the known use-case of “something close enough to filepath.Walk to make porting easy”, so I think we should go ahead and add it. Then we can decide the separate use-case of “something simpler or less error-prone than filepath.Walk” without the time pressure of holding up the migration of existing code to io/fs.
comment created time in 7 days
issue commentgolang/go
cmd/go: 'go get -d' does not report line numbers in errors for bad import statements
I'm not sure. I'm still in the process of overhauling the go get implementation for #36460.
comment created time in 8 days
issue closedgolang/go
x/tools/gopls: show signature help when typing a struct as an argument to a function?
What version?
$ go version
go version devel +4c7a18d74 Thu Oct 22 01:20:16 2020 +0000 linux/amd64
$ go version -m $(which gopls)
/usr/local/google/home/bcmills/bin/gopls: devel +186f0220d0 Mon Oct 5 11:12:24 2020 -0400
path golang.org/x/tools/gopls
mod golang.org/x/tools/gopls v0.5.1 h1:AF3Uh7HF08SZpKFfgJO6zfF3bbxyDXWqdkK4kMXiQ1o=
dep github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
dep github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
dep github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
dep golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
dep golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
dep golang.org/x/tools v0.0.0-20200930165741-f1523d29dbb9 h1:1R38tQp22dcHpTKJPjgVa16FhlDy/kHEaCM/ndi/FIc=
dep golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
dep honnef.co/go/tools v0.0.1-2020.1.5 h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k=
dep mvdan.cc/gofumpt v0.0.0-20200802201014-ab5a8192947d h1:t8TAw9WgTLghti7RYkpPmqk4JtQ3+wcP5GgZqgWeWLQ=
dep mvdan.cc/xurls/v2 v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=
What did you do?
$ cat > example.go
package example
import "os"
func F() {
var errs []*os.PathError
errs = append(errs, &os.PathError{
// Place cursor here.
})
_ = errs
}
$ emacs example.go
- Move the cursor to the beginning of the
// Place cursor here.comment.
What did you expect to see?
Hover information about the fields of the containing struct.
What did you see instead?
Hover information about the built-in append function.
<details>
[Trace - 11:29:14.338 AM] Sending request 'initialize - (1)'.
Params: {"processId":595917,"rootPath":"/tmp/tmp.6zQzInLjRX/example.com/","rootUri":"file:///tmp/tmp.6zQzInLjRX/example.com/","initializationOptions":null,"capabilities":{"workspace":{"applyEdit":true,"executeCommand":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":false},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":false},"configuration":true},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":true},"contextSupport":true},"hover":{"dynamicRegistration":false,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true}}},"references":{"dynamicRegistration":false},"definition":{"dynamicRegistration":false},"declaration":{"dynamicRegistration":false},"implementation":{"dynamicRegistration":false},"typeDefinition":{"dynamicRegistration":false},"documentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"documentHighlight":{"dynamicRegistration":false},"codeAction":{"dynamicRegistration":false,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"formatting":{"dynamicRegistration":false},"rangeFormatting":{"dynamicRegistration":false},"rename":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":false}},"experimental":null}}
[Trace - 11:29:14.339 AM] Received response 'initialize - (1)' in 1ms.
Result: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor.extract","refactor.rewrite","source.fixAll","source.organizeImports"]},"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":""},"renameProvider":true,"foldingRangeProvider":true,"executeCommandProvider":{"commands":["generate","fill_struct","regenerate_cgo","test","tidy","undeclared_name","upgrade_dependency","vendor","extract_variable","extract_function","gc_details","generate_gopls_mod"]},"callHierarchyProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"Build info\n----------\ngolang.org/x/tools/gopls v0.5.1\n golang.org/x/tools/[email protected] h1:AF3Uh7HF08SZpKFfgJO6zfF3bbxyDXWqdkK4kMXiQ1o=\n github.com/BurntSushi/[email protected] h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=\n github.com/google/[email protected] h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=\n github.com/sergi/[email protected] h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=\n golang.org/x/[email protected] h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=\n golang.org/x/[email protected] h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=\n golang.org/x/[email protected] h1:1R38tQp22dcHpTKJPjgVa16FhlDy/kHEaCM/ndi/FIc=\n golang.org/x/[email protected] h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=\n honnef.co/go/[email protected] h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k=\n mvdan.cc/[email protected] h1:t8TAw9WgTLghti7RYkpPmqk4JtQ3+wcP5GgZqgWeWLQ=\n mvdan.cc/xurls/[email protected] h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=\n"}}
[Trace - 11:29:14.341 AM] Sending notification 'initialized'.
Params: {}
[Trace - 11:29:14.341 AM] Received notification 'window/showMessage'.
Params: {"type":4,"message":"Loading packages..."}
[Trace - 11:29:14.341 AM] Received request 'workspace/configuration - (1)'.
Params: {"items":[{"scopeUri":"file:///tmp/tmp.6zQzInLjRX/example.com/","section":"gopls"},{"scopeUri":"file:///tmp/tmp.6zQzInLjRX/example.com/","section":"gopls-example.com"}]}
[Trace - 11:29:14.343 AM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.6zQzInLjRX/example.com/example.go","version":0,"languageId":"go","text":"package example\n\nimport \"os\"\n\nfunc F() {\n\tvar errs []*os.PathError\n\terrs = append(errs, &os.PathError{\n\t\t// Place cursor here.\n\t})\n\t_ = errs\n}\n"}}
[Trace - 11:29:14.344 AM] Sending notification 'workspace/didChangeConfiguration'.
Params: {"settings":{"gopls":{"staticcheck":true,"matcher":"CaseSensitive"}}}
[Trace - 11:29:14.346 AM] Sending request 'textDocument/documentSymbol - (2)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.6zQzInLjRX/example.com/example.go"}}
[Trace - 11:29:14.351 AM] Sending response 'workspace/configuration - (1)' in 9ms.
Result: [{"staticcheck":true,"matcher":"CaseSensitive"},null]
[Trace - 11:29:14.418 AM] Received request 'client/registerCapability - (2)'.
Params: {"registrations":[{"id":"workspace/didChangeWatchedFiles-0","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"**/*.{go,mod,sum}","kind":7},{"globPattern":"/tmp/tmp.6zQzInLjRX/example.com/**/*.{go,mod,sum}","kind":7}]}}]}
[Trace - 11:29:14.418 AM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/10/22 11:29:14 go env for /tmp/tmp.6zQzInLjRX/example.com/\n(root /tmp/tmp.6zQzInLjRX/example.com)\n(go version go version devel +4c7a18d74 Thu Oct 22 01:20:16 2020 +0000 linux/amd64\n)\n(valid build configuration = true)\n(build flags: [])\nGOMODCACHE=/tmp/tmp.6zQzInLjRX/_gopath/pkg/mod\nGOPROXY=https://proxy.golang.org,direct\nGOMOD=/tmp/tmp.6zQzInLjRX/example.com/go.mod\nGOPATH=/tmp/tmp.6zQzInLjRX/_gopath\nGOROOT=/usr/local/google/home/bcmills/sdk/gotip\nGO111MODULE=auto\nGOINSECURE=\nGONOSUMDB=\nGOPRIVATE=\nGOSUMDB=sum.golang.org\nGOCACHE=/usr/local/google/home/bcmills/.cache/go-build\nGOFLAGS=\nGONOPROXY=\n\n"}
[Trace - 11:29:14.418 AM] Sending response 'client/registerCapability - (2)' in 0ms.
Result:
[Trace - 11:29:14.674 AM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/10/22 11:29:14 go/packages.Load\n\tsnapshot=0\n\tdirectory=/tmp/tmp.6zQzInLjRX/example.com\n\tquery=[./... builtin]\n\tpackages=2\n"}
[Trace - 11:29:14.705 AM] Received notification 'window/showMessage'.
Params: {"type":3,"message":"Finished loading packages."}
[Trace - 11:29:14.705 AM] Received request 'workspace/configuration - (3)'.
Params: {"items":[{"scopeUri":"file:///tmp/tmp.6zQzInLjRX/example.com/","section":"gopls"},{"scopeUri":"file:///tmp/tmp.6zQzInLjRX/example.com/","section":"gopls-example.com"}]}
[Trace - 11:29:14.747 AM] Sending response 'workspace/configuration - (3)' in 41ms.
Result: [{"staticcheck":true,"matcher":"CaseSensitive"},null]
[Trace - 11:29:14.778 AM] Received response 'textDocument/documentSymbol - (2)' in 432ms.
Result: [{"name":"F","detail":"()","kind":12,"range":{"start":{"line":4,"character":0},"end":{"line":10,"character":1}},"selectionRange":{"start":{"line":4,"character":5},"end":{"line":4,"character":6}}}]
[Trace - 11:29:14.832 AM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///tmp/tmp.6zQzInLjRX/example.com/example.go","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":15}},"severity":2,"source":"ST1000","message":"at least one file in a package should have a package comment"}]}
[Trace - 11:29:18.761 AM] Sending request 'textDocument/signatureHelp - (3)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.6zQzInLjRX/example.com/example.go"},"position":{"line":7,"character":2}}
[Trace - 11:29:18.762 AM] Sending request 'textDocument/hover - (4)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.6zQzInLjRX/example.com/example.go"},"position":{"line":7,"character":2}}
[Trace - 11:29:18.767 AM] Received response 'textDocument/signatureHelp - (3)' in 5ms.
Result: {"signatures":[{"label":"append(slice []Type, elems ...Type) []Type","documentation":"The append built-in function appends elements to the end of a slice.","parameters":[{"label":"slice []Type"},{"label":"elems ...Type"}]}],"activeSignature":0,"activeParameter":1}
[Trace - 11:29:18.767 AM] Sending request 'textDocument/documentHighlight - (5)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.6zQzInLjRX/example.com/example.go"},"position":{"line":7,"character":2}}
[Trace - 11:29:18.767 AM] Received response 'textDocument/hover - (4)' in 5ms.
Result: null
[Trace - 11:29:18.768 AM] Received response 'textDocument/documentHighlight - (5)' in 0ms.
Result: []
</details>
closed time in 8 days
bcmillsissue commentgolang/go
x/tools/gopls: show signature help when typing a struct as an argument to a function?
Yep.
comment created time in 8 days
issue commentgolang/go
x/tools/gopls: show signature help when typing a struct as an argument to a function?
Ah, I see. That's unfortunate — I was really hoping for something a little more context-aware.
comment created time in 8 days
issue commentgolang/go
x/tools/gopls: show signature help when typing a struct as an argument to a function?
it probably wouldn't work well for
goplsto be checking if the user typed the opening{for a struct on every file change.
Could you elaborate? (It's already checking whether the user typed the opening ( for a function call on every file change, isn't it? Or is the signature help triggered some other way?)
comment created time in 8 days
issue commentgolang/go
x/tools/gopls: show signature help when typing a struct as an argument to a function?
Oh, neato! Yeah, if I run M-x company-complete I do get the expected completions.
So, I guess what's missing here is a mechanism in the LSP protocol, so that gopls could notify the client that completions are available even though there is no trigger character?
comment created time in 8 days
issue commentgolang/go
x/tools/gopls: show signature help when typing a struct as an argument to a function?
Yeah, just removing the signature wouldn't be particularly helpful: I really want some guidance for the struct fields.
I guess a simpler reproducer is:
package example
import "os"
func F() error {
return &os.PathError{
// Place cursor here.
}
}
In that case, I get no hovers or completions at all. I guess the idea is that I should use a Fill <struct> action here? (But I don't want to actually fill in the struct — I just want to see which fields I could set.)
My initial reaction was that I should get a hover with a doc summary for the struct type, but maybe that's not quite right either. Maybe I actually want completions for all of the struct fields that aren't already present in the declaration?
comment created time in 8 days
issue openedgolang/go
x/tools/gopls: unhelpful hover content inside a struct passed as an argument to 'append'
What version?
$ go version
go version devel +4c7a18d74 Thu Oct 22 01:20:16 2020 +0000 linux/amd64
$ go version -m $(which gopls)
/usr/local/google/home/bcmills/bin/gopls: devel +186f0220d0 Mon Oct 5 11:12:24 2020 -0400
path golang.org/x/tools/gopls
mod golang.org/x/tools/gopls v0.5.1 h1:AF3Uh7HF08SZpKFfgJO6zfF3bbxyDXWqdkK4kMXiQ1o=
dep github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
dep github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
dep github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
dep golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
dep golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
dep golang.org/x/tools v0.0.0-20200930165741-f1523d29dbb9 h1:1R38tQp22dcHpTKJPjgVa16FhlDy/kHEaCM/ndi/FIc=
dep golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
dep honnef.co/go/tools v0.0.1-2020.1.5 h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k=
dep mvdan.cc/gofumpt v0.0.0-20200802201014-ab5a8192947d h1:t8TAw9WgTLghti7RYkpPmqk4JtQ3+wcP5GgZqgWeWLQ=
dep mvdan.cc/xurls/v2 v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=
What did you do?
$ cat > example.go
package example
import "os"
func F() {
var errs []*os.PathError
errs = append(errs, &os.PathError{
// Place cursor here.
})
_ = errs
}
$ emacs example.go
- Move the cursor to the beginning of the
// Place cursor here.comment.
What did you expect to see?
Hover information about the fields of the containing struct.
What did you see instead?
Hover information about the built-in append function.
<details>
[Trace - 11:29:14.338 AM] Sending request 'initialize - (1)'.
Params: {"processId":595917,"rootPath":"/tmp/tmp.6zQzInLjRX/example.com/","rootUri":"file:///tmp/tmp.6zQzInLjRX/example.com/","initializationOptions":null,"capabilities":{"workspace":{"applyEdit":true,"executeCommand":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":false},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":false},"configuration":true},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":true},"contextSupport":true},"hover":{"dynamicRegistration":false,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true}}},"references":{"dynamicRegistration":false},"definition":{"dynamicRegistration":false},"declaration":{"dynamicRegistration":false},"implementation":{"dynamicRegistration":false},"typeDefinition":{"dynamicRegistration":false},"documentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"documentHighlight":{"dynamicRegistration":false},"codeAction":{"dynamicRegistration":false,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"formatting":{"dynamicRegistration":false},"rangeFormatting":{"dynamicRegistration":false},"rename":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":false}},"experimental":null}}
[Trace - 11:29:14.339 AM] Received response 'initialize - (1)' in 1ms.
Result: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor.extract","refactor.rewrite","source.fixAll","source.organizeImports"]},"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":""},"renameProvider":true,"foldingRangeProvider":true,"executeCommandProvider":{"commands":["generate","fill_struct","regenerate_cgo","test","tidy","undeclared_name","upgrade_dependency","vendor","extract_variable","extract_function","gc_details","generate_gopls_mod"]},"callHierarchyProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"Build info\n----------\ngolang.org/x/tools/gopls v0.5.1\n golang.org/x/tools/[email protected] h1:AF3Uh7HF08SZpKFfgJO6zfF3bbxyDXWqdkK4kMXiQ1o=\n github.com/BurntSushi/[email protected] h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=\n github.com/google/[email protected] h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=\n github.com/sergi/[email protected] h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=\n golang.org/x/[email protected] h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=\n golang.org/x/[email protected] h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=\n golang.org/x/[email protected] h1:1R38tQp22dcHpTKJPjgVa16FhlDy/kHEaCM/ndi/FIc=\n golang.org/x/[email protected] h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=\n honnef.co/go/[email protected] h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k=\n mvdan.cc/[email protected] h1:t8TAw9WgTLghti7RYkpPmqk4JtQ3+wcP5GgZqgWeWLQ=\n mvdan.cc/xurls/[email protected] h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=\n"}}
[Trace - 11:29:14.341 AM] Sending notification 'initialized'.
Params: {}
[Trace - 11:29:14.341 AM] Received notification 'window/showMessage'.
Params: {"type":4,"message":"Loading packages..."}
[Trace - 11:29:14.341 AM] Received request 'workspace/configuration - (1)'.
Params: {"items":[{"scopeUri":"file:///tmp/tmp.6zQzInLjRX/example.com/","section":"gopls"},{"scopeUri":"file:///tmp/tmp.6zQzInLjRX/example.com/","section":"gopls-example.com"}]}
[Trace - 11:29:14.343 AM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.6zQzInLjRX/example.com/example.go","version":0,"languageId":"go","text":"package example\n\nimport \"os\"\n\nfunc F() {\n\tvar errs []*os.PathError\n\terrs = append(errs, &os.PathError{\n\t\t// Place cursor here.\n\t})\n\t_ = errs\n}\n"}}
[Trace - 11:29:14.344 AM] Sending notification 'workspace/didChangeConfiguration'.
Params: {"settings":{"gopls":{"staticcheck":true,"matcher":"CaseSensitive"}}}
[Trace - 11:29:14.346 AM] Sending request 'textDocument/documentSymbol - (2)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.6zQzInLjRX/example.com/example.go"}}
[Trace - 11:29:14.351 AM] Sending response 'workspace/configuration - (1)' in 9ms.
Result: [{"staticcheck":true,"matcher":"CaseSensitive"},null]
[Trace - 11:29:14.418 AM] Received request 'client/registerCapability - (2)'.
Params: {"registrations":[{"id":"workspace/didChangeWatchedFiles-0","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"**/*.{go,mod,sum}","kind":7},{"globPattern":"/tmp/tmp.6zQzInLjRX/example.com/**/*.{go,mod,sum}","kind":7}]}}]}
[Trace - 11:29:14.418 AM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/10/22 11:29:14 go env for /tmp/tmp.6zQzInLjRX/example.com/\n(root /tmp/tmp.6zQzInLjRX/example.com)\n(go version go version devel +4c7a18d74 Thu Oct 22 01:20:16 2020 +0000 linux/amd64\n)\n(valid build configuration = true)\n(build flags: [])\nGOMODCACHE=/tmp/tmp.6zQzInLjRX/_gopath/pkg/mod\nGOPROXY=https://proxy.golang.org,direct\nGOMOD=/tmp/tmp.6zQzInLjRX/example.com/go.mod\nGOPATH=/tmp/tmp.6zQzInLjRX/_gopath\nGOROOT=/usr/local/google/home/bcmills/sdk/gotip\nGO111MODULE=auto\nGOINSECURE=\nGONOSUMDB=\nGOPRIVATE=\nGOSUMDB=sum.golang.org\nGOCACHE=/usr/local/google/home/bcmills/.cache/go-build\nGOFLAGS=\nGONOPROXY=\n\n"}
[Trace - 11:29:14.418 AM] Sending response 'client/registerCapability - (2)' in 0ms.
Result:
[Trace - 11:29:14.674 AM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/10/22 11:29:14 go/packages.Load\n\tsnapshot=0\n\tdirectory=/tmp/tmp.6zQzInLjRX/example.com\n\tquery=[./... builtin]\n\tpackages=2\n"}
[Trace - 11:29:14.705 AM] Received notification 'window/showMessage'.
Params: {"type":3,"message":"Finished loading packages."}
[Trace - 11:29:14.705 AM] Received request 'workspace/configuration - (3)'.
Params: {"items":[{"scopeUri":"file:///tmp/tmp.6zQzInLjRX/example.com/","section":"gopls"},{"scopeUri":"file:///tmp/tmp.6zQzInLjRX/example.com/","section":"gopls-example.com"}]}
[Trace - 11:29:14.747 AM] Sending response 'workspace/configuration - (3)' in 41ms.
Result: [{"staticcheck":true,"matcher":"CaseSensitive"},null]
[Trace - 11:29:14.778 AM] Received response 'textDocument/documentSymbol - (2)' in 432ms.
Result: [{"name":"F","detail":"()","kind":12,"range":{"start":{"line":4,"character":0},"end":{"line":10,"character":1}},"selectionRange":{"start":{"line":4,"character":5},"end":{"line":4,"character":6}}}]
[Trace - 11:29:14.832 AM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///tmp/tmp.6zQzInLjRX/example.com/example.go","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":15}},"severity":2,"source":"ST1000","message":"at least one file in a package should have a package comment"}]}
[Trace - 11:29:18.761 AM] Sending request 'textDocument/signatureHelp - (3)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.6zQzInLjRX/example.com/example.go"},"position":{"line":7,"character":2}}
[Trace - 11:29:18.762 AM] Sending request 'textDocument/hover - (4)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.6zQzInLjRX/example.com/example.go"},"position":{"line":7,"character":2}}
[Trace - 11:29:18.767 AM] Received response 'textDocument/signatureHelp - (3)' in 5ms.
Result: {"signatures":[{"label":"append(slice []Type, elems ...Type) []Type","documentation":"The append built-in function appends elements to the end of a slice.","parameters":[{"label":"slice []Type"},{"label":"elems ...Type"}]}],"activeSignature":0,"activeParameter":1}
[Trace - 11:29:18.767 AM] Sending request 'textDocument/documentHighlight - (5)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.6zQzInLjRX/example.com/example.go"},"position":{"line":7,"character":2}}
[Trace - 11:29:18.767 AM] Received response 'textDocument/hover - (4)' in 5ms.
Result: null
[Trace - 11:29:18.768 AM] Received response 'textDocument/documentHighlight - (5)' in 0ms.
Result: []
</details>
created time in 8 days
issue openedgolang/go
x/tools/gopls: rename fails to update doc comment for local variable of function type
What version are you using?
<pre> $ go version go version devel +491fe1b95 Wed Oct 21 07:36:08 2020 +0000 linux/amd64
$ go version -m $(which gopls) /usr/local/google/home/bcmills/bin/gopls: devel +186f0220d0 Mon Oct 5 11:12:24 2020 -0400 path golang.org/x/tools/gopls mod golang.org/x/tools/gopls v0.5.1 h1:AF3Uh7HF08SZpKFfgJO6zfF3bbxyDXWqdkK4kMXiQ1o= dep github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= dep github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= dep github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= dep golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= dep golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA= dep golang.org/x/tools v0.0.0-20200930165741-f1523d29dbb9 h1:1R38tQp22dcHpTKJPjgVa16FhlDy/kHEaCM/ndi/FIc= dep golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= dep honnef.co/go/tools v0.0.1-2020.1.5 h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k= dep mvdan.cc/gofumpt v0.0.0-20200802201014-ab5a8192947d h1:t8TAw9WgTLghti7RYkpPmqk4JtQ3+wcP5GgZqgWeWLQ= dep mvdan.cc/xurls/v2 v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=
</pre>
What did you do?
$ cat > example.go
package example
func F() {
// f computes things.
f := func() {}
f()
}
$ emacs example.go
-
Move the cursor to the start of
f :=(atexample.go:5:2). -
M-x eglot-renameand enter a new name (g).
What did you expect to see?
Since the initial comment for local function f follows the Go convention for function documentation, the comment should be updated to remain consistent with that documentation: // g computes things.
What did you see instead?
The variable declaration and call site are updated, but the comment is not.
<details>
[Trace - 22:08:49.202 PM] Sending request 'initialize - (1)'.
Params: {"processId":471498,"rootPath":"/tmp/tmp.34b4txjdJE/example.com/","rootUri":"file:///tmp/tmp.34b4txjdJE/example.com/","initializationOptions":null,"capabilities":{"workspace":{"applyEdit":true,"executeCommand":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":false},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":false},"configuration":true},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":true},"contextSupport":true},"hover":{"dynamicRegistration":false,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true}}},"references":{"dynamicRegistration":false},"definition":{"dynamicRegistration":false},"declaration":{"dynamicRegistration":false},"implementation":{"dynamicRegistration":false},"typeDefinition":{"dynamicRegistration":false},"documentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"documentHighlight":{"dynamicRegistration":false},"codeAction":{"dynamicRegistration":false,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"formatting":{"dynamicRegistration":false},"rangeFormatting":{"dynamicRegistration":false},"rename":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":false}},"experimental":null}}
[Trace - 22:08:49.204 PM] Received response 'initialize - (1)' in 1ms.
Result: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor.extract","refactor.rewrite","source.fixAll","source.organizeImports"]},"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":""},"renameProvider":true,"foldingRangeProvider":true,"executeCommandProvider":{"commands":["generate","fill_struct","regenerate_cgo","test","tidy","undeclared_name","upgrade_dependency","vendor","extract_variable","extract_function","gc_details","generate_gopls_mod"]},"callHierarchyProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"Build info\n----------\ngolang.org/x/tools/gopls v0.5.1\n golang.org/x/tools/[email protected] h1:AF3Uh7HF08SZpKFfgJO6zfF3bbxyDXWqdkK4kMXiQ1o=\n github.com/BurntSushi/[email protected] h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=\n github.com/google/[email protected] h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=\n github.com/sergi/[email protected] h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=\n golang.org/x/[email protected] h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=\n golang.org/x/[email protected] h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=\n golang.org/x/[email protected] h1:1R38tQp22dcHpTKJPjgVa16FhlDy/kHEaCM/ndi/FIc=\n golang.org/x/[email protected] h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=\n honnef.co/go/[email protected] h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k=\n mvdan.cc/[email protected] h1:t8TAw9WgTLghti7RYkpPmqk4JtQ3+wcP5GgZqgWeWLQ=\n mvdan.cc/xurls/[email protected] h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=\n"}}
[Trace - 22:08:49.205 PM] Sending notification 'initialized'.
Params: {}
[Trace - 22:08:49.206 PM] Received notification 'window/showMessage'.
Params: {"type":4,"message":"Loading packages..."}
[Trace - 22:08:49.206 PM] Received request 'workspace/configuration - (1)'.
Params: {"items":[{"scopeUri":"file:///tmp/tmp.34b4txjdJE/example.com/","section":"gopls"},{"scopeUri":"file:///tmp/tmp.34b4txjdJE/example.com/","section":"gopls-example.com"}]}
[Trace - 22:08:49.207 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.34b4txjdJE/example.com/example.go","version":0,"languageId":"go","text":"package example\n\nfunc F() {\n\t// f computes things.\n\tf := func() {}\n\n\tf()\n}\n"}}
[Trace - 22:08:49.207 PM] Sending notification 'workspace/didChangeConfiguration'.
Params: {"settings":{"gopls":{"staticcheck":true,"matcher":"CaseSensitive"}}}
[Trace - 22:08:49.208 PM] Sending request 'textDocument/documentSymbol - (2)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.34b4txjdJE/example.com/example.go"}}
[Trace - 22:08:49.217 PM] Sending response 'workspace/configuration - (1)' in 11ms.
Result: [{"staticcheck":true,"matcher":"CaseSensitive"},null]
[Trace - 22:08:49.254 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/10/21 22:08:49 go env for /tmp/tmp.34b4txjdJE/example.com/\n(root /tmp/tmp.34b4txjdJE/example.com)\n(go version go version devel +491fe1b95 Wed Oct 21 07:36:08 2020 +0000 linux/amd64\n)\n(valid build configuration = true)\n(build flags: [])\nGOPRIVATE=\nGO111MODULE=auto\nGOCACHE=/usr/local/google/home/bcmills/.cache/go-build\nGOPATH=/tmp/tmp.34b4txjdJE/_gopath\nGOPROXY=https://proxy.golang.org,direct\nGOSUMDB=sum.golang.org\nGOFLAGS=\nGOINSECURE=\nGOROOT=/usr/local/google/home/bcmills/sdk/gotip\nGONOPROXY=\nGONOSUMDB=\nGOMOD=/tmp/tmp.34b4txjdJE/example.com/go.mod\nGOMODCACHE=/tmp/tmp.34b4txjdJE/_gopath/pkg/mod\n\n"}
[Trace - 22:08:49.254 PM] Received request 'client/registerCapability - (2)'.
Params: {"registrations":[{"id":"workspace/didChangeWatchedFiles-0","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"**/*.{go,mod,sum}","kind":7},{"globPattern":"/tmp/tmp.34b4txjdJE/example.com/**/*.{go,mod,sum}","kind":7}]}}]}
[Trace - 22:08:49.255 PM] Sending response 'client/registerCapability - (2)' in 1ms.
Result:
[Trace - 22:08:49.343 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/10/21 22:08:49 go/packages.Load\n\tsnapshot=0\n\tdirectory=/tmp/tmp.34b4txjdJE/example.com\n\tquery=[./... builtin]\n\tpackages=2\n"}
[Trace - 22:08:49.343 PM] Received notification 'window/showMessage'.
Params: {"type":3,"message":"Finished loading packages."}
[Trace - 22:08:49.344 PM] Received request 'workspace/configuration - (3)'.
Params: {"items":[{"scopeUri":"file:///tmp/tmp.34b4txjdJE/example.com/","section":"gopls"},{"scopeUri":"file:///tmp/tmp.34b4txjdJE/example.com/","section":"gopls-example.com"}]}
[Trace - 22:08:49.363 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///tmp/tmp.34b4txjdJE/example.com/example.go","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":15}},"severity":2,"source":"ST1000","message":"at least one file in a package should have a package comment"}]}
[Trace - 22:08:49.366 PM] Sending response 'workspace/configuration - (3)' in 22ms.
Result: [{"staticcheck":true,"matcher":"CaseSensitive"},null]
[Trace - 22:08:49.367 PM] Received response 'textDocument/documentSymbol - (2)' in 158ms.
Result: [{"name":"F","detail":"()","kind":12,"range":{"start":{"line":2,"character":0},"end":{"line":7,"character":1}},"selectionRange":{"start":{"line":2,"character":5},"end":{"line":2,"character":6}}}]
[Trace - 22:08:51.295 PM] Sending request 'textDocument/signatureHelp - (3)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.34b4txjdJE/example.com/example.go"},"position":{"line":4,"character":1}}
[Trace - 22:08:51.296 PM] Received response 'textDocument/signatureHelp - (3)' in 0ms.
Result: null
[Trace - 22:08:51.296 PM] Sending request 'textDocument/hover - (4)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.34b4txjdJE/example.com/example.go"},"position":{"line":4,"character":1}}
[Trace - 22:08:51.296 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2020/10/21 22:08:51 no signature help: cannot find an enclosing function\n\tposition={4 1}\n"}
[Trace - 22:08:51.297 PM] Received response 'textDocument/hover - (4)' in 0ms.
Result: {"contents":{"kind":"markdown","value":"```go\nvar f func()\n```"},"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":2}}}
[Trace - 22:08:51.297 PM] Sending request 'textDocument/documentHighlight - (5)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.34b4txjdJE/example.com/example.go"},"position":{"line":4,"character":1}}
[Trace - 22:08:51.298 PM] Received response 'textDocument/documentHighlight - (5)' in 0ms.
Result: [{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":2}},"kind":1},{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"kind":1}]
[Trace - 22:09:29.887 PM] Sending request 'textDocument/rename - (6)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.34b4txjdJE/example.com/example.go"},"position":{"line":4,"character":1},"newName":"g"}
[Trace - 22:09:29.888 PM] Received response 'textDocument/rename - (6)' in 0ms.
Result: {"documentChanges":[{"textDocument":{"version":0,"uri":"file:///tmp/tmp.34b4txjdJE/example.com/example.go"},"edits":[{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":2}},"newText":"g"},{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"newText":"g"}]}]}
[Trace - 22:09:34.399 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.34b4txjdJE/example.com/example.go","version":2},"contentChanges":[{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":2}},"rangeLength":1,"text":"g"},{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":2}},"rangeLength":1,"text":"g"}]}
</details>
created time in 9 days
issue commentgolang/go
proposal: Go 2: sum types using interface type lists
@bokwoon95, the keyword interface seems to subtle to me for that use-case. (interface to me does not say “underlying type”.)
switch s.(underlying) seems reasonable, though, or switch underlying(s).
comment created time in 9 days
issue commentgolang/go
-cover measures how much the test covers of the corresponding package.
In the example you have provided, the Sum function is part of the test itself (it is a test-helper function), not the package per se.
(Note that https://quii.gitbook.io/learn-go-with-tests/go-fundamentals/arrays-and-slices#write-the-minimal-amount-of-code-for-the-test-to-run-and-check-the-failing-test-output begins, “In sum.go”.)
comment created time in 9 days
issue closedgolang/go
<!-- Please answer these questions before submitting your issue. Thanks! For questions please use one of our forums: https://github.com/golang/go/wiki/Questions -->
What version of Go are you using (go version)?
<pre> $ go version : 1.15.3 windows/amd64
</pre>
Does this issue reproduce with the latest release?
Still have the same issue with the latest version
What operating system and processor architecture are you using (go env)?
<details><summary><code>go env</code> Output</summary><br><pre> $ go env
set GO111MODULE= set GOARCH=amd64 set GOBIN= set GOCACHE=C:\Users\Emptiness\AppData\Local\go-build set GOENV=C:\Users\Emptiness\AppData\Roaming\go\env set GOEXE=.exe set GOFLAGS= set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOINSECURE= set GOMODCACHE=C:\Users\Emptiness\go\pkg\mod set GONOPROXY= set GONOSUMDB= set GOOS=windows set GOPATH=C:\Users\Emptiness\go set GOPRIVATE= set GOPROXY=https://proxy.golang.org,direct set GOROOT=c:\go set GOSUMDB=sum.golang.org set GOTMPDIR= set GOTOOLDIR=c:\go\pkg\tool\windows_amd64 set GCCGO=gccgo set AR=ar set CC=gcc set CXX=g++ set CGO_ENABLED=1 set GOMOD=C:\Users\Emptiness\source\repos\go-programming\go.mod set CGO_CFLAGS=-g -O2 set CGO_CPPFLAGS= set CGO_CXXFLAGS=-g -O2 set CGO_FFLAGS=-g -O2 set CGO_LDFLAGS=-g -O2 set PKG_CONFIG=pkg-config set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\EMPTIN~1\AppData\Local\Temp\go-build411590906=/tmp/go-build -gno-record-gcc-switches
</pre></details>
What did you do?
Run go test ./test/... -cover. Unit Tests coverage shows the statement: coverage: [no statements]
The following test code is a sample:
package playpen_test
import (
"testing"
)
func Sum(numbers []int) int {
sum := 0
for _, number := range numbers {
sum += number
}
return sum
}
func TestSum(t *testing.T) {
t.Run("collection of any size", func(t *testing.T) {
numbers := []int{1, 2, 3}
got := Sum(numbers)
want := 6
if got != want {
t.Errorf("got %d want %d given, %v", got, want, numbers)
}
})
}
What did you expect to see?
Showing the test coverage as per the example in https://quii.gitbook.io/learn-go-with-tests/go-fundamentals/arrays-and-slices
What did you see instead?
Have the following shown instead
or in text: ok go-programming/test/arrays 0.200s coverage: [no statements]
closed time in 9 days
NickBishop2112issue commentgolang/go
cmd/go: consider including Go's own version in 'go env'
We could close the not-quite-semver gap a little bit by using - instead of + to separate the hash: then it would read as a SemVer prefix with a pre-release suffix, which seems like not a terrible fit for the intended meaning.
comment created time in 9 days
issue commentgolang/go
proposal: path/filepath: add WalkDir (Walk using DirEntry)
I think the vast majority of WalkFunc implementations are going to do something along the lines of:
if err != nil {
log.Print(err)
return nil
}
or equivalent, or
if err != nil {
return err
}
right at the beginning.
For the latter functions, the second call for a ReadDir error seems fine: it potentially does a little more work up-front for directories that are probably just going to waste, but errors are unusual so that's no big deal.
For the former functions — the ones that just log.Print and carry on — it's also no big deal. They'll produce a little more output, but they seem intended to produce best-effort output anyway.
The only WalkFuncs that will have a problem are the ones that don't return at all in case of a non-nil error and are also not idempotent for a given input. But I suspect that those are rare compared to functions that return and functions that are idempotent (such as those that aggregate into a map).
comment created time in 9 days
issue commentgolang/go
doc: introduce a page for CI best practices
CC @stevetraut
comment created time in 9 days
issue commentgolang/go
proposal: add illustrations to documentation pages
@yiyus, @heschik points out that a convention like “See figure <file> (<alt-text>).” might be challenging for authors of non-English documentation.
We have a similar precedent in the // Deprecated: comments for APIs and // Output: comments for Example functions, so perhaps the format here could be something like // Image: <file> (<alt-text>).
comment created time in 9 days
issue commentgolang/go
proposal: add ios/amd64 as a GOOS/GOARCH
(Note that I am distinguishing here between “a configuration that we support” and “a configuration that happens to work today”.)
comment created time in 9 days
issue commentgolang/go
proposal: add ios/amd64 as a GOOS/GOARCH
I guess part of what I'm saying is: if this is a configuration that we “already kind of support”, then we need a builder (regardless of whether it is GOOS=ios or GOOS=darwin -tags=ios) to ensure that that configuration doesn't regress.
comment created time in 9 days
issue commentgolang/go
cmd/go/internal/fsys: TestWalk fails on Plan 9
Given your argument above, I suppose that the
Lstatbehavior on Plan 9 is correct and it is the other platforms that are not quite right.
Hrm. The stat(1) command on Linux is consistent with Go's Stat and Lstat:
$ cd /tmp
/tmp$ stat . --format=%n
.
I guess this is just a plain old platform variation. 😞
comment created time in 9 days
issue commentgolang/go
cmd/go/internal/fsys: TestWalk fails on Plan 9
Hmm. On other systems, there is one obvious base name to choose for ., which is the name given by calling filepath.Base on the result of os.Getwd(). But they don't do that today. 😞
Given your argument above, I suppose that the Lstat behavior on Plan 9 is correct and it is the other platforms that are not quite right.
comment created time in 10 days
issue commentgolang/go
proposal: add ios/amd64 as a GOOS/GOARCH
Is it possible to add a builder running the iOS emulator?
Per the porting policy, each port must have a builder with a designated maintainer. (We've run into issues in the past with regressions in otherwise-unsupported emulators, particularly QEMU user mode.)
comment created time in 10 days
issue commentgolang/go
cmd/go/internal/fsys: TestWalk fails on Plan 9
What does the program in https://play.golang.org/p/OHAkKG-4Tp- output when run on Plan 9?
(I can't run it myself due to #42117.)
comment created time in 10 days
issue openedgolang/go
x/build: "gomote ssh" to plan9-386 instance fails due to a "drawterm" loading error
~/go-review/src$ go version
go version devel +9848e93cb7 Wed Oct 21 09:34:39 2020 +0000 linux/amd64
~/go-review/src$ go version -m $(which gomote)
/usr/local/google/home/bcmills/bin/gomote: devel +1f48afe8db Fri Oct 16 14:26:34 2020 -0400
path golang.org/x/build/cmd/gomote
mod golang.org/x/build (devel)
dep cloud.google.com/go v0.54.0 h1:3ithwDMr7/3vpAMXiH+ZQnYbuIsh+OPhUPMFC9enmn0=
dep github.com/aws/aws-sdk-go v1.30.15 h1:Sd8QDVzzE8Sl+xNccmdj0HwMrFowv6uVUx9tGsCE1ZE=
dep github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY=
dep github.com/golang/protobuf v1.3.4 h1:87PNWwrRvUSnqS4dlcBU/ftvOIBep4sYuBLlh6rX2wk=
dep github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM=
dep github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2yCeUc=
dep go.opencensus.io v0.22.3 h1:8sGtKOrtQqkN1bp2AtX+misvLIlOmsEsNd+9NIcPEm8=
dep golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0=
dep golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw=
dep golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=
dep golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So=
dep golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
dep google.golang.org/api v0.20.0 h1:jz2KixHX7EcCPiQrySzPdnYT7DbINAypCqKZ1Z7GM40=
dep google.golang.org/genproto v0.0.0-20200305110556-506484158171 h1:xes2Q2k+d/+YNXVw0FpZkIDJiaux4OVrRKXRAzH6A0U=
dep google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk=
dep gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
~/go-review/src$ gomote ssh user-bcmills-plan9-386-0
$ ssh -p 2222 [email protected] # auth using https://github.com/bcmills.keys
Enter passphrase for key '/usr/local/google/home/bcmills/.ssh/id_rsa':
# Welcome to the gomote ssh proxy, bcmills.
# Connecting to/starting remote ssh...
#
# `gomote push` and the builders use:
# - workdir: /tmp/workdir
# - GOROOT: /tmp/workdir/go
# - GOPATH: /tmp/workdir/gopath
# - env: GO_BUILDER_NAME=plan9-386 GO_TEST_TIMEOUT_SCALE=3
# Happy debugging.
# Plan9 user/pass: glenda/glenda123
/usr/local/bin/drawterm: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
Connection to farmer.golang.org closed.
CC @0intro @millerresearch @fhs @golang/release
created time in 10 days
issue commentgolang/go
cmd/go/internal/fsys: TestWalk fails on Plan 9
This appears to be due to a difference in the behavior of os.Lstat on Plan 9.
On other platforms, os.Lstat(".") empirically returns a FileInfo such that fi.Name() == ".", but on Plan 9 it seems to instead return the resolved name of the current working directory.
Is that difference intentional?
comment created time in 10 days
issue commentgolang/go
cmd/go: add option to prevent 'go get -u' from updating certain dependencies
I think the best fit for this use-case is a special version query. upgrade already means “current selected version or higher”, and patch means “current selected version or higher but within the same minor version”; the logical progression of those is some third token (maybe current?) meaning “current selected version and no higher”.
comment created time in 10 days
issue commentgolang/go
cmd/go: go get -u fails with local-only replacements
I believe this is fixed as of https://golang.org/cl/258220.
@kenichi-fukushima, please try a go command built from head (either by following the instructions at https://golang.org/doc/install/source or using golang.org/dl/gotip) and let us know if it still isn't working for you.
comment created time in 10 days
issue commentgolang/go
cmd/go/internal/renameio: TestConcurrentReadsAndWrites flaky on ios-arm64-corellium builder
Unmarking as release-blocker because the mitigation is in: the test is likely still flaky but the rate should be low enough not to interfere with building releases.
comment created time in 10 days
issue commentgolang/go
We have had other requests for a go list flag to ignore build constraints (from @dominikh and a few others, IIRC). I suspect that we will end up needing to support such a flag in cmd/go at some point anyway.
comment created time in 10 days
issue openedgolang/go
example.com$ go version
go version devel +55b2d479d Tue Oct 20 08:08:15 2020 +0000 linux/amd64
example.com$ ls -d ~/.emacs.d/elpa/eglot*
/usr/local/google/home/bcmills/.emacs.d/elpa/eglot-20200830.1254
example.com$ go version -m $(which gopls)
/usr/local/google/home/bcmills/bin/gopls: devel +186f0220d0 Mon Oct 5 11:12:24 2020 -0400
path golang.org/x/tools/gopls
mod golang.org/x/tools/gopls v0.5.1 h1:AF3Uh7HF08SZpKFfgJO6zfF3bbxyDXWqdkK4kMXiQ1o=
dep github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
dep github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
dep github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
dep golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
dep golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
dep golang.org/x/tools v0.0.0-20200930165741-f1523d29dbb9 h1:1R38tQp22dcHpTKJPjgVa16FhlDy/kHEaCM/ndi/FIc=
dep golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
dep honnef.co/go/tools v0.0.1-2020.1.5 h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k=
dep mvdan.cc/gofumpt v0.0.0-20200802201014-ab5a8192947d h1:t8TAw9WgTLghti7RYkpPmqk4JtQ3+wcP5GgZqgWeWLQ=
dep mvdan.cc/xurls/v2 v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=
example.com$
Steps to reproduce
$ go mod init example.com
go: creating new go.mod: module example.com
$ go get -d golang.org/x/tools
go: downloading golang.org/x/tools v0.0.0-20201020141929-90550980fc82
go: golang.org/x/tools upgrade => v0.0.0-20201020141929-90550980fc82
example.com$ cat > example.go
package example
func F() interface{} {
}
$ emacs example.go
Now move the cursor to the function body, type return nil, and wait for completions.
Expected
nil is the obvious thing to return from a func interface{}, so it should be the first completion.
Observed
The first completion returned by gopls is the package golang.org/x/tools/go/analysis/passes/nilfunc. 😞
<details>
[Trace - 11:45:39.152 AM] Sending request 'initialize - (1)'.
Params: {"processId":9779,"rootPath":"/tmp/tmp.UF2AKOuMKI/example.com/","rootUri":"file:///tmp/tmp.UF2AKOuMKI/example.com/","initializationOptions":null,"capabilities":{"workspace":{"applyEdit":true,"executeCommand":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":false},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":false},"configuration":true},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":true},"contextSupport":true},"hover":{"dynamicRegistration":false,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true}}},"references":{"dynamicRegistration":false},"definition":{"dynamicRegistration":false},"declaration":{"dynamicRegistration":false},"implementation":{"dynamicRegistration":false},"typeDefinition":{"dynamicRegistration":false},"documentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"documentHighlight":{"dynamicRegistration":false},"codeAction":{"dynamicRegistration":false,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"formatting":{"dynamicRegistration":false},"rangeFormatting":{"dynamicRegistration":false},"rename":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":false}},"experimental":null}}
[Trace - 11:45:39.153 AM] Received response 'initialize - (1)' in 1ms.
Result: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor.extract","refactor.rewrite","source.fixAll","source.organizeImports"]},"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":""},"renameProvider":true,"foldingRangeProvider":true,"executeCommandProvider":{"commands":["generate","fill_struct","regenerate_cgo","test","tidy","undeclared_name","upgrade_dependency","vendor","extract_variable","extract_function","gc_details","generate_gopls_mod"]},"callHierarchyProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"Build info\n----------\ngolang.org/x/tools/gopls v0.5.1\n golang.org/x/tools/[email protected] h1:AF3Uh7HF08SZpKFfgJO6zfF3bbxyDXWqdkK4kMXiQ1o=\n github.com/BurntSushi/[email protected] h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=\n github.com/google/[email protected] h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=\n github.com/sergi/[email protected] h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=\n golang.org/x/[email protected] h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=\n golang.org/x/[email protected] h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=\n golang.org/x/[email protected] h1:1R38tQp22dcHpTKJPjgVa16FhlDy/kHEaCM/ndi/FIc=\n golang.org/x/[email protected] h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=\n honnef.co/go/[email protected] h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k=\n mvdan.cc/[email protected] h1:t8TAw9WgTLghti7RYkpPmqk4JtQ3+wcP5GgZqgWeWLQ=\n mvdan.cc/xurls/[email protected] h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=\n"}}
[Trace - 11:45:39.154 AM] Sending notification 'initialized'.
Params: {}
[Trace - 11:45:39.155 AM] Received notification 'window/showMessage'.
Params: {"type":4,"message":"Loading packages..."}
[Trace - 11:45:39.155 AM] Received request 'workspace/configuration - (1)'.
Params: {"items":[{"scopeUri":"file:///tmp/tmp.UF2AKOuMKI/example.com/","section":"gopls"},{"scopeUri":"file:///tmp/tmp.UF2AKOuMKI/example.com/","section":"gopls-example.com"}]}
[Trace - 11:45:39.155 AM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go","version":0,"languageId":"go","text":"package example\n\nfunc F() interface{} {\n}\n"}}
[Trace - 11:45:39.156 AM] Sending notification 'workspace/didChangeConfiguration'.
Params: {"settings":{"gopls":{"staticcheck":true,"matcher":"CaseSensitive"}}}
[Trace - 11:45:39.156 AM] Sending request 'textDocument/documentSymbol - (2)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go"}}
[Trace - 11:45:39.161 AM] Sending response 'workspace/configuration - (1)' in 6ms.
Result: [{"staticcheck":true,"matcher":"CaseSensitive"},null]
[Trace - 11:45:39.197 AM] Received request 'client/registerCapability - (2)'.
Params: {"registrations":[{"id":"workspace/didChangeWatchedFiles-0","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"**/*.{go,mod,sum}","kind":7},{"globPattern":"/tmp/tmp.UF2AKOuMKI/example.com/**/*.{go,mod,sum}","kind":7}]}}]}
[Trace - 11:45:39.198 AM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/10/20 11:45:39 go env for /tmp/tmp.UF2AKOuMKI/example.com/\n(root /tmp/tmp.UF2AKOuMKI/example.com)\n(go version go version devel +55b2d479d Tue Oct 20 08:08:15 2020 +0000 linux/amd64\n)\n(valid build configuration = true)\n(build flags: [])\nGO111MODULE=auto\nGOFLAGS=\nGOMOD=/tmp/tmp.UF2AKOuMKI/example.com/go.mod\nGONOPROXY=\nGOPATH=/tmp/tmp.UF2AKOuMKI/_gopath\nGOINSECURE=\nGOSUMDB=sum.golang.org\nGONOSUMDB=\nGOPRIVATE=\nGOCACHE=/usr/local/google/home/bcmills/.cache/go-build\nGOMODCACHE=/tmp/tmp.UF2AKOuMKI/_gopath/pkg/mod\nGOPROXY=https://proxy.golang.org,direct\nGOROOT=/usr/local/google/home/bcmills/sdk/gotip\n\n"}
[Trace - 11:45:39.199 AM] Sending response 'client/registerCapability - (2)' in 1ms.
Result:
[Trace - 11:45:39.295 AM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/10/20 11:45:39 go/packages.Load\n\tsnapshot=0\n\tdirectory=/tmp/tmp.UF2AKOuMKI/example.com\n\tquery=[./... builtin]\n\tpackages=2\n"}
[Trace - 11:45:39.295 AM] Received notification 'window/showMessage'.
Params: {"type":3,"message":"Finished loading packages."}
[Trace - 11:45:39.296 AM] Received request 'workspace/configuration - (3)'.
Params: {"items":[{"scopeUri":"file:///tmp/tmp.UF2AKOuMKI/example.com/","section":"gopls"},{"scopeUri":"file:///tmp/tmp.UF2AKOuMKI/example.com/","section":"gopls-example.com"}]}
[Trace - 11:45:39.304 AM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/go.mod","diagnostics":[{"range":{"start":{"line":4,"character":0},"end":{"line":4,"character":61}},"severity":2,"source":"go mod tidy","message":"golang.org/x/tools is not used in this module"}]}
[Trace - 11:45:39.305 AM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go","diagnostics":[{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":1}},"severity":1,"source":"compiler","message":"missing return"}]}
[Trace - 11:45:39.319 AM] Sending response 'workspace/configuration - (3)' in 23ms.
Result: [{"staticcheck":true,"matcher":"CaseSensitive"},null]
[Trace - 11:45:39.319 AM] Received response 'textDocument/documentSymbol - (2)' in 162ms.
Result: [{"name":"F","detail":"()","kind":12,"range":{"start":{"line":2,"character":0},"end":{"line":3,"character":1}},"selectionRange":{"start":{"line":2,"character":5},"end":{"line":2,"character":6}}}]
[Trace - 11:45:57.507 AM] Sending request 'textDocument/signatureHelp - (3)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go"},"position":{"line":2,"character":22}}
[Trace - 11:45:57.508 AM] Received response 'textDocument/signatureHelp - (3)' in 0ms.
Result: null
[Trace - 11:45:57.508 AM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2020/10/20 11:45:57 no signature help: cannot find an enclosing function\n\tposition={2 22}\n"}
[Trace - 11:45:57.508 AM] Sending request 'textDocument/hover - (4)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go"},"position":{"line":2,"character":22}}
[Trace - 11:45:57.509 AM] Received response 'textDocument/hover - (4)' in 0ms.
Result: null
[Trace - 11:45:57.509 AM] Sending request 'textDocument/documentHighlight - (5)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go"},"position":{"line":2,"character":22}}
[Trace - 11:45:57.510 AM] Received response 'textDocument/documentHighlight - (5)' in 0ms.
Result: []
[Trace - 11:45:58.058 AM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go","version":2},"contentChanges":[{"range":{"start":{"line":2,"character":22},"end":{"line":2,"character":22}},"rangeLength":0,"text":"\n"},{"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":0}},"rangeLength":0,"text":"\t"}]}
[Trace - 11:45:58.059 AM] Sending request 'textDocument/signatureHelp - (6)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go"},"position":{"line":3,"character":1}}
[Trace - 11:45:58.059 AM] Sending request 'textDocument/hover - (7)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go"},"position":{"line":3,"character":1}}
[Trace - 11:45:58.059 AM] Received response 'textDocument/signatureHelp - (6)' in 0ms.
Result: null
[Trace - 11:45:58.060 AM] Received response 'textDocument/hover - (7)' in 0ms.
Result: null
[Trace - 11:45:58.060 AM] Sending request 'textDocument/documentHighlight - (8)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go"},"position":{"line":3,"character":1}}
[Trace - 11:45:58.060 AM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2020/10/20 11:45:58 no signature help: cannot find an enclosing function\n\tposition={3 1}\n"}
[Trace - 11:45:58.060 AM] Received response 'textDocument/documentHighlight - (8)' in 0ms.
Result: []
[Trace - 11:45:58.060 AM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go","version":2,"diagnostics":[{"range":{"start":{"line":4,"character":0},"end":{"line":4,"character":1}},"severity":1,"source":"compiler","message":"missing return"}]}
[Trace - 11:46:00.130 AM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go","version":12},"contentChanges":[{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":1}},"rangeLength":0,"text":"r"},{"range":{"start":{"line":3,"character":2},"end":{"line":3,"character":2}},"rangeLength":0,"text":"e"},{"range":{"start":{"line":3,"character":3},"end":{"line":3,"character":3}},"rangeLength":0,"text":"t"},{"range":{"start":{"line":3,"character":4},"end":{"line":3,"character":4}},"rangeLength":0,"text":"u"},{"range":{"start":{"line":3,"character":5},"end":{"line":3,"character":5}},"rangeLength":0,"text":"r"},{"range":{"start":{"line":3,"character":6},"end":{"line":3,"character":6}},"rangeLength":0,"text":"n"},{"range":{"start":{"line":3,"character":7},"end":{"line":3,"character":7}},"rangeLength":0,"text":" "},{"range":{"start":{"line":3,"character":8},"end":{"line":3,"character":8}},"rangeLength":0,"text":"n"},{"range":{"start":{"line":3,"character":9},"end":{"line":3,"character":9}},"rangeLength":0,"text":"i"},{"range":{"start":{"line":3,"character":10},"end":{"line":3,"character":10}},"rangeLength":0,"text":"l"}]}
[Trace - 11:46:00.132 AM] Sending request 'textDocument/completion - (9)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go"},"position":{"line":3,"character":11},"context":{"triggerKind":1}}
[Trace - 11:46:00.133 AM] Sending request 'textDocument/signatureHelp - (10)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go"},"position":{"line":3,"character":11}}
[Trace - 11:46:00.134 AM] Sending request 'textDocument/hover - (11)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go"},"position":{"line":3,"character":11}}
[Trace - 11:46:00.135 AM] Sending request 'textDocument/documentHighlight - (12)'.
Params: {"textDocument":{"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go"},"position":{"line":3,"character":11}}
[Trace - 11:46:00.137 AM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///tmp/tmp.UF2AKOuMKI/example.com/example.go","version":12,"diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":15}},"severity":2,"source":"ST1000","message":"at least one file in a package should have a package comment"}]}
[Trace - 11:46:00.168 AM] Received response 'textDocument/completion - (9)' in 36ms.
Result: {"isIncomplete":true,"items":[{"label":"nilfunc","kind":9,"detail":"\"golang.org/x/tools/go/analysis/passes/nilfunc\"","preselect":true,"sortText":"00000","filterText":"nilfunc","insertTextFormat":2,"textEdit":{"range":{"start":{"line":3,"character":8},"end":{"line":3,"character":11}},"newText":"nilfunc"},"additionalTextEdits":[{"range":{"start":{"line":1,"character":0},"end":{"line":1,"character":0}},"newText":"\nimport \"golang.org/x/tools/go/analysis/passes/nilfunc\"\n"}]},{"label":"nilness","kind":9,"detail":"\"golang.org/x/tools/go/analysis/passes/nilness\"","sortText":"00001","filterText":"nilness","insertTextFormat":2,"textEdit":{"range":{"start":{"line":3,"character":8},"end":{"line":3,"character":11}},"newText":"nilness"},"additionalTextEdits":[{"range":{"start":{"line":1,"character":0},"end":{"line":1,"character":0}},"newText":"\nimport \"golang.org/x/tools/go/analysis/passes/nilness\"\n"}]},{"label":"nil","kind":6,"sortText":"00002","filterText":"nil","insertTextFormat":2,"textEdit":{"range":{"start":{"line":3,"character":8},"end":{"line":3,"character":11}},"newText":"nil"}}]}
[Trace - 11:46:00.169 AM] Received response 'textDocument/signatureHelp - (10)' in 35ms.
Result: null
[Trace - 11:46:00.169 AM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2020/10/20 11:46:00 no signature help: cannot find an enclosing function\n\tposition={3 11}\n"}
[Trace - 11:46:00.169 AM] Received response 'textDocument/hover - (11)' in 35ms.
Result: {"contents":{"kind":"markdown","value":"```go\nnil\n```"},"range":{"start":{"line":3,"character":8},"end":{"line":3,"character":11}}}
[Trace - 11:46:00.170 AM] Received response 'textDocument/documentHighlight - (12)' in 34ms.
Result: [{"range":{"start":{"line":2,"character":9},"end":{"line":2,"character":20}},"kind":1},{"range":{"start":{"line":3,"character":8},"end":{"line":3,"character":11}},"kind":1}]
[Trace - 11:46:30.169 AM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/10/20 11:46:30 background imports cache refresh starting\n"}
[Trace - 11:46:30.172 AM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/10/20 11:46:30 background refresh finished after 3.385517ms\n"}
</details>
CC @stamblerre @heschik
created time in 10 days
issue commentgolang/go
cmd/go: allow 'go mod vendor' to omit replaced modules
@shoenig, we don't have any specific plans to work on this. If this feature is important to you, some more detail on your use-case (especially the alternatives you considered and the problems with those alternatives) would be helpful.
At the moment, the big question is whether the added convenience is worth the added complexity (of both the implementation and the documentation).
comment created time in 11 days
issue commentgolang/go
cmd/go: 'go run' should run executables in module mode outside a module
Just to consider as an alternative:
example.com$ GOBIN=$(pwd) go install gioui.org/cmd/gogio@d5bdf0756a5a
example.com$ ./gogio
gogio: specify a package
That has its own problems (namely, $(pwd) is not portable), but it makes clear that for subsequent invocations the user should re-invoke the compiled binary rather than re-resolving and recompiling from upstream.
If we allowed go build to accept the @version syntax, then it could be made portable:
$ go build -o ./gogio.exe gioui.org/cmd/gogio@d5bdf0756a5a
$ ./gogio.exe
comment created time in 11 days
issue openedgolang/go
runtime: TestCgoExecSignalMask failures due to apparent deadlock on *BSD
<details>
--- FAIL: TestCgoExecSignalMask (60.56s)
crash_test.go:105: /tmp/workdir/tmp/go-build689039578/testprogcgo.exe CgoExecSignalMask exit status: exit status 2
crash_cgo_test.go:160: expected "OK\n", got SIGQUIT: quit
PC=0x46de03 m=8 sigcode=0
goroutine 0 [idle]:
runtime.lwp_park(0x3, 0x0, 0x0, 0xc000180340, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000182180, ...)
/tmp/workdir/go/src/runtime/sys_netbsd_amd64.s:95 +0x23
runtime.semasleep(0xffffffffffffffff, 0x0)
/tmp/workdir/go/src/runtime/os_netbsd.go:167 +0xb4
runtime.notesleep(0xc000180150)
/tmp/workdir/go/src/runtime/lock_sema.go:181 +0xca
runtime.stopm()
/tmp/workdir/go/src/runtime/proc.go:1948 +0xac
runtime.findrunnable(0xc000027800, 0x0)
/tmp/workdir/go/src/runtime/proc.go:2509 +0xa7f
runtime.schedule()
/tmp/workdir/go/src/runtime/proc.go:2712 +0x2d7
runtime.mstart1()
/tmp/workdir/go/src/runtime/proc.go:1209 +0x93
runtime.mstart()
/tmp/workdir/go/src/runtime/proc.go:1167 +0x6e
goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc000018318)
/tmp/workdir/go/src/runtime/sema.go:56 +0x45
sync.(*WaitGroup).Wait(0xc000018310)
/tmp/workdir/go/src/sync/waitgroup.go:130 +0x65
main.CgoExecSignalMask()
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:95 +0x15a
main.main()
/tmp/workdir/go/src/runtime/testdata/testprogcgo/main.go:34 +0x1da
goroutine 7 [syscall]:
os/signal.signal_recv(0x58c820)
/tmp/workdir/go/src/runtime/sigqueue.go:147 +0x9d
os/signal.loop()
/tmp/workdir/go/src/os/signal/signal_unix.go:23 +0x25
created by os/signal.Notify.func1.1
/tmp/workdir/go/src/os/signal/signal.go:151 +0x45
goroutine 8 [chan receive]:
main.CgoExecSignalMask.func1(0xc00005a180)
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:57 +0x47
created by main.CgoExecSignalMask
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:56 +0xe7
goroutine 9 [chan send]:
os/signal.signal_enable(0xdcc5c2d10000001e)
/tmp/workdir/go/src/runtime/sigqueue.go:216 +0x72
os/signal.enableSignal(...)
/tmp/workdir/go/src/os/signal/signal_unix.go:49
os/signal.Notify.func1(0x1e)
/tmp/workdir/go/src/os/signal/signal.go:145 +0x88
os/signal.Notify(0xc00008e060, 0xc000031fa8, 0x1, 0x1)
/tmp/workdir/go/src/os/signal/signal.go:165 +0x162
main.CgoExecSignalMask.func2(0xc000018310)
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:70 +0xc5
created by main.CgoExecSignalMask
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:66 +0x13e
goroutine 10 [semacquire]:
sync.runtime_SemacquireMutex(0x84ad04, 0xc000032800, 0x1)
/tmp/workdir/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0x84ad00)
/tmp/workdir/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
/tmp/workdir/go/src/sync/mutex.go:81
os/signal.Notify(0xc00005a480, 0xc00002a7a8, 0x1, 0x1)
/tmp/workdir/go/src/os/signal/signal.go:126 +0x235
main.CgoExecSignalMask.func2(0xc000018310)
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:70 +0xc5
created by main.CgoExecSignalMask
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:66 +0x13e
goroutine 11 [semacquire]:
sync.runtime_SemacquireMutex(0x84ad04, 0xc000032800, 0x1)
/tmp/workdir/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0x84ad00)
/tmp/workdir/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
/tmp/workdir/go/src/sync/mutex.go:81
os/signal.Notify(0xc00005a540, 0xc00002afa8, 0x1, 0x1)
/tmp/workdir/go/src/os/signal/signal.go:126 +0x235
main.CgoExecSignalMask.func2(0xc000018310)
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:70 +0xc5
created by main.CgoExecSignalMask
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:66 +0x13e
goroutine 12 [semacquire]:
sync.runtime_SemacquireMutex(0x84ad04, 0xc000032800, 0x1)
/tmp/workdir/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0x84ad00)
/tmp/workdir/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
/tmp/workdir/go/src/sync/mutex.go:81
os/signal.Notify(0xc00005a600, 0xc00002b7a8, 0x1, 0x1)
/tmp/workdir/go/src/os/signal/signal.go:126 +0x235
main.CgoExecSignalMask.func2(0xc000018310)
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:70 +0xc5
created by main.CgoExecSignalMask
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:66 +0x13e
goroutine 13 [semacquire]:
sync.runtime_SemacquireMutex(0x84ad04, 0xc000032800, 0x1)
/tmp/workdir/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0x84ad00)
/tmp/workdir/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
/tmp/workdir/go/src/sync/mutex.go:81
os/signal.Notify(0xc00005a6c0, 0xc00002bfa8, 0x1, 0x1)
/tmp/workdir/go/src/os/signal/signal.go:126 +0x235
main.CgoExecSignalMask.func2(0xc000018310)
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:70 +0xc5
created by main.CgoExecSignalMask
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:66 +0x13e
goroutine 14 [semacquire]:
sync.runtime_SemacquireMutex(0x84ad04, 0xc000032800, 0x1)
/tmp/workdir/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0x84ad00)
/tmp/workdir/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
/tmp/workdir/go/src/sync/mutex.go:81
os/signal.Notify(0xc00005a780, 0xc00002c7a8, 0x1, 0x1)
/tmp/workdir/go/src/os/signal/signal.go:126 +0x235
main.CgoExecSignalMask.func2(0xc000018310)
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:70 +0xc5
created by main.CgoExecSignalMask
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:66 +0x13e
goroutine 15 [semacquire]:
sync.runtime_SemacquireMutex(0x84ad04, 0xc000032800, 0x1)
/tmp/workdir/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0x84ad00)
/tmp/workdir/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
/tmp/workdir/go/src/sync/mutex.go:81
os/signal.Notify(0xc00005a840, 0xc00002cfa8, 0x1, 0x1)
/tmp/workdir/go/src/os/signal/signal.go:126 +0x235
main.CgoExecSignalMask.func2(0xc000018310)
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:70 +0xc5
created by main.CgoExecSignalMask
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:66 +0x13e
goroutine 16 [semacquire]:
sync.runtime_SemacquireMutex(0x84ad04, 0xc000032800, 0x1)
/tmp/workdir/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0x84ad00)
/tmp/workdir/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
/tmp/workdir/go/src/sync/mutex.go:81
os/signal.Notify(0xc00005a900, 0xc00002d7a8, 0x1, 0x1)
/tmp/workdir/go/src/os/signal/signal.go:126 +0x235
main.CgoExecSignalMask.func2(0xc000018310)
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:70 +0xc5
created by main.CgoExecSignalMask
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:66 +0x13e
goroutine 18 [semacquire]:
sync.runtime_SemacquireMutex(0x84ad04, 0xc000032800, 0x1)
/tmp/workdir/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0x84ad00)
/tmp/workdir/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
/tmp/workdir/go/src/sync/mutex.go:81
os/signal.Notify(0xc00005a9c0, 0xc00002dfa8, 0x1, 0x1)
/tmp/workdir/go/src/os/signal/signal.go:126 +0x235
main.CgoExecSignalMask.func2(0xc000018310)
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:70 +0xc5
created by main.CgoExecSignalMask
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:66 +0x13e
goroutine 19 [semacquire]:
sync.runtime_SemacquireMutex(0x84ad04, 0x1, 0x1)
/tmp/workdir/go/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0x84ad00)
/tmp/workdir/go/src/sync/mutex.go:138 +0x105
sync.(*Mutex).Lock(...)
/tmp/workdir/go/src/sync/mutex.go:81
os/signal.Stop(0xc00005a240)
/tmp/workdir/go/src/os/signal/signal.go:216 +0x375
main.CgoExecSignalMask.func2(0xc000018310)
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:91 +0x139
created by main.CgoExecSignalMask
/tmp/workdir/go/src/runtime/testdata/testprogcgo/exec.go:66 +0x13e
rax 0x4
rbx 0x0
rcx 0x46de03
rdx 0x0
rdi 0x3
rsi 0x0
rbp 0x788302dffd60
rsp 0x788302dffd08
r8 0xc000180340
r9 0xc000180340
r10 0x0
r11 0x202
r12 0x3
r13 0xc000182180
r14 0x788304cde000
r15 0x7883043fb000
rip 0x46de03
rflags 0x203
cs 0x47
fs 0x0
gs 0x0
FAIL
FAIL runtime 118.004s
</details>
2020-10-20T08:08:15-55b2d47/netbsd-amd64-9_0 2020-09-23T11:49:55-4d7abd7/freebsd-arm64-dmgk 2020-09-22T22:47:43-7f71846/freebsd-arm64-dmgk 2020-07-10T11:32:36-3a43226/netbsd-amd64-9_0 2020-05-01T05:25:54-e1d1684/freebsd-arm64-dmgk 2020-04-29T20:33:31-197a2a3/netbsd-amd64-9_0
Compare #38333.
CC @ianlancetaylor @cherrymui @aclements
created time in 11 days
issue openedgolang/go
x/sync/singleflight: occasional failures in TestForget
--- FAIL: TestForget (0.00s)
singleflight_test.go:160: Third call should not be started because was started during second execution
singleflight_test.go:163: We should receive result produced by second call, expected: 2, got 3
FAIL
FAIL golang.org/x/sync/singleflight 61.958s
The failing test is the regression test added for #31420 (CC @cuonglm @bradfitz).
The bug appears to be in the test: https://github.com/golang/sync/blob/b3e1573b75205f2905c4b27986413d2e2be9803c/singleflight/singleflight_test.go#L153-L157
In that section, nothing guarantees that the second invocation is still running when g.Do is evaluated. (The second goroutine can complete immediately after close(secondCh), causing the third invocation to be evaluated.)
2020-10-08T14:14:35-b3e1573/android-386-emu 2019-09-11T18:51:00-cd5d95a/freebsd-amd64-race 2019-04-23T02:48:10-1122301/freebsd-amd64-race 2019-04-23T02:48:10-1122301/windows-amd64-race
created time in 11 days
issue openedgolang/go
x/build: no SlowBot for "linux-amd64-nocgo"
On https://golang.org/cl/263357, I repeatedly tried to trigger a nocgo SlowBot, and repeatedly failed to do so. (See the comment log there for details.)
I had thought that any builder at all could be triggered via a TRY= line, but now I'm not so sure. At the very least, it appears that the SlowBot configuration is missing a nocgo shorthand entry.
CC @golang/release
created time in 11 days
issue commentgolang/go
net: deadlock in TestDialParallelSpuriousConnection on darwin-arm*
CC @cherrymui
comment created time in 11 days
issue commentgolang/go
net: deadlock in TestDialParallelSpuriousConnection on darwin-arm*
2020-10-20T00:59:23-a505312/ios-arm64-corellium 2020-09-21T21:03:02-5853b4e/darwin-arm64-corellium 2020-08-27T19:38:43-a98fe26/darwin-arm64-corellium 2020-08-20T15:21:17-3f56862/darwin-arm64-corellium 2020-07-09T16:26:07-72735e7/darwin-arm64-corellium 2020-06-26T17:07:58-d1015f3/solaris-amd64-oraclerel 2020-05-08T20:34:23-65126c5/darwin-arm64-corellium 2020-04-30T14:41:10-ecdbffd/solaris-amd64-oraclerel 2020-04-17T00:45:52-7ea40f6/darwin-arm64-corellium 2020-04-14T19:04:38-48403b2/darwin-arm64-corellium 2020-04-14T17:35:47-ae25371/darwin-arm64-corellium 2020-04-13T04:28:53-2545323/darwin-arm64-corellium
comment created time in 11 days
issue commentgolang/go
net: deadlock in TestDialParallelSpuriousConnection on darwin-arm*
https://storage.googleapis.com/go-build-log/2ab992ae/ios-arm64-corellium_eb14298d.log
comment created time in 11 days
issue commentgolang/go
runtime/race: cannot run under qemu-user-ppc64le due to execve /proc/self/exe
We currently lack a QEMU builder (#1508), and per http://golang.org/wiki/PortingPolicy, supported platforms require builders. Therefore, the QEMU platform is not supported.
comment created time in 11 days
issue commentgolang/go
os/exec: TestContextCancel is flaky on netbsd-arm64-bsiegert builder
I would be inclined to eliminate the dependency on the grace time entirely.
That could be done fairly easily by swapping the goroutines: instead of calling io.WriteString on the test-function goroutine and stdout.Read in a background goroutine, I would call io.WriteString and cancel on the background goroutine and move the Read loop to the test function.
Then you just keep reading until EOF, and if EOF never comes the test crashes itself and you figure out what happened from the goroutine dump (which you'll probably need anyway, because if the test legitimately fails there's probably a deadlock somewhere in os/exec).
comment created time in 11 days
issue commentgolang/go
cmd/go: allow replacement modules to alias other active modules
@Dragomir-Ivanov, no need to file a separate issue. This is next on my list after #36460, although it might not make 1.16 before the freeze.
However, note that github.com/globalsign/mgo imports packages from itself. The replace directives that you describe, if they were allowed today, would result in two distinct copies of each package (one beginning with github.com/globalsign/mgo, and one beginning with gopkg.in/mgo.v2), but with each copy importing only one other copy (presumably github.com/globalsign/mgo?).
That could well produce type errors if types from the imported packages are used in the exported API, since each distinct package also defines its own types.
It seems that what you ideally need is exactly what we haven't implemented yet, which is a way to reinterpret import statements that refer to one of those copies as if they instead referred to the other.
comment created time in 11 days
issue openedgolang/go
cmd/go/internal/renameio: TestConcurrentReadsAndWrites failure on ios-arm64-corellium builder
The ios-arm64-corellium builder seems to be affected by the same darwin kernel bug reported in #33041.
Perhaps we should expand the skip for that bug to also apply to ios-arm64-corellium, although it's not obvious to me how we could apply the skip to only the affected kernel.
CC @cherrymui @dmitshur
2020-10-17T00:26:52-a2eb53c/ios-arm64-corellium 2020-10-16T18:54:38-570b49d/ios-arm64-corellium 2020-10-12T17:23:06-1aa43a5/ios-arm64-corellium 2020-10-06T19:39:32-1fb149f/ios-arm64-corellium
created time in 11 days
issue openedgolang/go
net/http: TestTransportPersistConnLeak failure on plan9-386-0intro builder
2019-11-05T19:06:28-7e71c9c/plan9-386-0intro
http.test 1338092: warning: process exceeds 100 file descriptors
--- FAIL: TestTransportPersistConnLeak (2.96s)
transport_test.go:1619: goroutine growth: 170 -> 322 -> 220 (delta: 50)
transport_test.go:1620: too many new goroutines
2019/11/05 14:48:14 http: TLS handshake error from 127.0.0.1:55194: EOF
2019/11/05 14:48:14 http: TLS handshake error from 127.0.0.1:57366: EOF
FAIL
FAIL net/http 114.358s
See previously #14887, #14375, #4822, #7237.
CC @0intro @millerresearch @fhs
created time in 12 days
issue commentgolang/go
proposal: cmd/go: add go test -skip to skip specific tests
@ChrisHines, I think the question is, would someone running go test -bench=BenchmarkFoo -skip=BenchmarkFoo/some_subbench expect it to skip BenchmarkFoo/some_subbench?
I would argue that pretty much everyone would expect that to skip the benchmark, so I suspect that a unified -skip flag would be less confusing than a separate -benchskip flag.
comment created time in 12 days
issue commentgolang/go
proposal: cmd/go: add go test -skip to skip specific tests
@magical, further complications in the syntax for the -skip flag would be pretty awkward for the “run a specific test but skip a specific subtest” use-case mentioned previously.
comment created time in 12 days
issue commentgolang/go
x/net/ipv4, x/net/ipv6: UDP test failures with "invalid header length"
andybonscomment created time in 12 days
issue commentgolang/go
2020-10-06T15:34:59-a7d1128/darwin-amd64-nocgo 2020-09-25T08:00:53-05aa5d4/darwin-amd64-10_15 2020-06-25T00:16:55-4c52546/darwin-amd64-10_15 2020-03-01T02:21:30-244492d/darwin-amd64-10_12 2020-02-02T09:46:26-1617124/darwin-amd64-10_14 2019-12-04T02:50:24-5ee1b9f/darwin-amd64-10_14
comment created time in 12 days
issue openedgolang/go
TestPacketConnReadWriteMulticastUDP is failing fairly consistently on the openbsd-arm-jsing builders. It should either be fixed or skipped.
--- FAIL: TestPacketConnReadWriteMulticastUDP (0.21s)
multicast_test.go:114: read udp [::]:6423: raw-read udp6 [::]:6423: i/o timeout
FAIL
FAIL golang.org/x/net/ipv6 0.294s
Note that this failure mode is different from the one on Darwin (#37319) and the one previously reported for OpenBSD (#33843).
2020-10-16T16:51:38-7b1cca2/openbsd-arm-jsing 2020-10-16T16:51:38-7b1cca2/openbsd-arm64-jsing 2020-10-10T22:47:23-4f7140c/openbsd-arm-jsing 2020-10-09T03:24:41-dbdefad/openbsd-arm-jsing 2020-10-08T22:28:04-59f7323/openbsd-arm-jsing 2020-10-06T15:34:59-a7d1128/openbsd-arm-jsing 2020-10-02T20:24:02-0a1ea39/openbsd-arm-jsing 2020-09-30T14:50:03-4acb6c0/openbsd-arm-jsing 2020-09-27T03:25:02-5d4f700/openbsd-arm-jsing 2020-09-25T08:00:53-05aa5d4/openbsd-arm-jsing 2020-09-23T18:22:12-328152d/openbsd-arm-jsing 2020-09-04T19:48:48-62affa3/openbsd-arm-jsing 2020-08-22T12:43:28-c890458/openbsd-arm-jsing 2020-08-13T13:45:08-3edf25e/openbsd-arm-jsing 2020-07-07T03:43:11-ab34263/openbsd-arm-jsing 2020-06-25T00:16:55-4c52546/openbsd-arm-jsing 2020-06-02T11:40:24-627f964/openbsd-arm-jsing 2020-05-28T22:51:25-3c3fba1/openbsd-arm-jsing 2020-05-20T18:23:14-0ba52f6/openbsd-arm-jsing
CC @4a6f656c @golang/osp-team
created time in 12 days
issue openedgolang/go
x/build/dashboard: openbsd-mips64-jsing inconsistently greyed out
The openbsd-mips64-jsing builder is greyed out on the dashboard for the main repo, and for the x/net repo in isolation.

However, its entry is not greyed out for the x/net repo in the golang.org/x/ repos summary section, where it shows as a red failure.

CC @golang/osp-team
created time in 12 days
issue commentgolang/go
x/net/route: TestRouteMessage failures on freebsd builders
2020-10-16T16:51:38-7b1cca2/freebsd-386-11_2 2020-10-09T03:24:41-dbdefad/freebsd-386-11_2 2020-10-06T15:34:59-a7d1128/freebsd-386-12_0 2020-09-30T14:50:03-4acb6c0/freebsd-386-11_2 2020-09-27T03:25:02-5d4f700/freebsd-386-11_2 2020-09-27T03:25:02-5d4f700/freebsd-386-12_0 2020-09-23T18:22:12-328152d/freebsd-386-11_2 2020-09-23T18:22:12-328152d/freebsd-386-12_0 2020-09-04T19:48:48-62affa3/freebsd-386-11_2 2020-09-04T19:48:48-62affa3/freebsd-386-12_0 2020-08-13T13:45:08-3edf25e/freebsd-386-11_2 2020-07-07T03:43:11-ab34263/freebsd-386-11_2 2020-07-07T03:43:11-ab34263/freebsd-386-12_0 2020-06-25T00:16:55-4c52546/freebsd-386-11_2 2020-06-25T00:16:55-4c52546/freebsd-386-12_0 2020-06-02T11:40:24-627f964/freebsd-386-11_2 2020-05-05T04:18:28-1ed2336/freebsd-386-12_0 2020-05-01T05:30:45-e0ff5e5/freebsd-386-11_2 2020-05-01T05:30:45-e0ff5e5/freebsd-386-12_0 2020-04-25T23:01:54-ff2c4b7/freebsd-386-11_2 2020-04-21T23:12:49-e086a09/freebsd-386-11_2 2020-03-24T14:37:07-d3edc99/freebsd-386-11_2 2020-03-01T02:21:30-244492d/freebsd-386-12_0 2020-02-26T12:10:28-0de0cce/freebsd-386-11_2 2020-02-22T12:55:58-5a598a2/freebsd-386-11_2 2019-12-06T10:30:17-1ddd1de/freebsd-386-12_0 2019-12-04T02:50:24-5ee1b9f/freebsd-386-11_2 2019-11-26T23:54:20-ef20fe5/freebsd-386-11_2 2019-11-25T08:49:36-ffdde10/freebsd-386-12_0 2019-11-19T07:31:36-fc4aabc/freebsd-386-11_2 2019-11-19T07:31:36-fc4aabc/freebsd-386-12_0 2019-11-18T18:34:10-d06c31c/freebsd-386-11_2 2019-11-18T18:34:10-d06c31c/freebsd-386-12_0 2019-11-16T16:09:21-f9c8255/freebsd-386-12_0
comment created time in 12 days
issue commentgolang/go
x/net/http2: data race in onSameConn test helper
2020-10-16T16:51:38-7b1cca2/windows-amd64-race 2020-09-27T03:25:02-5d4f700/freebsd-amd64-race 2020-09-27T03:25:02-5d4f700/windows-amd64-race 2020-08-13T13:45:08-3edf25e/freebsd-amd64-race 2020-07-07T03:43:11-ab34263/freebsd-amd64-race 2020-05-28T22:51:25-3c3fba1/windows-amd64-race 2020-05-20T18:23:14-0ba52f6/windows-amd64-race 2020-05-13T18:57:01-a91f071/windows-amd64-race 2020-04-25T23:01:54-ff2c4b7/freebsd-amd64-race 2020-03-24T14:37:07-d3edc99/freebsd-amd64-race 2020-03-19T23:41:17-63522db/freebsd-amd64-race 2020-02-22T12:55:58-5a598a2/windows-amd64-race 2020-02-19T18:36:55-4628272/freebsd-amd64-race 2020-01-14T15:54:13-6afb519/freebsd-amd64-race 2019-12-09T16:08:50-c0dbc17/windows-amd64-race
comment created time in 12 days
issue commentgolang/go
runtime: lock ordering problem involving 'fin' and 'mheap'
Marking as release-blocker for Go 1.16 because it's a lock-ordering problem in the runtime.
(We should at least understand whether it's a missing lock annotation or a real potential deadlock prior to the 1.16 release.)
comment created time in 12 days
issue openedgolang/go
runtime: lock ordering problem involving 'fin' and 'mheap'
https://build.golang.org/log/e77e304008e6ffb4bf722e8296e6a2e7621cd4ba
136026 ======
0 : fin 18 0x63b350
1 : mheap 38 0x620080
fatal error: lock ordering problem
…
136026 ======
0 : fin 18 0x63b350
1 : mheap 38 0x620080
2 : allg 11 0x63b2d0
fatal error: lock ordering problem
CC @danscales @mknyszek
<details>
136026 ======
0 : fin 18 0x63b350
1 : mheap 38 0x620080
fatal error: lock ordering problem
runtime stack:
runtime.throw(0x53cdcf, 0x15)
/workdir/go/src/runtime/panic.go:1112 +0x72
runtime.checkRanks(0xc000082180, 0x12, 0x26)
/workdir/go/src/runtime/lockrank_on.go:159 +0x10c
runtime.lockWithRankMayAcquire.func1()
/workdir/go/src/runtime/lockrank_on.go:231 +0xac
runtime.lockWithRankMayAcquire(0x620080, 0x26)
/workdir/go/src/runtime/lockrank_on.go:220 +0x7e
runtime.getempty(0x40c70f)
/workdir/go/src/runtime/mgcwork.go:359 +0xa5
runtime.(*gcWork).init(0xc000023e98)
/workdir/go/src/runtime/mgcwork.go:99 +0x25
runtime.(*gcWork).putBatch(0xc000023e98, 0xc000023ed0, 0x2, 0x200)
/workdir/go/src/runtime/mgcwork.go:173 +0x19f
runtime.wbBufFlush1(0xc000022800)
/workdir/go/src/runtime/mwbbuf.go:287 +0x237
runtime.wbBufFlush.func1()
/workdir/go/src/runtime/mwbbuf.go:201 +0x3a
runtime.systemstack(0x0)
/workdir/go/src/runtime/asm_amd64.s:370 +0x66
runtime.mstart()
/workdir/go/src/runtime/proc.go:1146
goroutine 5 [running]:
runtime.systemstack_switch()
/workdir/go/src/runtime/asm_amd64.s:330 fp=0xc00002e688 sp=0xc00002e680 pc=0x467040
runtime.wbBufFlush(0xc000080278, 0x543100)
/workdir/go/src/runtime/mwbbuf.go:200 +0x47 fp=0xc00002e6a8 sp=0xc00002e688 pc=0x42fc47
runtime.gcWriteBarrier(0x437416, 0x542d10, 0xe000e000e, 0xc00002e7d0, 0x418b92, 0x543100, 0x63b350, 0xc000191410, 0x1, 0xc00002e7d0, ...)
/workdir/go/src/runtime/asm_amd64.s:1463 +0xae fp=0xc00002e730 sp=0xc00002e6a8 pc=0x468e0e
runtime.gcWriteBarrierDX(0x542d10, 0xe000e000e, 0xc00002e7d0, 0x418b92, 0x543100, 0x63b350, 0xc000191410, 0x1, 0xc00002e7d0, 0x436f75, ...)
/workdir/go/src/runtime/asm_amd64.s:1490 +0x7 fp=0xc00002e738 sp=0xc00002e730 pc=0x468e87
runtime.gopark(0x543100, 0x63b350, 0xc000191410, 0x1)
/workdir/go/src/runtime/proc.go:325 +0x116 fp=0xc00002e758 sp=0xc00002e738 pc=0x437416
runtime.goparkunlock(...)
/workdir/go/src/runtime/proc.go:337
runtime.runfinq()
/workdir/go/src/runtime/mfinal.go:175 +0xb2 fp=0xc00002e7e0 sp=0xc00002e758 pc=0x418b92
runtime.goexit()
/workdir/go/src/runtime/asm_amd64.s:1376 +0x1 fp=0xc00002e7e8 sp=0xc00002e7e0 pc=0x468d41
created by runtime.createfing
/workdir/go/src/runtime/mfinal.go:156 +0x65
136026 ======
0 : fin 18 0x63b350
1 : mheap 38 0x620080
2 : allg 11 0x63b2d0
fatal error: lock ordering problem
panic during panic
runtime stack:
runtime.throw(0x53cdcf, 0x15)
/workdir/go/src/runtime/panic.go:1112 +0x72
runtime.checkRanks(0xc000082180, 0x26, 0xb)
/workdir/go/src/runtime/lockrank_on.go:159 +0x10c
runtime.lockWithRank.func1()
/workdir/go/src/runtime/lockrank_on.go:87 +0xbc
runtime.lockWithRank(0x63b2d0, 0xb)
/workdir/go/src/runtime/lockrank_on.go:76 +0xa5
runtime.lock(...)
/workdir/go/src/runtime/lock_futex.go:47
runtime.tracebackothers(0xc000082180)
/workdir/go/src/runtime/traceback.go:917 +0x93
runtime.dopanic_m(0xc000082180, 0x434752, 0xc000091de0, 0x1)
/workdir/go/src/runtime/panic.go:1312 +0x2c9
runtime.fatalthrow.func1()
/workdir/go/src/runtime/panic.go:1167 +0x5f
runtime.fatalthrow()
/workdir/go/src/runtime/panic.go:1164 +0x57
runtime.throw(0x53cdcf, 0x15)
/workdir/go/src/runtime/panic.go:1112 +0x72
runtime.checkRanks(0xc000082180, 0x12, 0x26)
/workdir/go/src/runtime/lockrank_on.go:159 +0x10c
runtime.lockWithRankMayAcquire.func1()
/workdir/go/src/runtime/lockrank_on.go:231 +0xac
runtime.lockWithRankMayAcquire(0x620080, 0x26)
/workdir/go/src/runtime/lockrank_on.go:220 +0x7e
runtime.getempty(0x40c70f)
/workdir/go/src/runtime/mgcwork.go:359 +0xa5
runtime.(*gcWork).init(0xc000023e98)
/workdir/go/src/runtime/mgcwork.go:99 +0x25
runtime.(*gcWork).putBatch(0xc000023e98, 0xc000023ed0, 0x2, 0x200)
/workdir/go/src/runtime/mgcwork.go:173 +0x19f
runtime.wbBufFlush1(0xc000022800)
/workdir/go/src/runtime/mwbbuf.go:287 +0x237
runtime.wbBufFlush.func1()
/workdir/go/src/runtime/mwbbuf.go:201 +0x3a
runtime.systemstack(0x0)
/workdir/go/src/runtime/asm_amd64.s:370 +0x66
runtime.mstart()
/workdir/go/src/runtime/proc.go:1146
</details>
created time in 12 days
issue openedgolang/go
os/exec: TestContextCancel is flaky on netbsd-arm64-bsiegert builder
2020-10-18T08:22:01-515e6a9/netbsd-arm64-bsiegert 2020-10-16T03:02:36-912262b/netbsd-arm64-bsiegert 2020-10-14T15:19:28-52669c4/netbsd-arm64-bsiegert 2020-10-12T21:13:04-15a11ce/netbsd-arm64-bsiegert 2020-10-07T20:18:35-ade5161/netbsd-arm64-bsiegert 2020-10-06T22:56:00-f8e5540/netbsd-arm64-bsiegert 2020-10-06T21:55:49-2e4ceaf/netbsd-arm64-bsiegert
It looks like the test hard-codes a 1-second timeout on the cancellation terminating the child process. That might not be a reasonable assumption on slow, heavily-loaded builders. https://github.com/golang/go/blob/f8df205e74d5122c43f41923280451641e566ee2/src/os/exec/exec_test.go#L1081-L1083
CC @bsiegert @bradfitz @ianlancetaylor
created time in 12 days
issue commentdominikh/go-tools
staticcheck: flag static conditions
In this case, there is one more piece of signal that we could use to weed out false-positives: the constant-valued variable (added) does not immediately precede the condition — there is an entire for-loop in between.
comment created time in 14 days
issue openeddominikh/go-tools
false negative for an if-condition that is always true
The code: https://golang.org/cl/258220, file src/cmd/go/internal/modload/query.go, line 918.
The problem: I accidentally deleted the only assignment to the added variable (adjacent to line 913). As a result, the condition at line 918 is always true, and the code from 922–931 is statically dead. (That code is important for correctness: it is what sorts the returned slice, and the contract for the Versions method requires the slice to be sorted.)
For comparison, the fix for the undetected bug is in https://golang.org/cl/263266.
Diagnostic information:
~/go-review/src$ go version
go version devel +11cfb48df1 Sat Oct 17 00:32:32 2020 +0000 linux/amd64
~/go-review/src$ staticcheck -version
staticcheck 2020.1.3
~/go-review/src$ staticcheck -debug.version
staticcheck 2020.1.3
Compiled with Go version: devel +b553df8527 Tue Feb 25 12:04:38 2020 -0500
Main module:
honnef.co/go/[email protected] (sum: h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U=)
Dependencies:
github.com/BurntSushi/[email protected] (sum: h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=)
golang.org/x/[email protected] (sum: h1:/iIZNFGxc/a7C3yWjGcnboV+Tkc7mxr+p6fDztwoxuM=)
~/go-review/src$ go version
go version devel +11cfb48df1 Sat Oct 17 00:32:32 2020 +0000 linux/amd64
~/go-review/src$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/usr/local/google/home/bcmills/.cache/go-build"
GOENV="/usr/local/google/home/bcmills/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/usr/local/google/home/bcmills/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/usr/local/google/home/bcmills"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/google/home/bcmills/go-review"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/google/home/bcmills/go-review/pkg/tool/linux_amd64"
GCCGO="/usr/local/google/home/bcmills/bin/gccgo"
AR="ar"
CC="gcc"
CXX="c++"
CGO_ENABLED="1"
GOMOD="/usr/local/google/home/bcmills/go-review/src/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build452785350=/tmp/go-build -gno-record-gcc-switches"
~/go-review/src$ staticcheck cmd/go/internal/modload
cmd/go/internal/modload/init.go:794:13: error strings should not end with punctuation or a newline (ST1005)
cmd/go/internal/modload/load.go:102:2: package "path" is being imported more than once (ST1019)
cmd/go/internal/modload/load.go:103:2: other import of "path"
cmd/go/internal/modload/mvs.go:113:17: func (*mvsReqs).next is unused (U1000)
cmd/go/internal/modload/query.go:652:6: type prefixResult is unused (U1000)
cmd/go/internal/modload/query.go:902:10: unnecessary assignment to the blank identifier (S1005)
cmd/go/internal/modload/search.go:173:2: redundant return statement (S1023)
cmd/go/internal/modload/stat_unix.go:20:6: func hasWritePerm is unused (U1000)
cmd/go/internal/modload/vendor.go:85:13: empty branch (SA9003)
~/go-review/src$
created time in 14 days
issue commentgolang/go
proposal: os: add ReadDir, ReadFile, WriteFile, CreateTemp, MkdirTemp & deprecate io/ioutil
Actually, even MkdirTemp and CreateTemp could belong in io/fs, if we define an FS extension interface for a method that returns a default directory for temporary files.
comment created time in 14 days
issue commentgolang/go
proposal: os: add ReadDir, ReadFile, WriteFile, CreateTemp, MkdirTemp & deprecate io/ioutil
(MkdirTemp and CreateTemp seem like they belong in os, though: the location of the temporary directory is OS-specific, and CreateTemp, at least, should return a *os.File rather than an abstract fs.File.)
comment created time in 14 days
issue commentgolang/go
proposal: os: add ReadDir, ReadFile, WriteFile, CreateTemp, MkdirTemp & deprecate io/ioutil
Would it make sense to put ReadDir, ReadFile, and WriteFile in io/fs instead of os?
It sees like they could plausibly work with any filesystem, not just the os one.
I would argue that they fit naturally with the new Walk API, wherever that ends up: ReadDir, ReadFile, WriteFile, and Walk all share the property that they implement a high-level operation in terms of existing lower-level operations.
comment created time in 14 days
issue commentgolang/go
sum.golang.org: should not respond with "410 Gone"
the
gocommand reported the "unexpected" error (despite it apparently being an expected and known error)
What was the error it gave you? Perhaps we can improve the error message somehow.
comment created time in 14 days
issue commentgolang/go
cmd/go: run constantly fails and suggests 'go mod tidy'
The go mod tidy suggestion from the original also suggests to me that there is an error in our inAll computation, possibly related to #37376.
comment created time in 14 days
issue commentgolang/go
cmd/go: run constantly fails and suggests 'go mod tidy'
As of CL 258220, the error message is now:
$ go run blah.com
no required module provides package blah.com; try 'go get -d blah.com' to add it
If the replace directive specified some explicit version other than the latest one, that suggestion might fetch a version other than the intended one, but it's still much better than suggesting go mod tidy.
comment created time in 14 days
issue commentgolang/go
cmd/go: panic in base.SetFromGOFLAGS
Yep. When hideErrors is false, InitGOFLAGS should report the invalid flags, so SetFromGOFLAGS can ignore invalid flags unconditionally. (Either the error has already been reported in InitGOFLAGS, or we don't care to report it at all.)
comment created time in 14 days
issue commentgolang/go
cmd/go: should we reuse GOMODCACHE in TestScript?
Should we do the same with the new GOMODCACHE Go environment variable? That would let the tests share the host's module download cache.
The cmd/go tests use a local proxy, which we don't want to pollute the user's GOMODCACHE.
It would be possible, perhaps, to use a separate GOMODCACHE shared among the tests, except for a handful of tests that specifically check for caching behavior. (We didn't share the GOMODCACHE among tests initially in part due to #26794, which has long since been fixed.)
comment created time in 14 days
issue commentgolang/go
proposal: io/fs, filepath: add more efficient Walk alternative
@jimmyfrasche, I would expect an error entering a directory to be possible due to a number of reasons, such as:
- a permission error preventing the current user from listing the directory,
- the entry not actually referring to a directory,
- the entry being a directory on an unmounted filesystem, or on a networked filesystem for which a network error has occurred,
- the entry being located in a corrupted sector of the disk
- …
comment created time in 14 days
issue commentgolang/go
cmd/go: panic in base.SetFromGOFLAGS
@obeyda, sure! Start with a new test case replicating the panic in src/cmd/go/testdata/script.
comment created time in 14 days
issue commentgolang/go
CL 262341 should substantially improve the error message generated by cmd/go.
comment created time in 14 days
issue commentgolang/go
cmd/go: panic in base.SetFromGOFLAGS
Neat find! Thanks for the report.
comment created time in 14 days