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 name collision in experimentalWatchApi code #737

Merged
merged 1 commit into from
Mar 2, 2018
Merged

Fix name collision in experimentalWatchApi code #737

merged 1 commit into from
Mar 2, 2018

Conversation

MLoughry
Copy link
Contributor

@MLoughry MLoughry commented Mar 2, 2018

Fixes #736

@johnnyreilly
Copy link
Member

Thanks!

Could you tell me some more about how this problem presented please? I haven't noticed a related issue being raised and so I'd like to understand the context for this.

@MLoughry
Copy link
Contributor Author

MLoughry commented Mar 2, 2018

As stated in #736, I got the following error when I turned on experimentalWatchApi:

Module build failed: RangeError: The normalization form should be one of NFC, NFD, NFKC, NFKD.
    at String.normalize (<anonymous>)
    at Object.directoryExists (d:\git\project\node_modules\ts-loader\dist\servicesHost.js:112:68)
    at Object.compilerHost.directoryExists (d:\git\project\node_modules\typescript\lib\typescript.js:77404:121)
    at d:\git\project\node_modules\typescript\lib\typescript.js:23409:22
    at Object.forEachAncestorDirectory (d:\git\project\node_modules\typescript\lib\typescript.js:11141:26)
    at getDefaultTypeRoots (d:\git\project\node_modules\typescript\lib\typescript.js:23407:12)
    at getEffectiveTypeRoots (d:\git\project\node_modules\typescript\lib\typescript.js:23393:20)
    at resolveTypeReferenceDirective (d:\git\project\node_modules\typescript\lib\typescript.js:23425:25)
    at resolveNamesWithLocalCache (d:\git\project\node_modules\typescript\lib\typescript.js:76752:38)
    at Object.resolveTypeReferenceDirectives (d:\git\project\node_modules\typescript\lib\typescript.js:76804:20)

Our project previously used the happyPack mode, so we don't have any previous history to go by. But the offending change, 388f2a6 8 days ago, has only been included in the 4.0.0 release from 5 days ago so far.

@johnnyreilly
Copy link
Member

Yup - totally my bad. Me and my refactoring 😄

Thanks for the fix; I'll merge and release this as 4.0.1. Hopefully sometime this weekend. Thanks again for pitching in!

@johnnyreilly johnnyreilly merged commit 095f837 into TypeStrong:master Mar 2, 2018
@johnnyreilly
Copy link
Member

Released - thanks for your help!

@MLoughry
Copy link
Contributor Author

MLoughry commented Mar 2, 2018

No problem. I tried playing around with a fixed version locally today when I had time, but ran into hangs during webpack that I couldn't reproduce in a minimal repo (with experimentalWatchApi, to be clear). Are there any diagnostics I could leverage in any future investigation?

@johnnyreilly
Copy link
Member

You could try using the trace functionality (set traceResolution: true in your tsconfig.json) which might help. Otherwise the easiest thing to do is hack console logs into it whilst you're investigating.

Basic, but it suffices!

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

Successfully merging this pull request may close these issues.

2 participants