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

Error: Debug Failure. False expression: <empty> #348

Closed
forman opened this issue Dec 10, 2016 · 9 comments
Closed

Error: Debug Failure. False expression: <empty> #348

forman opened this issue Dec 10, 2016 · 9 comments

Comments

@forman
Copy link

forman commented Dec 10, 2016

I get a TypeScript compiler error with @blueprintjs/[email protected]:

Error: Debug Failure. False expression: <empty>

This does not happen with @blueprintjs/[email protected] .

Bug report

Steps to reproduce

  1. For example, this is file TsBlueprintBug.ts (just the one import line):
import {Dialog} from "@blueprintjs/core";
  1. This is my tsconfig.json:
{
  "compileOnSave": true,
  "compilerOptions": {
    "target": "es6",
    "jsx": "react",
    "outDir": "app",
    "module": "commonjs",
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "inlineSources": true,
    "sourceMap": true,
    "sourceRoot": "src",
    "rootDir": "src",
    "types": [
      "node",
      "mocha",
      "chai"
    ]
  }
}
  1. compile above file with tsc of [email protected] and @blueprintjs/[email protected] dependency.

Actual behavior

I get a compiler error:

> tsc

... WebstormProjects\cate-desktop\node_modules\typescript\lib\tsc.js:1794
                throw new Error("Debug Failure. False expression: " + (message || "") + verboseDebugString);
                ^

Error: Debug Failure. False expression:
    at Object.assert (C:\Users\norma\WebstormProjects\cate-desktop\node_modules\typescript\lib\tsc.js:1794:23)
    at resolveExternalModule (C:\Users\norma\WebstormProjects\cate-desktop\node_modules\typescript\lib\tsc.js:20568:30)
    at resolveExternalModuleNameWorker (C:\Users\norma\WebstormProjects\cate-desktop\node_modules\typescript\lib\tsc.js:20535:20)
    at mergeModuleAugmentation (C:\Users\norma\WebstormProjects\cate-desktop\node_modules\typescript\lib\tsc.js:19892:34)
    at initializeTypeChecker (C:\Users\norma\WebstormProjects\cate-desktop\node_modules\typescript\lib\tsc.js:35233:25)
    at Object.createTypeChecker (C:\Users\norma\WebstormProjects\cate-desktop\node_modules\typescript\lib\tsc.js:19739:9)
    at getDiagnosticsProducingTypeChecker (C:\Users\norma\WebstormProjects\cate-desktop\node_modules\typescript\lib\tsc.js:49608:93)
    at Object.getGlobalDiagnostics (C:\Users\norma\WebstormProjects\cate-desktop\node_modules\typescript\lib\tsc.js:49885:41)
    at compileProgram (C:\Users\norma\WebstormProjects\cate-desktop\node_modules\typescript\lib\tsc.js:51966:78)
    at compile (C:\Users\norma\WebstormProjects\cate-desktop\node_modules\typescript\lib\tsc.js:51925:26)

Expected behavior

it("should compile").

forman added a commit to CCI-Tools/cate-desktop that referenced this issue Dec 10, 2016
@Ciantic
Copy link

Ciantic commented Dec 10, 2016

Getting same, reported to TypeScript also microsoft/TypeScript#10522

If I understand correclty, this error message should never come from TypeScript, regardless even if blueprint 1.3.1 is broken at the moment. Thus this is error in TypeScript, it should give more specific error.

@Ciantic
Copy link

Ciantic commented Dec 10, 2016

Btw, here is a cloneable gist to try this out:

https://gist.github.com/Ciantic/60e9dbe330922cfc41086e255820df62

It should be priority to be fixed. I've spent few hours wondering why the thing I worked on last week does not work anymore.

It fails with typescript@next and [email protected]

@Ciantic
Copy link

Ciantic commented Dec 10, 2016

Here is the answer to blueprint blues today:

seems that the problem is that @blueprintjs/core augments tether, but does not have a dependency on @types/tether in package.json.

Installing the @types/tether should avoid this error. but really the fix should be in @blueprintjs/core package.json.

So devs must add that package. See microsoft/TypeScript#10522

forman added a commit to DeDop/dedop-studio that referenced this issue Dec 11, 2016
@adidahiya
Copy link
Contributor

Interesting... thanks for doing that debugging @Ciantic. A missing dependency on @types/tether also came up here: #201 (comment). I generally agree that we should add that as a dependency in package.json despite that fact that it will be superfluous for JS-only consumers.

@adidahiya
Copy link
Contributor

@types/tether was added as a dependency in #360.

@codebling
Copy link
Contributor

@adidahiya only @types/dom4 was added in 360, and only to core.

Haven't been following the whole discussion but @types/tether has been around for a while.

@adidahiya
Copy link
Contributor

adidahiya commented Dec 13, 2016

whoops, you're right. @types/tether is a dependency for this monorepo, but not in core. still needs to be added.

@adidahiya adidahiya reopened this Dec 13, 2016
@llorca llorca modified the milestones: 1.4.0, 1.5.0 Dec 13, 2016
@llorca
Copy link
Contributor

llorca commented Dec 13, 2016

Seems super straightforward, let's do it for 1.4.0 this week in addition to the SSR stuff

@forman
Copy link
Author

forman commented Dec 15, 2016

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants