JShrink: RuntimeException in version 1.6.x

Just updated to version 1.6.

Shrinking several libraries now breaks with Error: Unclosed string at position: or Error: Unclosed regex pattern at position.

One example is jquery-ui.js (see https://pastebin.com/NwEXPtAb): breaks e.g. on line 12958

I added $this->echo('|error|'); before throw new \RuntimeException('Unclosed regex pattern at position: ' . $this->index); and removed the exception to get an idea where the error occurs. See https://pastebin.com/AX1XFgS3 (starts on line 1074).

Thanks for help!

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 18 (8 by maintainers)

Commits related to this issue

Most upvoted comments

I confirm, Static Content Deploy for Magento works fine, with no issues on latest JShrink Thank you!

adminhtml/Magento/backend/en_US         1825/2923           =================>---------- 62%    6 secs              
frontend/Magento/luma/en_US             1007/2199           ============>--------------- 45%    6 secs
frontend/Magento/blank/en_US            2102/2183           ==========================>- 96%    11 secs             
adminhtml/Magento/backend/en_US         2678/2923           =========================>-- 91%    11 secs             
frontend/Magento/luma/en_US             2099/2199           ==========================>- 95%    11 secs
frontend/Magento/blank/en_US            2183/2183           ============================ 100%   11 secs             
adminhtml/Magento/backend/en_US         2923/2923           ============================ 100%   11 secs             
frontend/Magento/luma/en_US             2199/2199           ============================ 100%   11 secs
Execution time: 14.963996887207

Thanks for narrowing it down- honestly that is the hardest part of a lot of these bugs, just figuring out where it’s breaking. Looking at the line in question I’ve got a good idea of what’s happening, so once I’m done with work today I should be able to tackle it.