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

"Debug failure" without any details when upgrading to 3.8.2. #37015

Closed
lolmaus opened this issue Feb 25, 2020 · 4 comments · Fixed by #37696
Closed

"Debug failure" without any details when upgrading to 3.8.2. #37015

lolmaus opened this issue Feb 25, 2020 · 4 comments · Fixed by #37696
Assignees
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue

Comments

@lolmaus
Copy link

lolmaus commented Feb 25, 2020

TypeScript Version: 3.8.2

Search Terms: debug failure.

Code: nothing specific. Happens in an Ember app.

Expected behavior:
My app builds successfully on TypeScript 3.7.5. I expect that upgrading to 3.8.2 does not break the build or at least crashes with a meaningful error.

Actual behavior:
Build crashes with:

C:\Code\kaliber5\tujspk-frontend\node_modules\typescript\lib\typescript.js:98632
                throw e;
                ^

Error: Debug Failure.
    at Object.assertDefined (C:\Code\kaliber5\tujspk-frontend\node_modules\typescript\lib\typescript.js:2227:24)
    at C:\Code\kaliber5\tujspk-frontend\node_modules\typescript\lib\typescript.js:39435:34
    at Object.filter (C:\Code\kaliber5\tujspk-frontend\node_modules\typescript\lib\typescript.js:513:31)
    at serializeAsClass (C:\Code\kaliber5\tujspk-frontend\node_modules\typescript\lib\typescript.js:39433:48)
    at serializeSymbolWorker (C:\Code\kaliber5\tujspk-frontend\node_modules\typescript\lib\typescript.js:39164:29)
    at serializeSymbol (C:\Code\kaliber5\tujspk-frontend\node_modules\typescript\lib\typescript.js:39105:38)
    at C:\Code\kaliber5\tujspk-frontend\node_modules\typescript\lib\typescript.js:39080:25
    at Map.forEach (<anonymous>)
    at visitSymbolTable (C:\Code\kaliber5\tujspk-frontend\node_modules\typescript\lib\typescript.js:39079:33)
    at symbolTableToDeclarationStatements (C:\Code\kaliber5\tujspk-frontend\node_modules\typescript\lib\typescript.js:38950:17)

Related Issues:
There are numerous issues with Debug failure, but all of them have some additional error message such as:

Error: Debug Failure. in 'Object.assertDefined' during 'completionEntryDetails'

Mine doesn't. 😔


tsconfig.json:

{
  "compilerOptions": {
    "target": "es2017",
    "allowJs": true,
    "moduleResolution": "node",
    "allowSyntheticDefaultImports": true,
    "noImplicitAny": true,
    "noImplicitThis": true,
    "alwaysStrict": true,
    "strictNullChecks": true,
    "strictPropertyInitialization": true,
    "noFallthroughCasesInSwitch": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noImplicitReturns": true,
    "noEmitOnError": false,
    "noEmit": true,
    "inlineSourceMap": true,
    "inlineSources": true,
    "baseUrl": ".",
    "module": "es6",
    "skipLibCheck": true,
    "paths": {
      "uni-frontend/tests/*": [
        "tests/*"
      ],
      "uni-frontend/mirage/*": [
        "mirage/*"
      ],
      "uni-frontend/*": [
        "app/*",
        "lib/ember-cli-yadda-steps/app/*",
        "lib/ember-kaliber5-loading/app/*"
      ],
      "ember-cli-yadda-steps": [
        "lib/ember-cli-yadda-steps/addon"
      ],
      "ember-cli-yadda-steps/*": [
        "lib/ember-cli-yadda-steps/addon/*"
      ],
      "ember-cli-yadda-steps/test-support": [
        "lib/ember-cli-yadda-steps/addon-test-support"
      ],
      "ember-cli-yadda-steps/test-support/*": [
        "lib/ember-cli-yadda-steps/addon-test-support/*"
      ],
      "ember-kaliber5-loading": [
        "lib/ember-kaliber5-loading/addon"
      ],
      "ember-kaliber5-loading/*": [
        "lib/ember-kaliber5-loading/addon/*"
      ],
      "ember-kaliber5-loading/test-support": [
        "lib/ember-kaliber5-loading/addon-test-support"
      ],
      "ember-kaliber5-loading/test-support/*": [
        "lib/ember-kaliber5-loading/addon-test-support/*"
      ],
      "fetch": [
        "node_modules/ember-fetch"
      ],
      "*": [
        "types/*"
      ]
    },
    "experimentalDecorators": true
  },
  "include": [
    "app/**/*",
    "tests/**/*",
    "types/**/*",
    "lib/ember-cli-yadda-steps/**/*",
    "lib/ember-kaliber5-loading/**/*",
    "mirage/**/*"
  ]
}
@lolmaus
Copy link
Author

lolmaus commented Feb 25, 2020

Seems to be caused by Babel. Thx to @nickschot for pointing to babel/babel#11129

@lolmaus lolmaus closed this as completed Feb 25, 2020
@lolmaus
Copy link
Author

lolmaus commented Feb 25, 2020

@RyanCavanaugh RyanCavanaugh added the External Relates to another program, environment, or user action which we cannot control. label Feb 25, 2020
JanMiksovsky pushed a commit to JanMiksovsky/elix that referenced this issue Feb 26, 2020
@dfreeman
Copy link
Contributor

@RyanCavanaugh @lolmaus I'm pretty certain this is unrelated to Babel.

I've narrowed it down to a relatively small reproduction in https://github.com/dfreeman/typescript-3.8-debug-failure

The failure seems to have appeared in the 20191228 dev build (everything works as expected in the previous release from 20191224). It looks like it has something to do with the type definitions from DT for @ember/component when used in a .js file with allowJs: true, but that's as far as I got. It also only happens in a watched build.

@lolmaus lolmaus reopened this Mar 10, 2020
@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript and removed External Relates to another program, environment, or user action which we cannot control. labels Mar 10, 2020
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 3.9.0 milestone Mar 10, 2020
@andrewbranch andrewbranch added the Fix Available A PR has been opened for this issue label Mar 31, 2020
@igbopie
Copy link

igbopie commented May 12, 2020

typed-ember/ember-cli-typescript#1103

Just to reference the ember-cli-typescript repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants