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

Ion-test-driver issue. #734

Closed
github-actions bot opened this issue Nov 23, 2022 · 3 comments
Closed

Ion-test-driver issue. #734

github-actions bot opened this issue Nov 23, 2022 · 3 comments
Assignees
Labels
bug v5.0.0 issues for v5.0.0 release
Milestone

Comments

@github-actions
Copy link

Ion-test-driver complained that behavior changed for the commit 7b702ad created by zslayton.
Refer to the workflow for more details.

@cheqianh
Copy link
Contributor

cheqianh commented Nov 29, 2022

Dig into the error log and reproduced locally with error message below,

cheqianh@ ion-js % npm run-script build-test-driver

......

Running "ts:test-driver" (ts) task
Compiling...
Cleared fast compile cache for target: test-driver
Using tsc v4.9.3
>> Warning: created test-driver/src/.baseDir.ts file because `outDir` was specified in the tsconfig.json, but not `rootDir`.  Add `rootDir`  in the `compilerOptions` section to fix this warning.
dist/commonjs/es6/dom/List.d.ts(60,114): error TS2526: A 'this' type is available only in a non-static member of a class or interface.
dist/commonjs/es6/dom/List.d.ts(83,72): error TS2552: Cannot find name 'FlatArray'. Did you mean 'Float32Array'?
dist/commonjs/es6/dom/SExpression.d.ts(60,114): error TS2526: A 'this' type is available only in a non-static member of a class or interface.
dist/commonjs/es6/dom/SExpression.d.ts(83,72): error TS2552: Cannot find name 'FlatArray'. Did you mean 'Float32Array'?

>> 4 non-emit-preventing type warnings  
>> Error: tsc return code: 2
Warning: Task "ts:test-driver" failed. Use --force to continue.

Aborted due to warnings.

cheqianh@ ion-js %

The error only happens for v5 develop branch because of above incompatible issue. The original build script doesn't work.

Link the PR here for reference - #733

@desaikd
Copy link
Contributor

desaikd commented Nov 30, 2022

test-driver needed to be updated to es2020. This should have been fixed with #736. But there still error in the ion-test-driver PR run.

Here's the local log when running npm run-script build-test-driver:

❯ npm run-script build-test-driver

> ion-js@5.0.0-SNAPSHOT build-test-driver
> cd test-driver && npm run build


> test-driver@1.0.0 build
> grunt build:test-driver

Running "clean:test-driver" (clean) task
>> 1 path cleaned.

Running "ts:commonjs-es6" (ts) task
Compiling...
Cleared fast compile cache for target: commonjs-es6
Using tsc v3.9.10
>> Warning: created src/.baseDir.ts file because `outDir` was specified in the tsconfig.json, but not `rootDir`.  Add `rootDir`  in the `compilerOptions` section to fix this warning.



TypeScript compilation complete: 2.63s for 60 TypeScript files.

Running "ts:test-driver" (ts) task
Compiling...
Cleared fast compile cache for target: test-driver
Using tsc v3.9.10
>> Warning: created test-driver/src/.baseDir.ts file because `outDir` was specified in the tsconfig.json, but not `rootDir`.  Add `rootDir`  in the `compilerOptions` section to fix this warning.



TypeScript compilation complete: 1.41s for 10 TypeScript files.

Done.

From the local run it seems to work fine although it seems like the ion-test-driver job run uses an existing ion-js version for test-driver tasks, from the log:

/Users/runner/work/ion-js/ion-js/output/build/ion-js_0a91743 already present. Using existing source.

I am not sure why it uses the same version in job re-runs but that might be causing it to fail based on previous version.

Seems like the issue is with a particular version of node, the following version of node tooling leads to the error same as the Github Actions error:

node: 16.18.0
tsc: v4.9.3
npm: 8.19.2

New logs with the above node versions generated locally:

Running "ts:test-driver" (ts) task
Compiling...
Using tsc v4.9.3
>> Warning: created test-driver/src/.baseDir.ts file because `outDir` was specified in the tsconfig.json, but not `rootDir`.  Add `rootDir`  in the `compilerOptions` section to fix this warning.
dist/commonjs/es6/dom/List.d.ts(60,114): error TS2526: A 'this' type is available only in a non-static member of a class or interface.
dist/commonjs/es6/dom/SExpression.d.ts(60,114): error TS2526: A 'this' type is available only in a non-static member of a class or interface.

>> 2 non-emit-preventing type warnings  
>> Error: tsc return code: 2
Warning: Task "ts:test-driver" failed. Use --force to continue.

Aborted due to warnings.

@desaikd
Copy link
Contributor

desaikd commented Mar 6, 2023

The issue was related to typescript latest version generating broken DTS files for mixed-in classes with functions that return this(reference issue: #747). This has been resolved by #748 which changes typescript version to 3.9.10 for generating correct DTS files. Once the issue is resolved within typescript we can upgrade to a latest version.

@desaikd desaikd closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug v5.0.0 issues for v5.0.0 release
Projects
None yet
Development

No branches or pull requests

3 participants