“go build” became very slow after installing a new version of Go

前端 未结 7 1017
清酒与你
清酒与你 2021-01-31 08:35

After upgrading from Go 1.2.1 to 1.3 (Windows 7 64 bit) \"go build\" execution time has increased from around 4 to over 45 seconds. There were no other changes except the go ver

7条回答
  •  没有蜡笔的小新
    2021-01-31 08:50

    You probably have dependencies that are being recompiled each time. Try go install -a mypackage to rebuild all dependencies.

    Removing $GOPATH/pkg also helps to ensure you don't have old object files around.

    Building with the -x flag will show you if the toolchain is finding incompatible versions.

提交回复
热议问题