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

fix tsc errors detected by skipLibCheck: false #9457

Merged
merged 6 commits into from
Jun 5, 2024
Merged

Conversation

turadg
Copy link
Member

@turadg turadg commented Jun 5, 2024

Description

In a recent discussion we noticed that the test wasn't showing a type error where it should have: #9452 (comment)

It would have with noImplicitAny: false but that pulls in way too many other errors. While investigating I noticed some other things that could be cleaned up and tackled those here.

The remaining blocker for skipLibCheck: false is the Telescope output in dist. The .js files have @ts-nocheck but the .d.ts don't. Surprising but not worth more effort.

Security Considerations

n/a, types

Scaling Considerations

n/a, types

Documentation Considerations

none

Testing Considerations

CI

Upgrade Considerations

Potential cherry-pick complexities but we're moving to release based on master

@turadg turadg requested a review from dckc June 5, 2024 17:47
Copy link

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0701b91
Status: ✅  Deploy successful!
Preview URL: https://d24020a3.agoric-sdk.pages.dev
Branch Preview URL: https://ta-ts-libcheck.agoric-sdk.pages.dev

View logs

Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this review should perhaps be more thorough

but the change seems worth making, on balance

@@ -39,6 +39,7 @@
},
"resolutions": {
"**/protobufjs": "^7.2.6",
"**/@types/estree": "^1.0.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like I should understand this better. I'm not going to hold up this PR over it, though.

cc @kriskowal

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some rollup package depends on an earlier version of @types/estree that has errors

@@ -331,11 +331,14 @@ export const makeBridgeManager = async ({
const bridgeManager = E(vat).provideManagerForBridge(bridge);
bridgeManagerP.resolve(bridgeManager);
provisionBridgeManager.resolve(
// @ts-expect-error XXX EProxy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😕

I suppose I should check out the branch and look at the whole diagnostic.

If you have it handy, please share.

Copy link
Member Author

@turadg turadg Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the BridgeId parameter is getting lost, I think by the EProxy

StartFns extends Record<WellKnownNames['installation'], ContractStartFn>,
StartFns extends Record<WellKnownName['installation'], ContractStartFn>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!!

I wonder how long that bug was lying around.

@@ -104,13 +104,16 @@ export type StartInstance = <SF>(
issuerKeywordRecord?: Record<Keyword, Issuer<any>>,
// 'brands' and 'issuers' need not be passed in; Zoe provides them as StandardTerms
terms?: Omit<StartParams<SF>['terms'], 'brands' | 'issuers'>,
// @ts-expect-error XXX
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm. The other @ts-expect-error in this PR seem to have local impact, but this one is imported in various places.

Seems like I should look into this more closely, but I'm not sure it's the best use of time.

in case anyone else finds a moment to take a look at this PR: cc @mhofman @gibson042

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be clear this is maintaining earlier behavior, since the .d.ts isn't checked. It just makes it so that when someone does skipLibCheck: false this won't register as an error. It also gives a clue to someone working in this file that there's a problem here

@turadg turadg added the automerge:rebase Automatically rebase updates, then merge label Jun 5, 2024
@mergify mergify bot merged commit 95c7239 into master Jun 5, 2024
71 checks passed
@mergify mergify bot deleted the ta/ts-libcheck branch June 5, 2024 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants