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

Don't warn about broad globs in vendor folders #14147

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

philipp-spiess
Copy link
Member

@philipp-spiess philipp-spiess commented Aug 8, 2024

After shipping the new warning that prevents unexpected scanning of all dependencies in 3.4.8, we noticed that it was firing more often than we wanted to.

The heuristics we added works by finding broad glob patterns (once that contain /**/) and when those are found and are the sole pattern used to match a file of a known-large directory, we were showing the warning. The motivation for this is that we have seen time and time again that an incorrect config like /**/*.js can cause recursive scans through all dependencies including many minified libraries which greatly impacts performance.

In #14140, we were adding two known-large directory names:

  • node_modules (used by npm)
  • vendor (used by PHP)

The problem with the vendor name though is that it is more generic than we would like it and there are legit use cases to have a folder named vendor inside your component folder. Additionally, PHP vendors behave a bit differently and it's not super common to have minified build files in that folder (which is one of the main reasons for the slow builds). Because of this, we decided to revert the change for vendor and only scan for node_modules going forward.

@RobinMalfait RobinMalfait merged commit 702ba6a into main Aug 8, 2024
13 checks passed
@RobinMalfait RobinMalfait deleted the fix/dont-warn-for-vendor-folders branch August 8, 2024 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants