Skip to content

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
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
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.

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

3 participants