-
Notifications
You must be signed in to change notification settings - Fork 337
(rustwasm template) wrangler preview --watch enters "detected changes" loop #618
Comments
Hi @toinbis ! Thanks for filing and sorry you are running into this. I'll spend some time tomorrow reproducing and focusing on a fix! If you happen to run into any other clues or info, please feel free to share! |
Hi @ashleygwilliams . Thanks a lot for looking into it! From my side I borrowed colleagues macbook with no rust or wrangler installed whatsover. Ran: So as of now at least can confirm that managed to reproduce it on another system. |
Hi @toinbis! Could you let us know which text editor you're using to edit your Worker? Ones like vim can constantly trigger the file watching system, since they use swap files. We can look into having the watcher ignore dotfiles like swapfiles in the future. |
Hi Gabbi, thanks for looking into this. I initially hit this with my VSCode. Now after you've asked also tried VSCode with my colleague computer with fresh rust/wrangler installation - same. And just now i've downloaded vanilla sublime installation. Only added toml plugin. And used iTerm to launch the I imagine there might be something specific about mine (and my colleagues?) system, though have no idea how to get to the root of the problem. Yes, vim keeps creating temp file, but I only need to open it and the chain starts. With sublime, of I only open the file - nothing happens. It means just opening does not trigger the refresh. But after I hit save - the loop starts and keeps rolling even I close all the files. It feels as if the following refreshes are triggered by some output generated by initial refresh. |
Tried one more system - old macbook with OSX El. capital 10.11. It's the 3rd system out of 3 (all OSx) I manage to replicate the bug. Am starting to consider this might really be a real issue, not just something with my system configuration. Also have to point that at least the recent attemts were made by running |
I'm able to recreate this issue on MacOS 10.14.6 Steps to reproduce (Mac Terminal no editor):
|
I was able to reproduce this issue on my machine as well, and I have developed a fix for it. Check out #699 for more details, but the bottom line up front is that Thank you so much for bringing up this issue, and we're sorry for the inconvenience! |
Thank you so much for looking into this and taking your time to prepare the fix! Do you think it'll make it's way into 1.4.0 or it's too late for quite some changes in the codebase this fix brings in? P.S. Congrats on the Cloudflare birthday week! Looking forward especially to the fridays release! :) |
Thanks for looking into this @gabbifish but I installed #699 and it does not seem to be fixed. MacOS 10.14.6
Maybe @toinbis could test this as well. I believe I have the correct code
|
I can confirm that after uninstalling the JS version of wrangler and installing the gabbi/fix-#618 following @DaleLJefferson terminal commands the loop starts after editing a file. |
@DaleLJefferson @toinbis thanks for testing! I have reason to believe the bug you're running into above must be the result of path logic differing between your Macs and my Linux machine, so I'll investigate. Thank you so much for helping me out and testing :) I'll update this thread when I think I have the fix for other operating systems. |
So, is there any news? It's impossible to work like this. @ashleygwilliams @gabbifish |
We plan to have a fix out when we release 1.5.0 at the end of this week. Thank you for your patience! |
a fix has been merged and will be released with wrangler 1.5.0. We have successfully tested it on linux, OSX, and Windows :) |
🐛 Bug Report
Wrangler 1.3.1 with rust template has major malfunction in the
wrangler preview --watch
. After command is launched all seems as expected. Though after first edit on a watched file the refresh cycle keeps spinning non-stop. Thanks a lot for looking into this and advising how to solve without waiting next release of wrangler.Environment
rustc -V
: rustc 1.37.0 (eae3437df 2019-08-13)node -v
: v10.16.2wrangler -V
: 1.3.1Tried on both node and cargo installations with wrangler.
Steps to reproduce
wrangler preview --watch
What did you expect to see?
Single auto-realtime-update cycle.
What did you see instead?
I.e. the refresh cycle keeps cycling nonstop without me touching the code at all .
The text was updated successfully, but these errors were encountered: