Giter Club home page Giter Club logo

Comments (8)

chjiyun avatar chjiyun commented on May 13, 2024

print:

cleaning...
deleting E:\WorkPlace\gin_app\tmp
failed to delete tmp dir, err: remove E:\WorkPlace\gin_app\tmp\main.exe: Access is denied.
see you again~

and cmd window is still runing but http server is stoped

from air.

xiantang avatar xiantang commented on May 13, 2024

print:

cleaning...
deleting E:\WorkPlace\gin_app\tmp
failed to delete tmp dir, err: remove E:\WorkPlace\gin_app\tmp\main.exe: Access is denied.
see you again~

and cmd window is still runing but http server is stoped

cloud you use Admin mode? it will clean the tmp files?

from air.

xiantang avatar xiantang commented on May 13, 2024

OS: Windows 7 x64
Terminal: mintty 2.8.4 (MINGW64 git-scm)

Config:

# Config file for [Air](https://github.com/cosmtrek/air) in TOML format

# Working directory
# . or absolute path, please note that the directories following must be under root
root = "."
# Optional! If `watch_dir` is empty, use `root`.
watch_dir = ""
tmp_dir = "tmp"

[build]
# Just plain old shell command. You could use `make` as well.
cmd = "govvv build"
# Binary file yields from `cmd`.
bin = "./api.exe"
# This log file places in your tmp_dir.
log = "air_errors.log"
# Watch these filename extensions.
include_ext = ["go", "tpl", "tmpl", "html", "env"]
# Ignore these filename extensions or directories.
exclude_dir = ["migrations", "assets", "tmp", "vendor"]
# There's no necessary to trigger build each time file changes if it's too frequency.
delay = 1500 # ms
# Stop to run old binary when build errors occur.
stop_on_error = true

[log]
# Show log time
time = false

[color]
# Customize each part's color. If no color found, use the raw app log.
main = "magenta"
watcher = "cyan"
build = "yellow"
runner = "green"
# app = "white"

Steps to reproduce:

  1. Create go project with http.ListenAndServe and a blank handler.
  2. Start Air air in Terminal
  3. Access the handler endpoint exmaple: http://localhost.com:1234/my_endpoint/
  4. Ctrl + C in Terminal.

Air is closed but binary is still running when checked in Task Manager.

cloud you provide air log ? you mean air is stoped and your service is alive?

from air.

chjiyun avatar chjiyun commented on May 13, 2024

print:

cleaning...
deleting E:\WorkPlace\gin_app\tmp
failed to delete tmp dir, err: remove E:\WorkPlace\gin_app\tmp\main.exe: Access is denied.
see you again~

and cmd window is still runing but http server is stoped

cloud you use Admin mode? it will clean the tmp files?

The tmp folder is deleted successfully when I close the cmd window and press Ctrl + C on vscode terminal ,
I don't know why the cmd window is not automatically close

from air.

dbalas avatar dbalas commented on May 13, 2024

I have same easy, I just change tmp dir so no access is denied error, but same issue when ctrl + c.

from air.

goto404 avatar goto404 commented on May 13, 2024

这个问题解决了吗?我的windows10也是这样的

cleaning...
deleting E:\WorkPlace\gin_app\tmp
failed to delete tmp dir, err: remove E:\WorkPlace\gin_app\tmp\main.exe: Access is denied.
see you again~

http服务一直在运行。文件修改后,日志显示:会重新编译,但在run的时候显示端口被占用。

应该是在终止前一个程序的进程时终止失败了,删除tmp目录也失败了,导致后面编译再跑时端口被占用,无法再次跑起来

from air.

makiuchi-d avatar makiuchi-d commented on May 13, 2024

Air's process (and goroutine) handling is too complex to work well.
Please try arelo if you like.

from air.

rumor-sourse avatar rumor-sourse commented on May 13, 2024

这个问题解决了吗?我的windows10也是这样的

cleaning...
deleting E:\WorkPlace\gin_app\tmp
failed to delete tmp dir, err: remove E:\WorkPlace\gin_app\tmp\main.exe: Access is denied.
see you again~

http服务一直在运行。文件修改后,日志显示:会重新编译,但在run的时候显示端口被占用。

应该是在终止前一个程序的进程时终止失败了,删除tmp目录也失败了,导致后面编译再跑时端口被占用,无法再次跑起来

解决了吗,我也出现了这个问题

from air.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.