air-verse / air

☁️ Live reload for Go apps
GNU General Public License v3.0
16.35k stars 771 forks source link

Air always assumes that there is binary build target #561

Open jimidle opened 3 months ago

jimidle commented 3 months ago

As I don't want to have more than one tool in use for monitoring rebuilds, I want to use air to also regenerate templates in module that does not produce a binary. Air does not support this even if you make the binary an empty target, it decides to try and run main.

As a feature request, create a way to specify that there is no binary to run and just run the build command.

Also, there are 112 issues and 38 pull requests. Has the author abandoned this project?

jackielii commented 3 months ago

I got a work around: just use true. See this example: https://github.com/a-h/templ/issues/667. See live/sync_assets section of the makefile

makiuchi-d commented 2 months ago

In such cases, arelo is more suitable. You can just execute the code generation command.

e.g. sqlc:

arelo -p '**/*.sql' -- sqlc generate