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

Build fails with typescript 3.8.2 #1103

Closed
mydea opened this issue Feb 25, 2020 · 11 comments
Closed

Build fails with typescript 3.8.2 #1103

mydea opened this issue Feb 25, 2020 · 11 comments
Labels
bug:other-package A bug relating to another package build Ideas for or bugs with the build process

Comments

@mydea
Copy link
Contributor

mydea commented Feb 25, 2020

Please paste the output of ember -v here

ember-cli: 3.16.0
node: 12.13.1
os: linux x64

Please paste the output of tsc -v here

Version 3.8.2

Please paste the version of ember-cli-typescript and ember-cli-typescript-blueprints here

├─ @glimmer/component@1.0.0
│ └─ ember-cli-typescript@3.0.0
├─ ember-cli-typescript-blueprints@3.0.0
├─ ember-cli-typescript@3.1.3
├─ ember-concurrency-decorators@1.0.0
│ └─ ember-cli-typescript@2.0.2
└─ ember-load-initializers@2.1.1
└─ ember-cli-typescript@2.0.2

What are instructions we can follow to reproduce the issue?

yarn upgrade typescript@3.8.2
ember build
Reproduction Case

Updating typescript from 3.7.5 to 3.8.2 breaks the build. Downgrading again fixes it.

Now about that bug. What did you expect to see?

I can build the app.

What happened instead?

[Bundler]/my-ember-addon/node_modules/typescript/lib/typescript.js:98632
                throw e;
                ^

Error: Debug Failure.
    at Object.assertDefined (/my-ember-addon/node_modules/typescript/lib/typescript.js:2227:24)
    at /my-ember-addon/node_modules/typescript/lib/typescript.js:39435:34
    at Object.filter (/my-ember-addon/node_modules/typescript/lib/typescript.js:513:31)
    at serializeAsClass (/my-ember-addon/node_modules/typescript/lib/typescript.js:39433:48)
    at serializeSymbolWorker (/my-ember-addon/node_modules/typescript/lib/typescript.js:39164:29)
    at serializeSymbol (/my-ember-addon/node_modules/typescript/lib/typescript.js:39105:38)
    at /my-ember-addon/node_modules/typescript/lib/typescript.js:39080:25
    at Map.forEach (<anonymous>)
    at visitSymbolTable (/my-ember-addon/node_modules/typescript/lib/typescript.js:39079:33)
    at symbolTableToDeclarationStatements (/my-ember-addon/node_modules/typescript/lib/typescript.js:38950:17)
⠹ building... [Bundler](node:25503) UnhandledPromiseRejectionWarning: Error: Debug Failure.
    at CommandCoordinator.dispatchResponse (/my-ember-addon/node_modules/stagehand/lib/command-coordinator.js:54:69)
    at CommandCoordinator.<anonymous> (/my-ember-addon/node_modules/stagehand/lib/command-coordinator.js:43:29)
    at Generator.next (<anonymous>)
    at /my-ember-addon/node_modules/stagehand/lib/command-coordinator.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/my-ember-addon/node_modules/stagehand/lib/command-coordinator.js:3:12)
    at CommandCoordinator.messageReceived (/my-ember-addon/node_modules/stagehand/lib/command-coordinator.js:40:16)
    at ChildProcess.emit (events.js:210:5)
    at emit (internal/child_process.js:876:12)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)
(node:25503) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:25503) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I think this is the actual issue at the core of #1101

@FrankWang117
Copy link

change typescript version from ^3.8.2 to 3.7.5.
in terminal:

yarn add typescript@3.7.5

@mydea
Copy link
Contributor Author

mydea commented Feb 25, 2020

Yes, downgrading to 3.7.5 works!

@chriskrycho chriskrycho added bug:other-package A bug relating to another package build Ideas for or bugs with the build process labels Mar 4, 2020
@chriskrycho
Copy link
Member

We're watching TS 3.8 releases closely, and not currently recommending it to anyone because of the amount of breakage we're seeing. In case anyone else comes along: I'll update this comment and add another one if/when we see a solid-enough 3.8 point release or if 3.9 stabilizes these issues.

simonihmig added a commit to simonihmig/ember-ecsy-babylon that referenced this issue Mar 4, 2020
To make at least the floating dependency test pass again, and unlock all those dependabot PRs that are currently not mergable due to this. See typed-ember/ember-cli-typescript#1103
@dfreeman
Copy link
Member

I've got this narrowed down to a relatively small reproduction in https://github.com/dfreeman/typescript-3.8-debug-failure, and bisected the 3.8-dev releases to find which one it started happening in.

I reported what I found on microsoft/TypeScript#37015 (comment), which will hopefully be reopened (and likely shouldn't have been closed in the first place), so we'll see what happens from here.

@jamescdavis
Copy link
Member

Update: the issue has since been reopened, labeled a bug, and added to the TS 3.9 milestone.

@luketheobscure
Copy link
Contributor

Might want to change what's installed by default. I got this on a brand new project after just ember new foo and ember install ember-cli-typescript.

@chriskrycho
Copy link
Member

@luketheobscure it's a reasonable thought, but there's a tradeoff there: it means constant vetting of new TS versions and bumps here, and cutting a looooot more releases. That's not a massive amount of work, but it's also not nothing. I think it's likely we will get there, but none of us have the time to do that at the moment. 😬

That said, the reason I think it's likely we'll get there is that we have a medium-term goal of improving stability and reliability throughout the Ember TS ecosystem (hopefully with benefits for the wider TS ecosystem as well!) and adjusting this is likely a part of that.

cibernox pushed a commit to cibernox/ember-basic-dropdown that referenced this issue Mar 23, 2020
- Fix test build failures by locking `typescript` version to `3.7.5` as suggested by typed-ember/ember-cli-typescript#1103
- Add `.nvmrc` file to specify `node: 10` which fixes failing `netlify` build due to `The engine "node" is incompatible with this module. Expected version ">= 10.*".`
- Also disable `no-quoteless-attributes` rule for `ember-cli-template-lint`

Co-authored-by: Jeremy Taylor <jmtaylor@apple.com>
@igbopie
Copy link

igbopie commented Apr 24, 2020

so sad! I was going to use a dep that is using a ts 3.8 feature... but I can't :(

LevelbossMike added a commit to effective-ember/ember-showcase that referenced this issue May 12, 2020
Typescript 3.8.x fails the build with current ember-cli-typescript
setup. We pin the typescript-version to 3.7.5 until this is fixed.

Reference: typed-ember/ember-cli-typescript#1103
@mydea
Copy link
Contributor Author

mydea commented May 18, 2020

So with TS 3.9.2, our build is passing again 🎉 . Do you think it is safe to update to 3.9.2 (and close this issue)?

@chriskrycho
Copy link
Member

Yep! Was actually going to circle back this week and check! If anyone else has this issue in 3.9 please report here and we'll reopen.

@igbopie
Copy link

igbopie commented May 18, 2020

Yay! I have different issues now, related to mirage, but this one is gone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:other-package A bug relating to another package build Ideas for or bugs with the build process
Projects
None yet
Development

No branches or pull requests

7 participants