Skip to content

Conversation

@orta
Copy link
Contributor

@orta orta commented Mar 23, 2021

Patch hotfix for #43105 reverting #41292

Roughly: realpathSync.native returns uppercased drive labels on Windows which differs from realpathSync. without the native suffix.

This triggers at least one or two bugs further down the line (e.g. #43342 ) and doing a lot of symlink work assuming maybe c:/x/y/z.ts is a symlink to C:/x/y/z.ts, that code crashes because it assumes you'd never pass matching paths to the symlink guessing codepaths.

4.3 can get a more thorough fix which ideally should keep realpathSync.native

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Mar 23, 2021
@orta orta force-pushed the no_win_realpath branch from 608ae45 to 7a42eeb Compare March 23, 2021 16:43
@orta orta force-pushed the no_win_realpath branch from 7a42eeb to 5cc0ecd Compare March 23, 2021 18:51
@orta orta merged commit e462dfa into microsoft:release-4.2 Mar 24, 2021
amcasey pushed a commit to amcasey/TypeScript that referenced this pull request Mar 25, 2021
…oft#41292 (microsoft#43348)

We're planning a real fix for TS 4.3, but port the workaround from 4.2
so the beta doesn't have this bug.

(cherry picked from commit e462dfa)
amcasey added a commit that referenced this pull request Mar 26, 2021
* Don't use _fs.realpathSync.native on windows, a semi-revert of #41292 (#43348)

We're planning a real fix for TS 4.3, but port the workaround from 4.2
so the beta doesn't have this bug.

(cherry picked from commit e462dfa)

* Un-reverse condition

Co-authored-by: Orta Therox <ortam@microsoft.com>
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 4.2.4 milestone Apr 8, 2021
@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

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants