gogf / gf

GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang.
https://goframe.org
MIT License
11.6k stars 1.58k forks source link

cmd/gf: gf run watched #3707

Closed poneding closed 3 weeks ago

poneding commented 2 months ago

Go version

go version go1.22.4 darwin/arm64

GoFrame version

v2.7.2

Can this bug be reproduced with the latest release?

Option No

What did you do?

I dont know can this bug be reproduced with the latest release or not. I just run my project with gf run main.go.

What did you see happen?

It always checked watched file changes: CHMOD and rebuild the project even if I save the file and never modify it again.

image

What did you expect to see?

I want to know why it always notify the changes. And how to avoid this.

niluan304 commented 2 months ago

maybe the file has been updated by OS? like modified time.

try using other hot-compiled tool that can exclude file.

poneding commented 2 months ago

maybe the file has been updated by OS? like modified time.

try using other hot-compiled tool that can exclude file.

I have no idea. When I reboot vscode this disappears. Next time this happens I think I'll try using the air tool, thanks.

hailaz commented 2 months ago

这种情况一般是IDE(vscode 或者 goland)导致,你可以做一个简单的测试,关闭所有的IDE,用系统提供的cmd 或者 shell 执行gf run命令,然后观察是否会复现。

Issues-translate-bot commented 2 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


This situation is usually caused by IDE (vscode or goland). You can do a simple test, close all IDEs, use the cmd or shell provided by the system to execute the gf run command, and then observe whether it recurs.

gqcn commented 3 weeks ago

这种情况一般是IDE(vscode 或者 goland)导致,你可以做一个简单的测试,关闭所有的IDE,用系统提供的cmd 或者 shell 执行gf run命令,然后观察是否会复现。

@poneding Yes, as @hailaz said, the IDE can also watch and update your source files.