-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Stack overflow in TS 4.5.3 and nightly #47142
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
Comments
If you open up console.log(`Checking if ${typeToString(source)} is related to ${typeToString(target)}`); that might give you an indication of where things are going off the rails, and will help us come up with a repro and possible fix. |
Simplest repro I could do : import {Model} from "objection";
export class Organization extends Model {
id!: number;
users?: User[];
static get relationMappings() {
return {
users: {relation: Model.HasManyRelation, modelClass: User, join: {from: "organizations.id", to: "users.organizationId"}},
};
}
}
export class User extends Model {
id!: number;
organizationId!: number;
organization?: Organization;
static get relationMappings() {
return {
organization: {relation: Model.BelongsToOneRelation, modelClass: Organization, join: {from: "users.organizationId", to: "organizations.id"}},
};
}
} package.json : {"name":"tscbug","dependencies":{"objection":"^3.0.0","typescript":"^4.5.3"}} tsconfig.json (nothing fancy, generated by tsc --init) : {
"compilerOptions": {
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
"module": "commonjs", /* Specify what module code is generated. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
"strict": true, /* Enable all strict type-checking options. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
}
}
|
Thank you for the repro! That'll help us expedite a fix, though a lot of people are going to be out for a bit, so please be patient. |
I bisected using the repro. This appears to be yet another casualty of #30639. That said, we should of course never overflow the stack. I can fix that, but when I do we now report an |
@weswigham Any ideas here? |
Actually, with a couple of minor fixes (without which the variance computation for |
Originally posted by @charlescapps in #45576 (comment)
The text was updated successfully, but these errors were encountered: