-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Handle nonmaster branches in user suite tests #48128
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
Conversation
@sandersn I've updated this to fix the branches for all |
Standard output: | ||
node_modules/mongoose/index.d.ts(438,37): error TS2589: Type instantiation is excessively deep and possibly infinite. | ||
node_modules/mongoose/index.d.ts(1194,5): error TS2589: Type instantiation is excessively deep and possibly infinite. | ||
node_modules/mongoose/index.d.ts(1195,5): error TS2589: Type instantiation is excessively deep and possibly infinite. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure we don't want mongoose having an error like this - I imagine we need to look into this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error is on a Query<any, this>
inside the Document
class, where Query<ResultType, DocType extends Document>
. This is a really simple type and absolutely shouldn't infini-stack. The other two are on Schema
instantiations (which is also just a class with a type argument); I think the commonality is the FilterQuery
type usage within both; need to investigate this one more; making a minimal repro will take a bit.
@@ -7,6 +7,7 @@ node_modules/clone/clone.js(176,14): error TS2532: Object is possibly 'undefined | |||
node_modules/clone/clone.js(186,16): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'string', but here has type 'number'. | |||
node_modules/clone/clone.js(186,23): error TS2365: Operator '<' cannot be applied to types 'string' and 'number'. | |||
node_modules/clone/clone.js(186,52): error TS2356: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. | |||
node_modules/clone/clone.js(255,35): error TS2774: This condition will always return true since this function is always defined. Did you mean to call it instead? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error is totally wrong - the pattern is
if (typeof module === 'object' && module.exports) {
module.exports = clone;
}
- the inner
module.exports
assignment being treated as unconditional is making us error on the check to perform the assignment.
Minimally, we need to add an exception to the error wheremodule.exports
checks, specifically, aren't considered always-defined (since they're runtime module system checks).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,20 @@ | |||
Exit Code: 2 | |||
Standard output: | |||
lib/dependencies/WorkerPlugin.js(268,23): error TS2339: Property 'name' does not exist on type 'Record<string, any> | {}'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable flows in from a location pretty explicitly typed as Record<string, any>
- the | {}
seems pretty bogus; not sure how it got in there, but it definitely seems like a bug.
The inline user tests do indeed need to be updated. I think after we finish auditing the existing tests we should shut down the infrastructure and just keep those up-to-date. I'll update the inline user tests in the next few days. |
Problem is the inline user tests only capture PR variations - they never capture when |
Update users tests per microsoft/TypeScript#48128
These are just the two
user
tests that were failing because they couldn't fetch anything (meaning the main/master swap was veryungraceful and left no redirects behind) - in a similar vein, other
user
ordocker
tests may be silently pulling age-old code from an unusedmaster
branch. A comprehensive audit of the test repos is needed. 🙁