-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[4.2.2] Compiler crash with null pointer in tsc.js: isWeakType resolved.callSignatures is null #42942
Comments
@paztis the βsource codeβ section of the bug report is supposed to be the code that makes TypeScript crash, not the TypeScript code that crashes. I might be able to reconstruct something from the debug dumps you provided, but it would be really helpful if you could describe how to trigger this crash. |
yes I know I've difficulties to identify the problematic piece of code but just found it.
If I replace it with its mjs version tsc compilation pass
|
So just compiling that file causes the crash? Or does the crash start with something that imports and uses |
Something that import and use it
Don't know what
Le mer. 24 fΓ©vr. 2021 Γ 19:06, Andrew Branch <notifications@github.com> a
Γ©crit :
β¦ So just compiling that file causes the crash? Or does the crash start with
something that imports and uses _extends?
β
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42942 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABIKMMPBQLOJSZYP3GK5EO3TAU53DANCNFSM4YE4L5BA>
.
|
Can you at least tell me what your tsconfig is like? Clearly youβre compiling JS with |
Sorry Yes I add it:
|
here is a repo where I reproduce the defect Locally, with the same code I've the error, but don't know why not on codeSandbox just run the command npm run build on it extra info: node: v14.15.0, system: bigSur |
Perfect, thank you! |
Hmm nope, never mind, doesnβt repro for me. |
you've create this repo locally ? It contains only 4 files: package.json, tsConfig.json, src/index.ts and src/js/problematicFile.js |
Yes. Iβve copied it exactly from the codesandbox. |
on wich OS are you ? I'm on mac |
ok I've update the codeSandbox: https://codesandbox.io/s/twilight-sound-ll66d you can test in now it fails everywhere |
I can now reproduce the error. @andrewbranch If it helps, deleting lines 16 and 21 of https://unpkg.com/browse/@babel/runtime@7.13.7/helpers/extends/index.js from |
I managed to create a smaller example: package.json{
"name": "test-module",
"version": "1.0.0",
"scripts": {
"build": "tsc --outDir lib/"
},
"dependencies": {
"typescript": "4.2.2"
}
} tsconfig.json{
"compilerOptions": {
"allowJs": true,
"esModuleInterop": true,
"noEmit": true,
"baseUrl": "."
},
"include": ["src"]
} src/index.tsimport dep from "./dep.js";
dep(); src/dep.jsfunction fn() {}
module.exports = fn;
module.exports = fn;
module.exports["default"] = module.exports; |
babel team reject the responsability of their code. they said it is 100% typescript defect |
@paztis My example above shows the error without any Babel code π€· Btw, I can reproduce this starting from TS 4.1.2 |
Already fixed in #42766. |
Wait. It has been fixed just after the 4.2.2 publish 13 days ago ? As it is blocking here you're supposed to provide a patch version 4.2.3 |
How can we manage a workaround on this defect today ? I cannot modify babel source code... When is your fix supposed to be released ? |
@paztis We'll put this into the next 4.2 release (4.2.3 Edit: Disastrously confusing typo; thanks @andrewbranch |
It is mostly to understand how many time my company will be block on this.
Le jeu. 25 fΓ©vr. 2021 Γ 18:10, Ryan Cavanaugh <notifications@github.com> a
Γ©crit :
β¦ @paztis <https://github.com/paztis> We'll put this into the next 4.2
release (4.3.2)
β
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42942 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABIKMMMUTXJJMNKPE57DWRLTA2ACDANCNFSM4YE4L5BA>
.
|
@paztis as a workaround downgrade |
Tu es good idea tks
Le jeu. 25 fΓ©vr. 2021 Γ 18:46, NicolΓ² Ribaudo <notifications@github.com> a
Γ©crit :
β¦ @paztis <https://github.com/paztis> as a workaround downgrade
@babel/runtime to 7.12, since it contains the file where TS crashes
β
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42942 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABIKMMOFVJIDZ37IM2EBADDTA2EGHANCNFSM4YE4L5BA>
.
|
Sorry to bother you again So we're in a blocking situation now. I don't see other solutions for now |
@paztis You can pin it for your deps adding "resolutions": {
"@babel/runtime": "~7.12.0"
} |
Ok know this one, but I hope it will not cause conflicts with other modules that requires version different from 7 of babel |
|
ok thanks for all these info |
- Pin @babel/runtime per microsoft/TypeScript#42942 Add undeclared workbox dependencies Add sqlite3 unit-testing dependency
Itβs being released in 4.2.3 #42942 (comment) |
Bug Report
π Search Terms
resolved.callSignatures
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
source code:
error log:
value of the resolved variable at crash time:
value of resolved.symbol.declarations[0]:
seems to came from @babel/runtime (in v7.13.7 on my node_modules)
π Actual behavior
Crash
π Expected behavior
Don't crash
The text was updated successfully, but these errors were encountered: