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

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

Merged
merged 1 commit into from
Feb 3, 2017

Conversation

msmorgan
Copy link
Contributor

@msmorgan msmorgan commented Feb 3, 2017

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
Copy link

quanterion commented Feb 3, 2017

Thanks! This problem makes a lot of pain to me

@kwdiggs
Copy link

kwdiggs commented Feb 3, 2017

Good stuff!

@hansl
Copy link
Contributor

hansl commented Feb 3, 2017

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
Copy link
Contributor Author

msmorgan commented Feb 4, 2017

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

@rohitsodhia
Copy link

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

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

@slubowsky
Copy link

@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
Copy link
Contributor Author

msmorgan commented Feb 8, 2017

@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

@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

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
7 participants