Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/go/callgraph/vta: TestVTACallGraph fails with GODEBUG=gotypesalias=1 #68799

Closed
findleyr opened this issue Aug 8, 2024 · 4 comments
Closed
Assignees
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@findleyr
Copy link
Contributor

findleyr commented Aug 8, 2024

As reported in #68798, we lack test coverage of GODEBUG=gotypesalias=1 in x/tools.

Fortunately, it appears that most tests do pass with this setting (likely since we ran tests during development). However, x/tools/go/callgraph/vta.TestVTACallGraph fails:

--- FAIL: TestVTACallGraph (0.06s)                                                                                                                         21:05:12 [126/1617]
    --- FAIL: TestVTACallGraph/testdata/src/callgraph_type_aliases.go (0.01s)          
        vta_test.go:44: computed callgraph [init:  Do: (C).Foo(struct{}{}:Z) -> C.Foo; NewY() -> NewY C.Foo:  Baz: Do(b) -> Do; invoke t0.Foo() -> A.Foo, B.Foo NewY:  B.Foo: 
 B.Foo: (testdata.B).Foo(t1) -> B.Foo A.Foo:  A.Foo: (testdata.A).Foo(t1) -> A.Foo C.Foo: (testdata.C).Foo(t1) -> C.Foo]                                                      
            should contain                                                                                                                                                    
            [Baz: Do(b) -> Do; invoke t0.Foo() -> A.Foo, B.Foo Do: (C).Foo(struct{}{}:C) -> C.Foo; NewY() -> NewY]                                                            
            (diff: [Do: (C).Foo(struct{}{}:C) -> C.Foo; NewY() -> NewY])                                                                                                      
FAIL 

Tentatively assigning to zvonimir, though I think @timothy-king also has context on this package and is very familiar with gotypesalias. CC @adonovan

@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Aug 8, 2024
@gopherbot gopherbot added this to the Unreleased milestone Aug 8, 2024
@gabyhelp
Copy link

gabyhelp commented Aug 8, 2024

Related Issues and Documentation

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@adonovan adonovan assigned adonovan and unassigned zpavlinovic Aug 8, 2024
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/604257 mentions this issue: go/callgraph/vta: fix test under GODEBUG=gotypesalias=1

@dmitshur
Copy link
Contributor

dmitshur commented Aug 9, 2024

Thanks for fixing this. I used the fact this was recently broken to confirm the x_tools-gotip-linux-amd64-typesalias builder being added for #68798 is working as expected, and it's indeed passing at the fix commit and failing at its parent:

image

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/609417 mentions this issue: [gopls-release-branch.0.16] go/callgraph/vta: fix test under GODEBUG=gotypesalias=1

gopherbot pushed a commit to golang/tools that referenced this issue Aug 29, 2024
…gotypesalias=1

The test expectations depend on whether aliases are
materialized; update them, and suppress the test when
gotypesalias=0.

Also, clarify the failure message.

Fixes golang/go#68799

Change-Id: I4cb9429377e5423d04651c45a99d0c3fee5bef5e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/604257
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
Auto-Submit: Alan Donovan <adonovan@google.com>
(cherry picked from commit 4dc9194)
Reviewed-on: https://go-review.googlesource.com/c/tools/+/609417
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

6 participants