Skip to content

Fix for considering new go files in dev filesystem watcher#1946

Merged
leaanthony merged 1 commit intowailsapp:masterfrom
scottopell:fix/dev-watcher-fsnotify-oddity
Oct 9, 2022
Merged

Fix for considering new go files in dev filesystem watcher#1946
leaanthony merged 1 commit intowailsapp:masterfrom
scottopell:fix/dev-watcher-fsnotify-oddity

Conversation

@scottopell
Copy link
Contributor

What is this

Adds support for watching for creation of new files while running wails dev.

Motivation

I encountered a bug where updates to my go files were not resulting in a refresh of the wails app.

I added some logging to see what events were coming out of fsnotify and I found that when I wrote updates to my code, fsnotify was picking up a sequence of REMOVE CREATE CHMOD events instead of a WRITE as this code was expecting.

Tested and working on macOS 12.4.

FSNotify Event Item:  "/Users/scottopell/dev/heaprof/app.go": REMOVE
FSNotify Event Item:  "/Users/scottopell/dev/heaprof/app.go": CREATE
FSNotify Event Item:  "/Users/scottopell/dev/heaprof/app.go": CHMOD

@leaanthony
Copy link
Member

Nice catch @scottopell! PR looks good too. Thanks heaps! 👍

@leaanthony leaanthony merged commit eae90df into wailsapp:master Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants