Skip to content

Fix module specifier case handling for declaration emit #25110

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

Merged
merged 1 commit into from
Jun 29, 2018

Conversation

weswigham
Copy link
Member

On case-insensitive filesystems, the EmitHost wasn't propagating the case sensitivity from its parent compiler host, and the types weren't indicating this was a problem because the ModuleSpecifierResolutionHost types are loose to accommodate some odd patterns in the services layer (where some members are optional but we generally expect them to be present if we are to handle things correctly). So while we were handling case correctly in (most) cases in the algorithm itself (I found one place we were doing a === which needed to be a case-aware comparison, but should only have affected the ability to find symlinks), we were never indicating if it was supposed to be case-insensitive in the first place, resulting in paths canonicalized differently within the resolver vs externally to it, with an end result of paths like ../../User/foo/index. (since externally a canonical path like /user/foo/index would be made, but internally we'd compare case-sensitively against the original /User/foo/index).

Fixes #24599

@osdiab
Copy link

osdiab commented Jun 25, 2018

Excited to see this get released :)

@weswigham weswigham merged commit 30db300 into microsoft:master Jun 29, 2018
@weswigham weswigham deleted the why-is-case-so-hard branch June 29, 2018 18:02
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.

Import types in d.ts files contain relative paths to node_modules
3 participants