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

gotooltest: move default GOPATH out of the main module #156

Merged
merged 1 commit into from Apr 22, 2022

Commits on Apr 22, 2022

  1. gotooltest: move default GOPATH out of the main module

    Otherwise, commands like `go mod tidy` will try to walk into the default
    GOPATH directory. At best, that's a waste of resources, since
    directories like GOMODPATH may contain lots of files. At worst, it
    results in errors, as directories in GOMODPATH are not valid import paths:
    
    	--- FAIL: TestScripts/list (0.01s)
    		testscript.go:413:
    			[...]
    			> go mod tidy
    			[stderr]
    			mod/gopath/pkg/mod/fruit.com@v1.1.0/fruit: import path "mod/gopath/pkg/mod/fruit.com@v1.1.0/fruit" should not have @Version
    
    We add the test in goproxytest, as goproxytest already uses gotooltest,
    and we need an external module to reproduce the error.
    mvdan committed Apr 22, 2022
    Copy the full SHA
    a379338 View commit details
    Browse the repository at this point in the history