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
Air only watches the directory it is being run in. For instance, when I run air in the /cmd directory, it only watches the /cmd directory and does not detect changes in any other directories or subdirectories.
Steps:
Set up a go project with multiple directories (e.g., /cmd, /internal, etc.).
Configure a devcontainer in vscode.
Run air within one of the subdirectories, such as /cmd.
Make changes in other directories or subdirectories.
Air does not detect changes outside the /cmd directory.
Environment:
Go version: go1.22.5 linux/amd64
air version: v1.52.3
I'm using the default configuration provided.
I've also tried enabling proxies.
Is there a known workaround for this issue when using devcontainers?
The text was updated successfully, but these errors were encountered:
Run air within one of the subdirectories, such as /cmd.
can't you just not do that? air should just be run in the root of the project, then you just configure it to ignore things you don't want, for example:
I have a similar issue with go 1.22.9 on an alpine devcontainer. The air version that can be installed is v1.52.3, the newer ones need a newer go version, but that has not been incorporated yet into the apk distribution.
The behavior I observe is that it works for the root project directory if and only if the directive include_dir is not present in the file .air.toml. Whenever I add this directive, even if it is include_dir = [ "./" ], air is not considering anything in the watch list anymore:
without the directive:
with the directive (doesn't matter what value it has):
My purpose is to make it watch to other folders, like ../target/static, i.e. for files that are not produced by this project, but by a sibling.
Hi there,
Air only watches the directory it is being run in. For instance, when I run air in the /cmd directory, it only watches the /cmd directory and does not detect changes in any other directories or subdirectories.
Steps:
Environment:
I'm using the default configuration provided.
I've also tried enabling proxies.
Is there a known workaround for this issue when using devcontainers?
The text was updated successfully, but these errors were encountered: