-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-reloaddirs
option does not work
#2829
Comments
@haukened I don't think so. The directories I'm having problems with are those that exist outside the project directory (but within the go workspace). As I observed in my attempts to fix the issue, I believe the problem is that extra directories specified with the |
Ok, looking at this i can confirm that its a bug. It looks like the
but without notifying the watcher that this directory exists, the required Currently, they are not even passed to initialize watcher: |
Fixed by #2871 |
That's awesome! Thanks for your time investigating this. |
* remove random print statement * move watcher into loop and implement reloaddirs * Fixed -reloaddirs for issue #2829 --------- Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
Description
When using the
-reloaddirs
option to specify a folder outside the working directory, the app is not reloaded when any files in those folders changeTo Reproduce
mkdir -p /tmp/myproject/common
cd /tmp/myproject && go work init
wails init -n gui -t preact-ts
go work use gui
cd common && go mod init myproject/common
go work use .
touch foo.go
foo.go
cd /tmp/myproject/gui
wails dev -reloaddirs=/tmp/myproject/common
/tmp/myproject/common/foo.go
Expected behaviour
Changes made to
/tmp/myproject/common/foo.go
should have caused the watcher to reload, but instead nothing happensScreenshots
No response
Attempted Fixes
I've tried specifying the
reloaddirs
option in many ways, but none of them works. I believe the problem is that the variable which containsdirsThatTriggerAReload
, found here:wails/v2/cmd/wails/internal/dev/dev.go
Lines 339 to 343 in 7fae22b
is not being added to the watcher, therefore none of the changes specified by
-reloaddirs
option are being detectedSystem Details
Additional context
No response
The text was updated successfully, but these errors were encountered: