Skip to content

x/tools/go/analysis/internal/checker: TestApplyFixes broken at head #34265

@bcmills

Description

@bcmills

Lots of breakage showing on https://build.golang.org/?repo=golang.org%2fx%2ftools.

It appears that the tests are ok with release-branch.go1.12, but builds using a go build from head are consistently failing in TestApplyFixes.

Example (https://build.golang.org/log/f7cec2ac4b2787f43974ffa14f8bb2a5929c50ec):

2019/09/11 20:10:38 file=/workdir/tmp/analysistest525415992/src/rename/test.go matched no packages
--- FAIL: TestApplyFixes (0.06s)
    checker_test.go:61: contents of rewritten file
        got: package rename
        
        func Foo() {
        	bar := 12
        	_ = bar
        }
        
        // the end
        
        want: package rename
        
        func Foo() {
        	baz := 12
        	_ = baz
        }
        
        // the end
FAIL
FAIL	golang.org/x/tools/go/analysis/internal/checker	0.080s

From the matched no packages line, I wonder if this was introduced by the fix for #32483.

CC @jayconrod @ianthehat @matloob

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.SoonThis needs action soon. (recent regressions, service outages, unusual time-sensitive situations)TestingAn issue that has been verified to require only test changes, not just a test failure.ToolsThis label describes issues relating to any tools in the x/tools repository.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions