Skip to content
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

compileBooleanMatcher fails when prefix and suffix overlap #12255

Closed
izaera opened this issue Dec 22, 2020 · 4 comments
Closed

compileBooleanMatcher fails when prefix and suffix overlap #12255

izaera opened this issue Dec 22, 2020 · 4 comments

Comments

@izaera
Copy link
Contributor

izaera commented Dec 22, 2020

Bug report

What is the current behavior?

Currently, the compileBooleanMatcher function is being fooled when the common prefix and suffix of two expressions overlap. This, in turn, leads to incorrect code being generated by JsonpChunkLoadingRuntimeModule which, in my case, tries to load a consumed module as if it had been bundled locally, thus making the web server return a Not found error and failing the page load.

If the current behavior is a bug, please provide the steps to reproduce.

I cannot send a small test project to reproduce it because:

  1. My project setup is huge and I'm working in a current development locally.
  2. I'm not quite sure how it could be reproduced in a small project because it depends on the dependency graph and federation config.

Anyway, I'm going to fix this in a following PR with a test, where it is easy to see why the production code was wrong and, looking at the test, what I was expecting to work correctly.

What is the expected behavior?

The expected behavior is that the computed regexp matches the setup correctly (see the unit test in the associated PR).

Other relevant information:
webpack version: 5.11.0
Node.js version: 12.16.3
Operating System: ArchLinux
Additional tools: yarn 1.22.4

@alexander-akait
Copy link
Member

Thanks for the issue and the PR ⭐

@sokra sokra closed this as completed in 39adecf Dec 23, 2020
sokra added a commit that referenced this issue Dec 23, 2020
Fix #12255: compileBooleanMatcher fails when prefix and suffix overlap
@izaera
Copy link
Contributor Author

izaera commented Dec 28, 2020

Hi webpack team:

May I ask what is the release policy of the project? We are having some discussions around using a temporary patched webpack version for our project until the new release fixing this issue happens, but we are unsure it is worth the hassle, as it looks you release very often :-).

However, I would like to know if you have a fixed cadence, or do it on demand, or simply when you have time to do it.

Thanks in advance and also thanks for the great work you do.

@alexander-akait
Copy link
Member

Release will be after holidays

@izaera
Copy link
Contributor Author

izaera commented Dec 28, 2020

Perfect, then. Thanks 👍

izaera added a commit to izaera/liferay-frontend-projects that referenced this issue Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants