-
Notifications
You must be signed in to change notification settings - Fork 214
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
TypeScript 5.7 and fix coverage CI #10561
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
@@ -106,7 +106,7 @@ jobs: | |||
node-version: ${{ matrix.node-version }} | |||
|
|||
- name: generate test coverage report | |||
run: ./scripts/ci/generage-test-coverage-report.sh |
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.
Yeah, I should have noticed this one. 😛
yarn.lock
Outdated
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 a little leery of advancing to typescript@~5.7.1
when we're still getting errors that look like:
WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.
You may find that it works just fine, or you may not.
SUPPORTED TYPESCRIPT VERSIONS: >=4.7.4 <5.6.0
YOUR TYPESCRIPT VERSION: 5.6.3
Please only submit bug reports when using the officially supported version.
Even if we upgraded to typescript-eslint@^8.10.0
to get support for typescript@^5.6.0
(as https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.10.0 describes), there isn't yet a version of typescript-eslint
that claims to support [email protected]
.
Can we slow down our upgrades of typescript
a little bit and first focus on upgrading to a version of the typescript-eslint
toolchain that is officially supported?
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.
Fair. I've been working on that but it hasn't been a priority:
The reason I need TS 5.7 is for #10480 . Without it,
Error: tsconfig.build.json(7,5): error TS5096: Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set.
The status quo is that we have this warning from typescript-eslint. Landing this PR doesn't change that. By the time we do update typescript-eslint, it will support 5.7 (already in master).
So I ask that you allow this PR to merge and if you want the lint error to go away you lobby that it be prioritized (vs other work, ofc).
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 am not too concerned with the eslint warnings. They're par for the course
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.
By the time we do update typescript-eslint, it will support 5.7 (typescript-eslint/typescript-eslint#10372).
I see [email protected]
support is already merged in typescript-eslint
master
, is currently in a canary
release and will be officially released. That quells my concerns.
So I ask that you allow this PR to merge
Thanks for the additional context. Approved.
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.
LGTM, except for a question on the runtime change in the reserve terms.
@@ -37,6 +37,15 @@ const FIRST_LOWER_NEAR_KEYWORD = /^[a-z][a-zA-Z0-9_$]*$/; | |||
* @import {Bank, BankManager} from '@agoric/vats/src/vat-bank.js' | |||
*/ | |||
|
|||
// XXX when inferred, error TS2742: cannot be named without a reference to '../../../node_modules/@endo/exo/src/get-interface.js'. This is likely not portable. A type annotation is necessary. |
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 don't understand this error but explicit return values is totally acceptable anyway
@@ -2,8 +2,10 @@ | |||
|
|||
import { CONTRACT_ELECTORATE, ParamTypes } from '@agoric/governance'; | |||
|
|||
const makeReserveTerms = (poserInvitationAmount, timer) => ({ | |||
timer, |
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 is a change to the runtime behavior. A new chain will now no longer have the timer in the reserve terms where before that it would have. What is the motivation?
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.
Motivation is the caller never provided the argument and it's now detected. The runtime impact is that property will be omitted from the return instead of being undefined. I don't see anything checking for the key presence specifically.
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.
Given lack of value at the caller site, that change sounds reasonable
yarn.lock
Outdated
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 am not too concerned with the eslint warnings. They're par for the course
@@ -112,7 +112,7 @@ async function runTestScript( | |||
/** | |||
* Handle callback "command" from xsnap subprocess. | |||
* | |||
* @type { (msg: ArrayBuffer) => Promise<ArrayBuffer> } | |||
* @type { (msg: ArrayBuffer) => Promise<Uint8Array<ArrayBufferLike>> } |
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 is a significant change of type. New one looks right but I'm surprised we didn't have an error before.
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.
Thanks for clarifying the reserve terms change
@@ -2,8 +2,10 @@ | |||
|
|||
import { CONTRACT_ELECTORATE, ParamTypes } from '@agoric/governance'; | |||
|
|||
const makeReserveTerms = (poserInvitationAmount, timer) => ({ | |||
timer, |
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.
Given lack of value at the caller site, that change sounds reasonable
doesn't actually take or return a timer
c6245e1
to
140ff5f
Compare
evergreen
Description
Bump Typescript to the 5.7 release
https://devblogs.microsoft.com/typescript/announcing-typescript-5-7/
This also corrects a typo in the
coverage
job from #10560Security Considerations
none
Scaling Considerations
none
Documentation Considerations
none
Testing Considerations
CI
Upgrade Considerations
none