-
Notifications
You must be signed in to change notification settings - Fork 248
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
Infinite recursion in SourcemappingUrlProcessor #481
Comments
+1 Got the same problem yesterday and had to rollback to the previous version. I haven't had time to identify the asset that triggered the bug, but I'm getting the same type of recursion. |
+1 |
This is the call where the problem starts:
It is called with |
Same issue after updating to 3.4.0, reverting to 3.2.2 solved the problem. |
Pin sprockets-rails due to rails/sprockets-rails#481
@dhh this seems to be caused by your change. I tried to understand how to fix but unfortunately I could not understand the requirements. |
I'll investigate and fix. |
The requirement is that sourceMappingURL needs to refer to digested assets, otherwise it's not going to work when those comments are added by esbuild/webpack/etc, because Sprockets will digest all assets in production. It's the same issue as with CSS |
This will prevent the recursion issue noticed in #481.
Trying to figure out exactly how this is triggered. How are you including bs-custom-file-input.js? Is it a local file? Can you try #483 to see if it resolves the issue? |
It's just installed in
|
I've checked and #483 makes no difference but then I wouldn't expect it to as there is no path involved here. |
Hmm, I figured the issue was that we were running the same replacement more than once. But guess not. I'll try to replicate your setup. |
Found the issue. It's a bug deeper in Sprockets. If you do Anyway, I can work around this for now, but would be nicer to fix the underlying issue! |
@tomhughes Can you give #484 a try? |
Confirmed fixed on the reproduction and released as 3.4.1. Thanks for the help tracking this down! Solving the underlying and long-standing issue with sprocket lookups on 2+ deep nesting is still pending. If anyone is interested in pursuing, please do. |
Yes that seems to have fixed it for us as well, thanks. |
…sprockets-rails#481 was fixed a while ago
Pin sprockets-rails due to rails/sprockets-rails#481
…sprockets-rails#481 was fixed a while ago
We have an asset in our project that appears to be causing an infinite recursion in the new
SourcemappingUrlProcessor
with a stack that looks like:which then repeats over and over.
The asset that triggers it is https://github.com/Johann-S/bs-custom-file-input/blob/master/dist/bs-custom-file-input.js and although the url map comment seems sensible the preprocessor gets reinvoked for
bs-custom-file-input.js
rather thanbs-custom-file-input.js.map
when build the asset path.The text was updated successfully, but these errors were encountered: