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

Don't use _fs.realpathSync.native on windows, a semi-revert of #41292 #43348

Merged
merged 2 commits into from Mar 24, 2021

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
src/compiler/sys.ts Outdated Show resolved Hide resolved
src/compiler/sys.ts Outdated Show resolved Hide resolved
src/compiler/sys.ts Outdated Show resolved Hide resolved
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

None yet

7 participants