You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
findleyr opened this issue
Mar 6, 2024
· 2 comments
Labels
NeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.
In this case, gopackages -test -json -deps ./tools_test.go will report a package "command-line-arguments [command-line-arguments.test]" with the nonsensical dependency ID "example.com/tools/tool [command-line-arguments.test]". This only occurs if the dep is a main package itself. It looks like go/packages thinks it has to break a cycle to the non-existent command-line-arguments package.
Fix two bugs discovered during the investigation of golang/go#66109,
which revealed the strange and broken intermediate test variant form
"path/to/command/package [command-line-arguments.test]", referenced from
the equally broken
"command-line-arguments [command-line-arguments.test]". This latter
package was *also* detected as an ITV, which is why we never tried to
type check it in [email protected].
- Snapshot.orphanedFileDiagnostics was not pruning intermediate test
variants, causing it to be the one place where we were now type
checking ITVs.
- Fix the latent bug that caused gopls to record a dangling edge between
the two ITVs.
There is a third bug in go/packages, filed as golang/go#66126.
Fixesgolang/go#66109
Change-Id: Ie5795b6d5a4831bf2f73217c8eb22c6ba18e59cd
Reviewed-on: https://go-review.googlesource.com/c/tools/+/569035
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>
…to command-line-arguments pkgs
Fix two bugs discovered during the investigation of golang/go#66109,
which revealed the strange and broken intermediate test variant form
"path/to/command/package [command-line-arguments.test]", referenced from
the equally broken
"command-line-arguments [command-line-arguments.test]". This latter
package was *also* detected as an ITV, which is why we never tried to
type check it in [email protected].
- Snapshot.orphanedFileDiagnostics was not pruning intermediate test
variants, causing it to be the one place where we were now type
checking ITVs.
- Fix the latent bug that caused gopls to record a dangling edge between
the two ITVs.
There is a third bug in go/packages, filed as golang/go#66126.
Fixesgolang/go#66109
Change-Id: Ie5795b6d5a4831bf2f73217c8eb22c6ba18e59cd
Reviewed-on: https://go-review.googlesource.com/c/tools/+/569035
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>
(cherry picked from commit caf5940)
Reviewed-on: https://go-review.googlesource.com/c/tools/+/569437
Auto-Submit: Robert Findley <[email protected]>
NeedsFixThe path to resolution is known, but the work has not been done.ToolsThis label describes issues relating to any tools in the x/tools repository.
In #66109, we see gopls running into a latent go/packages bug.
Consider the following setup (taken from the gopls regression test for that issue):
In this case,
gopackages -test -json -deps ./tools_test.go
will report a package"command-line-arguments [command-line-arguments.test]"
with the nonsensical dependency ID"example.com/tools/tool [command-line-arguments.test]"
. This only occurs if the dep is amain
package itself. It looks like go/packages thinks it has to break a cycle to the non-existentcommand-line-arguments
package.CC @adonovan @matloob
The text was updated successfully, but these errors were encountered: