Skip to content

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

Merged
merged 5 commits into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/testRunner/externalCompileRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace Harness {
interface UserConfig {
types: string[];
cloneUrl: string;
branch?: string;
path?: string;
}

Expand Down Expand Up @@ -56,9 +57,10 @@ namespace Harness {
ts.Debug.assert(!!config.cloneUrl, "Bad format from test.json: cloneUrl field must be present.");
const submoduleDir = path.join(cwd, directoryName);
if (!fs.existsSync(submoduleDir)) {
exec("git", ["--work-tree", submoduleDir, "clone", config.cloneUrl, path.join(submoduleDir, ".git")], { cwd });
exec("git", ["--work-tree", submoduleDir, "clone", "-b", config.branch || "master", config.cloneUrl, path.join(submoduleDir, ".git")], { cwd });
}
else {
exec("git", ["--git-dir", path.join(submoduleDir, ".git"), "--work-tree", submoduleDir, "checkout", config.branch || "master"], { cwd: submoduleDir });
exec("git", ["--git-dir", path.join(submoduleDir, ".git"), "--work-tree", submoduleDir, "reset", "HEAD", "--hard"], { cwd: submoduleDir });
exec("git", ["--git-dir", path.join(submoduleDir, ".git"), "--work-tree", submoduleDir, "clean", "-f"], { cwd: submoduleDir });
exec("git", ["--git-dir", path.join(submoduleDir, ".git"), "--work-tree", submoduleDir, "pull", "-f"], { cwd: submoduleDir });
Expand Down
9 changes: 9 additions & 0 deletions tests/baselines/reference/user/TypeScript-Node-Starter.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Exit Code: 2
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.
Copy link
Member Author

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.

Copy link
Member Author

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.




Standard error:
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Exit Code: 2
Standard output:
node_modules/@types/react-native/index.d.ts(8745,18): error TS2717: Subsequent property declarations must have the same type. Property 'geolocation' must be of type 'Geolocation', but here has type 'GeolocationStatic'.
node_modules/@types/react-native/index.d.ts(8685,18): error TS2717: Subsequent property declarations must have the same type. Property 'geolocation' must be of type 'Geolocation', but here has type 'GeolocationStatic'.



Expand Down
545 changes: 532 additions & 13 deletions tests/baselines/reference/user/acorn.log

Large diffs are not rendered by default.

21 changes: 11 additions & 10 deletions tests/baselines/reference/user/adonis-framework.log
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ node_modules/adonis-framework/src/Config/index.js(39,15): error TS2304: Cannot f
node_modules/adonis-framework/src/Config/index.js(58,15): error TS2304: Cannot find name 'Mixed'.
node_modules/adonis-framework/src/Encryption/index.js(53,15): error TS2304: Cannot find name 'Mixed'.
node_modules/adonis-framework/src/Encryption/index.js(71,34): error TS2769: No overload matches this call.
Overload 1 of 4, '(data: ArrayBufferView, input_encoding: undefined, output_encoding: Encoding): string', gave the following error.
Overload 1 of 4, '(data: ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string', gave the following error.
Argument of type 'string' is not assignable to parameter of type 'undefined'.
Overload 2 of 4, '(data: string, input_encoding: Encoding | undefined, output_encoding: Encoding): string', gave the following error.
Overload 2 of 4, '(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string', gave the following error.
Argument of type 'string' is not assignable to parameter of type 'Encoding | undefined'.
node_modules/adonis-framework/src/Encryption/index.js(77,27): error TS2322: Type 'string' is not assignable to type 'Buffer'.
node_modules/adonis-framework/src/Encryption/index.js(77,50): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'.
node_modules/adonis-framework/src/Encryption/index.js(85,23): error TS8024: JSDoc '@param' tag has name 'value', but there is no parameter with that name.
node_modules/adonis-framework/src/Encryption/index.js(87,15): error TS2304: Cannot find name 'Mixed'.
node_modules/adonis-framework/src/Encryption/index.js(101,21): error TS2769: No overload matches this call.
Overload 1 of 4, '(data: ArrayBufferView, input_encoding: undefined, output_encoding: Encoding): string', gave the following error.
Overload 1 of 4, '(data: ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string', gave the following error.
Argument of type '"base64"' is not assignable to parameter of type 'undefined'.
Overload 2 of 4, '(data: string, input_encoding: Encoding | undefined, output_encoding: Encoding): string', gave the following error.
Overload 2 of 4, '(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string', gave the following error.
Argument of type 'string' is not assignable to parameter of type 'Encoding'.
node_modules/adonis-framework/src/Encryption/index.js(102,5): error TS2322: Type 'string' is not assignable to type 'Buffer & string'.
Type 'string' is not assignable to type 'Buffer'.
Expand All @@ -63,11 +63,11 @@ node_modules/adonis-framework/src/Env/index.js(54,15): error TS2304: Cannot find
node_modules/adonis-framework/src/Env/index.js(56,15): error TS2304: Cannot find name 'Mixed'.
node_modules/adonis-framework/src/Env/index.js(80,15): error TS2304: Cannot find name 'Mixed'.
node_modules/adonis-framework/src/Event/index.js(13,21): error TS2307: Cannot find module 'adonis-fold' or its corresponding type declarations.
node_modules/adonis-framework/src/Event/index.js(128,12): error TS2740: Type '() => {}[]' is missing the following properties from type 'any[]': pop, push, concat, join, and 27 more.
node_modules/adonis-framework/src/Event/index.js(128,12): error TS2322: Type '() => {}[]' is not assignable to type 'any[]'.
node_modules/adonis-framework/src/Event/index.js(153,25): error TS2339: Property 'wildcard' does not exist on type 'EventEmitter2'.
node_modules/adonis-framework/src/Event/index.js(188,17): error TS2304: Cannot find name 'Spread'.
node_modules/adonis-framework/src/Event/index.js(201,27): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
Type 'IArguments' is missing the following properties from type 'any[]': pop, push, concat, join, and 26 more.
node_modules/adonis-framework/src/Event/index.js(201,27): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'Spread[]'.
Type 'IArguments' is missing the following properties from type 'Spread[]': pop, push, concat, join, and 27 more.
node_modules/adonis-framework/src/Event/index.js(207,24): error TS2304: Cannot find name 'Sring'.
node_modules/adonis-framework/src/Event/index.js(256,52): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'Listener'.
Type 'Function' provides no match for the signature '(...values: any[]): void'.
Expand All @@ -91,6 +91,7 @@ node_modules/adonis-framework/src/Exceptions/index.js(164,14): error TS1056: Acc
node_modules/adonis-framework/src/Exceptions/index.js(178,21): error TS2554: Expected 0 arguments, but got 3.
node_modules/adonis-framework/src/Exceptions/index.js(191,21): error TS2554: Expected 0 arguments, but got 3.
node_modules/adonis-framework/src/Exceptions/index.js(205,21): error TS2554: Expected 0 arguments, but got 3.
node_modules/adonis-framework/src/File/index.js(139,22): error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.
node_modules/adonis-framework/src/File/index.js(175,5): error TS2322: Type 'Promise<any>' is not assignable to type 'boolean'.
node_modules/adonis-framework/src/File/index.js(273,5): error TS2322: Type 'string | boolean' is not assignable to type 'boolean'.
Type 'string' is not assignable to type 'boolean'.
Expand Down Expand Up @@ -141,7 +142,7 @@ node_modules/adonis-framework/src/Response/index.js(299,15): error TS2304: Canno
node_modules/adonis-framework/src/Response/index.js(323,15): error TS2304: Cannot find name 'Mixed'.
node_modules/adonis-framework/src/Route/ResourceCollection.js(39,11): error TS1359: Identifier expected. 'this' is a reserved word that cannot be used here.
node_modules/adonis-framework/src/Route/ResourceCollection.js(43,40): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
Type 'IArguments' is missing the following properties from type 'any[]': pop, push, concat, join, and 26 more.
Type 'IArguments' is missing the following properties from type 'any[]': pop, push, concat, join, and 27 more.
node_modules/adonis-framework/src/Route/ResourceCollection.js(56,31): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
node_modules/adonis-framework/src/Route/ResourceMember.js(39,11): error TS1359: Identifier expected. 'this' is a reserved word that cannot be used here.
node_modules/adonis-framework/src/Route/ResourceMember.js(43,40): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
Expand All @@ -166,7 +167,7 @@ node_modules/adonis-framework/src/Route/index.js(343,33): error TS2345: Argument
node_modules/adonis-framework/src/Route/index.js(354,20): error TS2694: Namespace 'Route' has no exported member 'Group'.
node_modules/adonis-framework/src/Route/index.js(368,3): error TS2322: Type 'null' is not assignable to type 'string'.
node_modules/adonis-framework/src/Route/index.js(396,63): error TS2554: Expected 2 arguments, but got 3.
node_modules/adonis-framework/src/Route/index.js(407,20): error TS2694: Namespace 'Route' has no exported member 'resources'.
node_modules/adonis-framework/src/Route/index.js(407,14): error TS2749: 'Route.resources' refers to a value, but is being used as a type here. Did you mean 'typeof Route.resources'?
node_modules/adonis-framework/src/Route/index.js(501,42): error TS2345: Argument of type 'boolean | undefined' is not assignable to parameter of type 'boolean'.
Type 'undefined' is not assignable to type 'boolean'.
node_modules/adonis-framework/src/Route/resource.js(92,25): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'string'.
Expand All @@ -183,7 +184,7 @@ node_modules/adonis-framework/src/Route/resource.js(209,45): error TS2345: Argum
node_modules/adonis-framework/src/Route/resource.js(233,15): error TS2304: Cannot find name 'Mixed'.
node_modules/adonis-framework/src/Route/resource.js(261,15): error TS2304: Cannot find name 'Mixed'.
node_modules/adonis-framework/src/Route/resource.js(286,11): error TS1359: Identifier expected. 'this' is a reserved word that cannot be used here.
node_modules/adonis-framework/src/Route/resource.js(290,40): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any, ...any[]]'.
node_modules/adonis-framework/src/Route/resource.js(290,40): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[Mixed, ...any[]]'.
node_modules/adonis-framework/src/Route/resource.js(296,15): error TS2304: Cannot find name 'Mixed'.
node_modules/adonis-framework/src/Route/resource.js(314,62): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'.
node_modules/adonis-framework/src/Server/helpers.js(17,29): error TS8024: JSDoc '@param' tag has name 'appNamespace', but there is no parameter with that name.
Expand Down
26 changes: 15 additions & 11 deletions tests/baselines/reference/user/assert.log
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
Exit Code: 2
Standard output:
node_modules/assert/test.js(25,5): error TS2367: This condition will always return 'false' since the types 'string | undefined' and 'boolean' have no overlap.
node_modules/assert/test.js(39,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
node_modules/assert/test.js(55,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
node_modules/assert/test.js(74,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
node_modules/assert/test.js(84,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
node_modules/assert/test.js(94,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
node_modules/assert/test.js(103,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
node_modules/assert/test.js(120,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
node_modules/assert/test.js(128,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
node_modules/assert/test.js(39,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
node_modules/assert/test.js(55,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
node_modules/assert/test.js(74,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
node_modules/assert/test.js(84,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
node_modules/assert/test.js(94,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
node_modules/assert/test.js(103,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
node_modules/assert/test.js(120,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
node_modules/assert/test.js(128,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
node_modules/assert/test.js(140,10): error TS2339: Property 'a' does not exist on type 'number[]'.
node_modules/assert/test.js(141,10): error TS2339: Property 'b' does not exist on type 'number[]'.
node_modules/assert/test.js(142,10): error TS2339: Property 'b' does not exist on type 'number[]'.
node_modules/assert/test.js(143,10): error TS2339: Property 'a' does not exist on type 'number[]'.
node_modules/assert/test.js(149,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
node_modules/assert/test.js(149,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
node_modules/assert/test.js(157,51): error TS2349: This expression is not callable.
Type 'never' has no call signatures.
node_modules/assert/test.js(161,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
node_modules/assert/test.js(168,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.
node_modules/assert/test.js(161,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
node_modules/assert/test.js(168,5): error TS2593: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.
node_modules/assert/test.js(182,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
node_modules/assert/test.js(229,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
node_modules/assert/test.js(235,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
Expand All @@ -27,7 +27,11 @@ node_modules/assert/test.js(256,55): error TS2345: Argument of type 'TypeError'
node_modules/assert/test.js(262,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
node_modules/assert/test.js(279,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
node_modules/assert/test.js(285,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
node_modules/assert/test.js(290,24): error TS2571: Object is of type 'unknown'.
node_modules/assert/test.js(320,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?
node_modules/assert/test.js(329,22): error TS2571: Object is of type 'unknown'.
node_modules/assert/test.js(336,22): error TS2571: Object is of type 'unknown'.
node_modules/assert/test.js(342,22): error TS2571: Object is of type 'unknown'.
node_modules/assert/test.js(346,5): error TS2552: Cannot find name 'test'. Did you mean 'tests'?


Expand Down
Loading