Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

Always use absolute paths after reading from cache #83

Merged
merged 18 commits into from
Jun 25, 2019

Conversation

mistic
Copy link
Collaborator

@mistic mistic commented Jun 13, 2019

We only want to use relative paths when writing to cache with a cacheContext.
In all the other cases, right after reading from cache, we should always use absolute paths or the webpack watch will break in very strange ways (probably because a bug in chokidar/watchpack). In that case, using a relative path with this.fs.stat (the fs cached version from the webpack compiler) would return stale metadata.

/CC @evilebottnawi

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add tests for this? I know it is not easy, but will be great have tests and note/todo in source code because for future developers/contributors it will be hard to understand why we did it and they can break it again

@mistic
Copy link
Collaborator Author

mistic commented Jun 18, 2019

@evilebottnawi I've made the changes you request, could you review the PR please?

@alexander-akait
Copy link
Member

Can we open issue in https://github.com/webpack/memory-fs?

@mistic
Copy link
Collaborator Author

mistic commented Jun 25, 2019

@evilebottnawi I've opened an issue here #86 if u want to proceed with further investigation in the underlying dependencies

@mistic mistic merged commit 9d93c31 into webpack-contrib:master Jun 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants