You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run CompileDaemon -exclude-dir=./container_data -exclude-dir=./.git -exclude-dir=./docker -exclude-dir=./migrations, my go app (local webserver) doesn't seem to work.
When I run go run . I get a macos firewall allow dialog. Once I click "allow", it works.
How can I get CompileDaemon to display the firewall dialog?
When I change it to CompileDaemon -exclude-dir=./container_data -exclude-dir=./.git -exclude-dir=./docker -exclude-dir=./migrations -command "go run ." -build="echo 'Running build command\!'",
The dialog opens up first time. I can click allow. But after a code change, CompileDaemon pauses at this stage:
2021/01/28 11:20:08 Running build command!
2021/01/28 11:20:08 Build ok.
2021/01/28 11:20:08 Hard stopping the current process..
2021/01/28 11:20:08 Restarting the given command.
No dialog is shown. The old version of the app is still running.
Sorry I cannot reproduce this as I don't have access to Mac OS X. What you could try is killing the process before making a change and see if the dialog opens up again.
Nevermind, can you try using the command with the -command flag instead of go run? For example:
CompileDaemon -command=./myserver
This is how I'm running it. Whatever's given to the -build and -command flags are run every time I make a change, but the changes are not taking effect.
Nevermind, can you try using the command with the -command flag instead of go run? For example:
CompileDaemon -command=./myserver
This is how I'm running it. Whatever's given to the -build and -command flags are run every time I make a change, but the changes are not taking effect.
And the problem disappears when you disable the firewall? Sorry, I still don't have a mac to reproduce this and there is little to no info as to why this could happen :/
A bit late to this party but if you are doing ListenAndServe() on a Mac with an address like 0.0.0.0:8080 or :8080 - macOS flags that as intrusive network snooping, hence the warning. Changing your listen address to localhost should solve this issue!
(I usually have a flag.String() to override and use ./goBinaryHere -host "0.0.0.0" in Docker environments, if that helps)
Activity
pjebs commentedon Jan 28, 2021
When I change it to
CompileDaemon -exclude-dir=./container_data -exclude-dir=./.git -exclude-dir=./docker -exclude-dir=./migrations -command "go run ." -build="echo 'Running build command\!'",The dialog opens up first time. I can click allow. But after a code change, CompileDaemon pauses at this stage:
No dialog is shown. The old version of the app is still running.
githubnemo commentedon Jan 28, 2021
Sorry I cannot reproduce this as I don't have access to Mac OS X. What you could try is killing the process before making a change and see if the dialog opens up again.
pjebs commentedon Jan 28, 2021
How do I do that?
githubnemo commentedon Jan 28, 2021
Nevermind, can you try using the command with the
-commandflag instead ofgo run? For example:sanggonlee commentedon Apr 8, 2021
This is still an issue.
This is how I'm running it. Whatever's given to the
-buildand-commandflags are run every time I make a change, but the changes are not taking effect.pjebs commentedon Apr 8, 2021
I gave up using CompileDeamon. I'm not using any automatic compile application. Just
go run .when I want to run.githubnemo commentedon Apr 9, 2021
And the problem disappears when you disable the firewall? Sorry, I still don't have a mac to reproduce this and there is little to no info as to why this could happen :/
pjebs commentedon Apr 9, 2021
Yes
medge-leaflink commentedon Jun 20, 2021
A bit late to this party but if you are doing
ListenAndServe()on a Mac with an address like0.0.0.0:8080or:8080- macOS flags that as intrusive network snooping, hence the warning. Changing your listen address tolocalhostshould solve this issue!(I usually have a
flag.String()to override and use./goBinaryHere -host "0.0.0.0"in Docker environments, if that helps)