Skip to content

Assertion error in latest master #1305

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
derekcicerone-zz opened this issue Nov 29, 2014 · 8 comments
Closed

Assertion error in latest master #1305

derekcicerone-zz opened this issue Nov 29, 2014 · 8 comments
Labels
Bug A bug in TypeScript

Comments

@derekcicerone-zz
Copy link

I just updated eclipse-typescript to the latest code on master and got this error when attempting to get diagnostics:

Error: Debug Failure. False expression: isDeclarationVisible unknown: SyntaxKind: 134

Partial stack trace:

Error: Debug Failure. False expression: isDeclarationVisible unknown: SyntaxKind: 134
    at Object.assert (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:1120:23)
    at Object.fail (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:1125:19)
    at determineIfDeclarationIsVisible (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:11474:34)
    at isDeclarationVisible (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:11480:41)
    at determineIfDeclarationIsVisible (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:11470:32)
    at isDeclarationVisible (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:11480:41)
    at getIsDeclarationVisible (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:10939:22)
    at /Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:10934:82
    at Object.forEach (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:569:30)
    at hasVisibleDeclarations (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:10934:20)
derekcicerone-zz referenced this issue in palantir/eclipse-typescript Nov 29, 2014
* constant was renamed
* let was introduced
* classifier supports additional options again
@mhegazy mhegazy added the Bug A bug in TypeScript label Nov 30, 2014
@mhegazy
Copy link
Contributor

mhegazy commented Nov 30, 2014

@derekcicerone thanks for reporting this. Can you share the sources that cause this error to occur?

@derekcicerone-zz
Copy link
Author

This issue happens on a medium-sized proprietary code base (over 20k lines) that I can't share in its entirety unfortunately. I was hoping that the stack trace would be sufficient but if not I can try to jump into the code with a debugger to figure out what might be going wrong.

@mhegazy
Copy link
Contributor

mhegazy commented Nov 30, 2014

I see the issue, i just do not see how it happened. a complete stack would be helpful as well.

@derekcicerone-zz
Copy link
Author

Hmm yeah, part of the weirdness of this issue is that the stack trace seems to begin at the hasVisibleDeclarations call. I just updated to the latest code in master and this is the "full" stack trace I see:

Error: Debug Failure. False expression: isDeclarationVisible unknown: SyntaxKind: 134
    at Object.assert (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:1120:23)
    at Object.fail (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:1125:19)
    at determineIfDeclarationIsVisible (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:11474:34)
    at isDeclarationVisible (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:11480:41)
    at determineIfDeclarationIsVisible (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:11470:32)
    at isDeclarationVisible (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:11480:41)
    at getIsDeclarationVisible (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:10939:22)
    at /Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:10934:82
    at Object.forEach (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:569:30)
    at hasVisibleDeclarations (/Users/dcicerone/git/eclipse-typescript/com.palantir.typescript/bin/bridge.js:10934:20)
    at com.palantir.typescript.services.Bridge.processRequest(Bridge.java:142)
    at com.palantir.typescript.services.Bridge.call(Bridge.java:95)
    at com.palantir.typescript.services.language.LanguageEndpoint.getAllDiagnostics(LanguageEndpoint.java:112)
    at com.palantir.typescript.TypeScriptBuilder.createMarkers(TypeScriptBuilder.java:334)
    at com.palantir.typescript.TypeScriptBuilder.build(TypeScriptBuilder.java:119)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

@derekcicerone-zz
Copy link
Author

Ok, via another debugging method (which doesn't support copy & paste unfortunately) I was able to grab this:
screen shot 2014-11-30 at 3 47 00 am

@derekcicerone-zz
Copy link
Author

This is paused in the debugger just before the exception is thrown.

@vladima
Copy link
Contributor

vladima commented Nov 30, 2014

error message looks similar to #1288 with minimal repro case:

// Debug.assert when generating declaration file
var x: <T>() => T;

checking visibility for T => checking visibility for containing FunctionType => crash. Also TypeLiteral case is also not handled meaning that this code also will trigger assertion

var x: {<T>(): T};

@derekcicerone-zz
Copy link
Author

Good call, that looks like the same issue. Closing this one.

@microsoft microsoft locked and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants