-
Notifications
You must be signed in to change notification settings - Fork 1
error recovery #2
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
Comments
Hello! Hmm, indeed there seems to be something funky going on with the way rollup re-uses cached bundles. I tried your reduced test case in the link you mentioned but didn't really notice anything out of the ordinary, the thread you linked seem to deal with being unable to recover from initial builds? Could you perhaps make another reduced test case of your issue that I could explore a bit? Thanks so much! |
Hello again! I updated rollup to version 0.1.7 which adds a --verbose flag so you can see more clearly what wrollup is doing. Also fixed a glob pattern issue on the global recovery watcher. Wrollup temporarily creates a global watcher to recover from failures by itself when rollup fails -- however, the pattern I had used I was However, this still shouldn't do anything to fix your call stack exceed error with cached bundles, that's still a bit of a mystery that I haven't been able to reproduce. |
Thanks for the quick response! I believe I've managed to create a reduced test case: |
Interesting! I couldn't reproduce the error at all when running wrollup directly from source, but when I tried to run it from the local node_modules (as an npm script), then the RangeError: Maximum call stack size exceeded errors occurred. The reason was that my local source code (git clone this repo) was using rollup version 0.34.10 which produced no call stack errors see: https://github.com/talmobi/wrollup/blob/master/package.json#L27 but in the test case project I was using the latest rollup version 0.36.1 (and wrollup will use your local rollup version, it does not include rollup inside itself) Could you try install rollup version 0.34.10 and see if the issue still exist?
Made a small unrelated update to wrollup as version 0.1.18 also that properly removes old watcher when reattaching watcher on error recovery. |
I made a test case explaining the setup to reproduce the error: https://github.com/talmobi/wrollup_issue_2/tree/master |
You're right: wrollup v0.1.8 recovers nicely with Rollup v0.34.10 (also on my actual application). So downgrading Rollup is a good interim solution; thank you! |
Thanks for your thorough investigation over at rollup/rollup-watch#7 - I very much appreciate your efforts! |
Sure! Also I created a workaround for wrollup v0.1.9 that should work even with newer versions of rollup. The workaround creates a lazy backup bundle for use in the next bundle generation (lazily so it doesn't affect build times) (Similarly to what @jo-sm did here: rollup/rollup#1010). Since the deepClone method that rollup 0.35.0 and onwards uses somehow mutates the cache itself oddly -> if we give it a fresh copy of the bundle it seems to work fine. But creating this fresh copy using |
Excellent - that seems to work quite well, great job! I'll go ahead and close this issue, as from a user's perspective, it's all good now. |
I saw you mentioning wrollup at rollup/rollup-watch#16 (comment), so thanks for sharing!
Unfortunately, I'm observing similar issues as described in rollup/rollup-watch#7 (comment):
After introducing a syntax error, wrollup reports "SyntaxError" with an excerpt of the source code. Immediately afterwards it reports numerous "RangeError: Maximum call stack size exceeded" exceptions at
node_modules/rollup/dist/rollup.js:165:18
, from which it doesn't seem to recover - i.e. the bundle won't recompile after fixing the syntax error without restarting the wrollup process.It appears that
--nocache
might fix this, but that's of course too slow for regular use.The text was updated successfully, but these errors were encountered: