Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

wrangler preview --watch only detects the first change (on Linux) #517

Closed
kentonv opened this issue Sep 4, 2019 · 1 comment · Fixed by #528
Closed

wrangler preview --watch only detects the first change (on Linux) #517

kentonv opened this issue Sep 4, 2019 · 1 comment · Fixed by #528
Assignees
Labels
bug Something isn't working regression Something is broken, but works in previous releases
Milestone

Comments

@kentonv
Copy link
Member

kentonv commented Sep 4, 2019

🐛 Bug Report

Environment

  • operating system: Linux (Debian Buster; kernel 4.19.37)
  • output of rustc -V: N/A
  • output of node -v: N/A
  • output of wrangler -V: 1.2.0

Steps to reproduce

  1. Run wrangler preview --watch.
  2. See preview.
  3. Make a change to the code.
  4. See preview update. Cool!
  5. Make another change to the code.

What did you expect to see?

Preview updates again.

What did you see instead?

Preview did not update.

The full output of Wrangler at this point is:

 JavaScript project found. Skipping unnecessary build!
 watching "worker.js"
 Detected changes...
 Detected change during cooldown...
 Cooldown over, propogating changes...
 Updated preview with changes

No matter how many times I make changes to worker.js, no more output is shown and the preview is not updated.

It appears that Wrangler is failing to notice the file changing after the first time. Since file change notification APIs vary wildly across platforms, it's very possible this bug is Linux-specific.

@gabbifish
Copy link
Contributor

gabbifish commented Sep 4, 2019

Hi there!

Thanks for reporting this. I was able to reproduce this with a Javascript worker. It looks like live reload works for multiple iterations to Webpack workers (the default Wrangler worker type), so I suspect this may not be a problem with the file change notification API, but rather a logic problem in Wrangler. I'll investigate. :)

@gabbifish gabbifish added bug Something isn't working regression Something is broken, but works in previous releases labels Sep 4, 2019
@gabbifish gabbifish self-assigned this Sep 4, 2019
@gabbifish gabbifish added this to the 1.3.0 milestone Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working regression Something is broken, but works in previous releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants