Skip to content

Tags: bokwoon95/wgo

Tags

v0.6.4

Toggle v0.6.4's commit message
flush currently-buffered text in stdin whenever a program reloads

fixes #24

v0.6.3

Toggle v0.6.3's commit message
Fix -stdin being blocked after a restart until Enter is pressed.

Closes #22.

os.Stdin.Read() blocks until a newline `\n` is provided (due to the OS doing
line-by-line buffering https://groups.google.com/g/golang-nuts/c/NvD-pOTASIk).
Therefore, do not tie the lifecycle of a command with os.Stdin.Read(). Instead,
read from os.Stdin continuously in a background goroutine and feed its data
into the stdinPipe of whichever exec.Cmd is currently running.

v0.6.2

Toggle v0.6.2's commit message
fix bug where we were unwatching everything but 256 files, instead of…

… just unwatching 256 files

Unwatching occurs when we hit the syscall.EMFILE error ("too many open files"),
and we need to unwatch so that we have some file descriptors available for
starting commands i.e. cmd.Start(). On macOS, creating a timer for debouncing
already consumes a file descriptor [1], and if there are no file descriptors
available it panics with a very intimidating stack trace.

[1] https://dzone.com/articles/go-servers-understanding-epoll-kqueue-netpoll#:~:text=kqueue%20is%20a%20similar%20mechanism%2C%20where%20registered%20events%20(read/write%2C%20timers%2C%20signals%2C%20files)%20are%20handled%20via%20kevent

v0.6.1

Toggle v0.6.1's commit message
make unwatching when we hit "too many open files" deterministic

Also clarify in the log message that it's the number of directories watched,
not number of files watched. We don't actually know the number of files watched
since we only add directories to the watcher. On kqueue (macOS) that translates
to one file descriptor used per directory and one file decriptor used per file,
while on inotify (Linux) only needs one file descriptor per directory
(https://news.ycombinator.com/item?id=9063910).

v0.6.0

Toggle v0.6.0's commit message
bump dependencies

v0.5.14

Toggle v0.5.14's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
executing debug (#19)

useful to indicate what is being executed

v0.5.13

Toggle v0.5.13's commit message
fix tests for commit 551751b

v0.5.12

Toggle v0.5.12's commit message
-verbose: report parallel wgo command number

v0.5.11

Toggle v0.5.11's commit message
fix readme

v0.5.10

Toggle v0.5.10's commit message
properly drain the timer before use

this might have been the source of various race conditions I saw in the past 😩

references:

https://www.reddit.com/r/golang/comments/1inw7nc/anyone_else_seeing_old_unit_tests_that_involve/

https://blogtitle.github.io/go-advanced-concurrency-patterns-part-2-timers/#time-newtimer