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

perf: utilize throwIfNoEntry in sync mode #324

Merged
merged 1 commit into from Nov 9, 2022

Conversation

markjm
Copy link
Contributor

@markjm markjm commented Jan 6, 2022

Resolves #316

Additionally fixing a few types and updating graceful-fs to support the new option. Thankfully, stat being null (vs throwing) is already being handled correctly.

cc @alexander-akait - graceful-fs has been updated now so this is unblocked

@markjm
Copy link
Contributor Author

markjm commented Jan 6, 2022

Actually - need to wait on this to figure out how to upgrade graceful-fs in webpack in a non-breaking way

@codecov
Copy link

codecov bot commented Jan 6, 2022

Codecov Report

Base: 95.18% // Head: 95.18% // No change to project coverage 👍

Coverage data is based on head (96be62d) compared to base (651e578).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #324   +/-   ##
=======================================
  Coverage   95.18%   95.18%           
=======================================
  Files          40       40           
  Lines        1661     1661           
=======================================
  Hits         1581     1581           
  Misses         80       80           
Impacted Files Coverage Δ
lib/Resolver.js 88.00% <ø> (ø)
lib/DirectoryExistsPlugin.js 100.00% <100.00%> (ø)
lib/FileExistsPlugin.js 95.45% <100.00%> (ø)
lib/ModulesInHierarchicalDirectoriesPlugin.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ehoogeveen-medweb
Copy link

Was this blocked on webpack/webpack#15118? If so, are all blockers resolved now?

@markjm
Copy link
Contributor Author

markjm commented Sep 8, 2022

Yes, all blockers are resolved - the only concern would be if folks are using an older 4.xx version of webpack which doesnt contain the change you linked, but only upgraded enhanced-resolve. Any new installations of webpack would pick up this version, which is fine, but a repo with locked webpack version which tries to upgrade this would see some breakage.

That may be so niche of a break that its not worth considering, but I would defer to @sokra to decide how to integrate these changes.

Further note - this version works just fine "standalone", the potential issue comes because webpack passes in its own fs, and earlier versions of webpack fs contains a bug related to this setting.

@sokra
Copy link
Member

sokra commented Nov 9, 2022

Any new installations of webpack would pick up this version, which is fine, but a repo with locked webpack version which tries to upgrade this would see some breakage.

In the unlikely event of upgrading only enhanced-resolve, but not graceful-fs or webpack, we can expect people to update graceful-fs to fix the bug they are running into.

@sokra sokra merged commit 157ed9b into webpack:main Nov 9, 2022
@markjm
Copy link
Contributor Author

markjm commented Nov 18, 2022

Thanks @sokra - mind publishing a new version w this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use throwIfNoEntry for sync resolver once graceful-fs supports it
4 participants