Comments (12)
@dpurbosakti, are you making file edits from a Windows application. There's a known issue in WSL where modifications made from the native Windows environment may not trigger file modification events in the WSL Linux environment.
A workaround is to use polling by adding the following lines to your Air configuration file:
[build]
poll = true
from air.
Could you create an example project that shows this issue between two different directories and push it to another repository on Github?
from air.
@fourstepper https://github.com/dpurbosakti/techschool_simplebank you can check it here
main.go is works fine, but file in the deeper dir isnt working(air doesnt check if file is changed)
from air.
This is caused by you explicitly including "api", I am pretty sure, in your .air.toml
- https://github.com/dpurbosakti/techschool_simplebank/blob/main/.air.toml#L14
It works if you comment this line out
from air.
yes i tried to include api dir to try if its work that way,
but when i comment "include_dir" in .air.toml its still didnt work even the CLI told me they are watching my dir
proof on after edited, no mention about file changed
from air.
tried in several file in different dir still not working, only detect on main.go file
from air.
With this change, everything works as expected for me.
db/sqlc/account.sql.go has changed
building...
Processing path: /tmp/techschool_simplebank
running...
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
- using env: export GIN_MODE=release
- using code: gin.SetMode(gin.ReleaseMode)
[GIN-debug] GET /health-check --> simple-bank/api.NewServer.func1 (3 handlers)
[GIN-debug] POST /accounts --> simple-bank/api.(*Server).createAccount-fm (3 handlers)
[GIN-debug] GET /accounts/:id --> simple-bank/api.(*Server).getAccount-fm (3 handlers)
[GIN-debug] GET /accounts --> simple-bank/api.(*Server).listAccounts-fm (3 handlers)
[GIN-debug] PUT /accounts --> simple-bank/api.(*Server).updateAccount-fm (3 handlers)
[GIN-debug] DELETE /accounts/:id --> simple-bank/api.(*Server).deleteAccount-fm (3 handlers)
[GIN-debug] POST /transfers --> simple-bank/api.(*Server).createTransfer-fm (3 handlers)
[GIN-debug] POST /users --> simple-bank/api.(*Server).createUser-fm (3 handlers)
[GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.
Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.
[GIN-debug] Listening and serving HTTP on 0.0.0.0:8080
from air.
is it maybe because im using WSL ?
from air.
Can't say, try replicating the bug in another environment
from air.
i've created another repo to check, and it still doesnt work.
from air.
and yes it works on windows but not in WSL
from air.
oh nice, it works.
@jtlehtinen thanks
from air.
Related Issues (20)
- How to Disable "Process Exit with Code 0" Message?
- Fix to a problem when using podman-compose to run Air
- Issue when compiling static files
- add option to ignore the default .air.toml, for usage with "templ generate --notify-proxy"
- Process is orphaned rather than shut down when air exits HOT 9
- Returning HTML breaks proxy HOT 4
- Can't install air
- Canβt install air HOT 1
- "air -c" and "air init" can`t run HOT 3
- ldflags not being applied when building binary with Air
- Issue with air just hanging after awhile; cant ctrl+c process [WSL] (I think its the proxy setting) HOT 3
- Air with Dlv and breakpoints does not work HOT 1
- Not exexuting the exucutable HOT 1
- Live reload not working correctly with devcontainers HOT 2
- Why must rebuild when changed? HOT 3
- Run a passive command? HOT 1
- Panic in proxy handler HOT 1
- Air sometimes just crashes wsl1 and no commands work, but the process keeps running
- proxy reloads before app is built HOT 1
- Win 10 Reload fails unable to delete main.exe
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from air.