bacon icon indicating copy to clipboard operation
bacon copied to clipboard

doesn't seem to react to changes when using golang

Open omarandlorraine opened this issue 4 months ago • 4 comments

I've got this job here:

[jobs.sb_gofront_dev]
command = [ "go", "run", "." ]
workdir = "front/"
on_change_strategy = "kill_then_restart"
watch = ["front/*"]

since my monorepo has a load of Rust and other things, and ./front/ is a subdirectory containing a program I want to check and run using bacon. bacon.toml is of course in the same directory which also contains ./front/.

When I type at the command line bacon sb_gofront_dev, sure enough, the compiler starts up and tries to run the program. But I'm not seeing that it tries again when I edit ./front/main.go.

Is this a configurational issue or a lacuna in bacon?

omarandlorraine avatar Aug 01 '25 08:08 omarandlorraine

Hi. I'll try to handle that but I'm in holidays right now and it would be easier if you could prepare a simplified repository so that I can reproduce the problem.

Canop avatar Aug 01 '25 15:08 Canop

Hi, new bacon user here. I faced the same issue until I realize the files I wanted to watch were in the .gitignore. Make sure the file you're watching are not gitignored @omarandlorraine .

Mcdostone avatar Aug 03 '25 16:08 Mcdostone

Bacon newbie here. I have the same problem with my rust project.

[jobs.run]
command = ["cargo", "run", "--color", "always"]
need_stdout = true
allow_warnings = true
watch = ['"."']

The bacon.toml file is in my main project folder as my cargo.toml. I start bacon run but it does not recognize any change. Only when i select the bacon file in vscode and save the file again it will recognize the change and recompile. I tried also watch = ['"./src"'] but it did not work.

oOoBlackHoleSunoOo avatar Aug 11 '25 16:08 oOoBlackHoleSunoOo

Bacon newbie here. I have the same problem with my rust project.

[jobs.run]
command = ["cargo", "run", "--color", "always"]
need_stdout = true
allow_warnings = true
watch = ['"."']

The bacon.toml file is in my main project folder as my cargo.toml. I start bacon run but it does not recognize any change. Only when i select the bacon file in vscode and save the file again it will recognize the change and recompile. I tried also watch = ['"./src"'] but it did not work.

Is the project your working on open source? Can you provide a link to it?

c-git avatar Aug 14 '25 04:08 c-git