Skip to content

fix(@ngtools/webpack): resolve file name before invalidating cached files - #4384

Merged
hansl merged 1 commit into
angular:masterfrom
msmorgan:master
Feb 3, 2017
Merged

hansl merged 1 commit into
angular:masterfrom
msmorgan:master

Conversation

@msmorgan

@msmorgan msmorgan commented Feb 3, 2017 •

Copy link
Copy Markdown
Contributor

Fix WebpackCompilerHost cache invalidation behavior on Windows systems. Previously, invalidate made no call to _resolve, causing paths with backslashes not to match the file cache. This caused a watch build to continuously emit the same result.

Fixes #4422
Fixes #4345
Fixes #4338

…iles

Fix WebpackCompilerHost's cache invalidation behavior on Windows
systems. Previously, no call to _resolve was made, causing paths with
backslashes not to match the file cache.
@quanterion

quanterion commented Feb 3, 2017 •

Copy link
Copy Markdown

Thanks! This problem makes a lot of pain to me

@kwdiggs

kwdiggs commented Feb 3, 2017

Copy link
Copy Markdown

Good stuff!

@hansl

hansl commented Feb 3, 2017

Copy link
Copy Markdown
Contributor

LGTM. You're right, this was an oversight and we were missing e2e tests for this. I'll add a test. Thanks!

@hansl
hansl merged commit 9fcf10a into angular:master Feb 3, 2017
@msmorgan

msmorgan commented Feb 4, 2017

Copy link
Copy Markdown
Contributor Author

@hansl Btw, this caching has made watched builds so much faster. Thanks!

@rohitsodhia

Copy link
Copy Markdown

I'm kinda hoping it's just me, and just this project, but while this fix almost completely resolved #4422, I'm noticing sometimes when I make minor changes (I just changed a variable from 2500 to 2000), it still uses the old has and forces me to stop ng serve and restart. I'm not sure if I should have noted this here or in 4422, but thought this was better? It seems to work the vast majority of the time, but on some small changes (not even all), it still reuses a hash.

@quanterion

Copy link
Copy Markdown

@hansl Any plans to release a next beta? This issue is a showstopper for windows users((

@slubowsky

Copy link
Copy Markdown

@quanterion If you install latest webpack (1.2.8) problem is fixed. If you delete node_modules and redo npm install you'll get that version with current cli release as it pulls in latest (I think)

@msmorgan

msmorgan commented Feb 8, 2017

Copy link
Copy Markdown
Contributor Author

@rohitsodhia The behavior I've noticed is that sometimes after running for a long time the build freezes up and doesn't emit new files consistently, especially for small changes on a file I've been editing a lot recently.

Is this consistent with your experience?

@rohitsodhia

Copy link
Copy Markdown

@msmorgan I didn't notice any freezing... it always emitted, just not updating the hash. Following the upgrade path resolved the problems for me.

MRHarrison pushed a commit to MRHarrison/angular-cli that referenced this pull request Feb 9, 2017
…iles (angular#4384)

Fix WebpackCompilerHost's cache invalidation behavior on Windows
systems. Previously, no call to _resolve was made, causing paths with
backslashes not to match the file cache.

Fixes angular#4422
Fixes angular#4345
Fixes angular#4338
asnowwolf pushed a commit to asnowwolf/angular-cli that referenced this pull request Apr 12, 2017
…iles (angular#4384)

Fix WebpackCompilerHost's cache invalidation behavior on Windows
systems. Previously, no call to _resolve was made, causing paths with
backslashes not to match the file cache.

Fixes angular#4422
Fixes angular#4345
Fixes angular#4338
@angular-automatic-lock-bot

Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Sep 11, 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.

ng serve not creating new hash on code updates ng serve does not detect changes in routes Build is not kicking off in a browser on save

7 participants