GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix: suppress stats errors for unstat-able paths in watch-event path by danielroe · Pull Request #326 · webpack/watchpack Conversation
|
🦋 Changeset detectedLatest commit: 999dc1d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This PR extends Watchpack’s existing “permission/invalid-path” error suppression from the initial scan path to the watch-event path, preventing noisy Watchpack Error (stats) logs when lstat fails with known “unstat-able” error codes (e.g. protected Windows system files, unreadable mounts).
Changes:
onStatsError logging for EACCES, ENODEV, and Windows-only EINVAL during watch events in DirectoryWatcher.lstat failures.Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
lib/DirectoryWatcher.js |
Suppresses specific lstat error codes in the watch-event path, aligning behavior with initial scan suppression. |
test/DirectoryWatcher.test.js |
Adds regression tests ensuring suppressed lstat errors during watch events do not log Watchpack Error (stats). |
.changeset/silence-stats-errors-watch-events.md |
Documents the patch change in release notes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| testHelper.tick(500, () => { | ||
| // eslint-disable-next-line jsdoc/reject-any-type | ||
| /** @type {any} */ (fs).lstat = originalLstat; | ||
| a.close(); | ||
| const printed = errorSpy.mock.calls | ||
| .map((call) => String(call[0])) | ||
| .filter((msg) => msg.includes("Watchpack Error (stats)")); | ||
| errorSpy.mockRestore(); | ||
| expect(printed).toEqual([]); | ||
| done(); | ||
| }); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is true.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@danielroe Thanks for the PR, can you describe cases when you are getting them? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
I think the scenario is that:
you can see in the logs: https://github.com/nuxt/nuxt/actions/runs/29737171552/job/88355542839?pr=35740#step:7:1813 you can ignore mentions of rspack; this PR actually runs webpack but wrongly labels it rspack; I'm fixing this separately. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Watchpack Error (initial scan): Error: EACCES: permission denied, lstat '/mnt/c/...'
There was an error while loading. Please reload this page.