AlexStocks commented on code in PR #3244:
URL: https://github.com/apache/dubbo-go/pull/3244#discussion_r2934576484


##########
Makefile:
##########
@@ -37,6 +37,7 @@ help:
 
 # Run unit tests
 test: clean
+       go env -w GOTOOLCHAIN=go1.25.0+auto

Review Comment:
   `go env -w` 会**永久修改**用户的全局 Go 环境变量(写入 `~/.config/go/env`),跑完 `make test` 
后当前机器上所有 Go 项目的 GOTOOLCHAIN 都被改了。
   
   而且 Go 1.21+ 的 toolchain 管理机制已经会根据 go.mod 的 `go` 指令自动下载对应版本的 
toolchain,这行硬编码是多余的。
   
   建议删掉这一行。如果 CI 环境确实需要,改用环境变量方式(不会持久化):
   ```makefile
   test: clean
        GOTOOLCHAIN=go1.25.0+auto go test ./... -coverprofile=coverage.txt 
-covermode=atomic
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to