Skip to content

TS 4.7.4 crashes if tsconfig extends non-existing path #49978

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

Closed
cellog opened this issue Jul 20, 2022 · 3 comments
Closed

TS 4.7.4 crashes if tsconfig extends non-existing path #49978

cellog opened this issue Jul 20, 2022 · 3 comments
Labels
Duplicate An existing issue was already created

Comments

@cellog
Copy link

cellog commented Jul 20, 2022

Bug Report

if a tsconfig.json consists solely of an extends clause that extends a non-existing path, Typescript crashes with:

➜  dashboard git:(upgrade-ts-4.7) ✗ yarn tsc --noEmit --project tsconfig.cypress.json
yarn run v1.19.1
$ /Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/.bin/tsc --noEmit --project tsconfig.cypress.json
/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:96888
                throw e;
                ^

Error: Debug Failure. Expected [object Object] === [object Object]. Parameter symbol already has a cached type which differs from newly assigned type
    at assignParameterType (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:64862:26)
    at assignContextualParameterTypes (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:64827:21)
    at contextuallyCheckFunctionExpressionOrObjectLiteralMethod (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:65229:29)
    at checkFunctionExpressionOrObjectLiteralMethod (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:65208:13)
    at checkExpressionWorker (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:66805:28)
    at checkExpression (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:66707:38)
    at checkExpressionWithContextualType (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:66396:28)
    at inferTypeArguments (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:62906:39)
    at chooseOverload (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:63566:53)
    at resolveCall (/Users/gregorybeaver/Documents/GitHub/platform/dashboard/node_modules/typescript/lib/tsc.js:63403:26)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Command failed: node /Users/gregorybeaver/.yvm/versions/v1.19.1/bin/yarn.js tsc --noEmit --project tsconfig.cypress.json
➜

🔎 Search Terms

crash

🕗 Version & Regression Information

  • This is a crash
  • This changed between versions 4.4.4 and 4.7.4___
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about X___
  • I was unable to test this on prior versions because available time_

⏯ Playground Link

💻 Code

// We can quickly address your report if:
//  - The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code!
//  - It doesn't use external libraries. These are often issues with the type definitions rather than TypeScript bugs.
//  - The incorrectness of the behavior is readily apparent from reading the sample.
// Reports are slower to investigate if:
//  - We have to pare too much extraneous code.
//  - We have to clone a large repo and validate that the problem isn't elsewhere.
//  - The sample is confusing or doesn't clearly demonstrate what's wrong.

🙁 Actual behavior

🙂 Expected behavior

@MartinJohns
Copy link
Contributor

Duplicate of #49383.

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Jul 20, 2022
@fatcerberus
Copy link

That’s weird, it’s the same error as #49383 but the repros don’t seem at all related based on the analysis in the other issue.

@cellog
Copy link
Author

cellog commented Jul 21, 2022

thank you - I mis-diagnosed the error in my debugging, and this is indeed a dupe.

@cellog cellog closed this as completed Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants