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

vm: debug failing nightly browser test #1452

Merged
merged 5 commits into from
Sep 7, 2021
Merged

Conversation

ryanio
Copy link
Contributor

@ryanio ryanio commented Sep 3, 2021

Fixes #1448

Note: This PR upgrades TypeScript to latest (typescript: v4.4.2, ts-node: v10.2.1)

@codecov
Copy link

codecov bot commented Sep 3, 2021

Codecov Report

Merging #1452 (f065d30) into master (5b91ccd) will decrease coverage by 1.10%.
The diff coverage is n/a.

Impacted file tree graph

Flag Coverage Δ
block 86.63% <ø> (ø)
blockchain 83.56% <ø> (ø)
client 82.87% <ø> (+0.54%) ⬆️
common 94.20% <ø> (-0.20%) ⬇️
devp2p 82.59% <ø> (+0.13%) ⬆️
ethash 86.56% <ø> (ø)
tx 88.36% <ø> (ø)
vm 79.32% <ø> (-3.47%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@ryanio ryanio added the type: CI label Sep 3, 2021
@ryanio ryanio force-pushed the debug-failing-nightly-karma branch from 0ae7189 to 161897e Compare September 3, 2021 21:24
@ryanio
Copy link
Contributor Author

ryanio commented Sep 3, 2021

okay the problem here is that karma was using the top level node_modules/typescript which was on v4 to satisfy the root typedoc plugin dependency requirement:

"peerDependencies": {
        "typescript": "4.0.x || 4.1.x || 4.2.x || 4.3.x"
      }

I believe with npm v7 it installed these dependencies automatically (that's a bit tricky, and something to watch out for in the future). Our packages were still using TS v3.9 though because otherwise we would have run into the noImplicitAny error types solved in the following commit.

In talking with Andrew about this, we have been patiently waiting to upgrade our TypeSciprt for access to named tuples to improve the client's global event bus typings. TypeScript doesn't follow semver so 3.9 -> 4.0 actually doesn't mean anything, so I think we are safe to upgrade across our monorepo.

Just as a sanity check, after building fresh packages with the new typescript I ran ev's really nice interface diff checker script for every package that checks the local interface compared to latest on npm (scripts/ts-interface-diff.sh) and that didn't seem to show any issues.

@holgerd77
Copy link
Member

@ryanio thanks for the analysis, cool find! 😄

Since you guys have talked this through I would go along with the switch to TypeScript 4.

What would be the final state here for this to be ready to be reviewed and merged? Would you remove the nightly test run triggers again and otherwise the PR stays the same?

@@ -913,7 +913,7 @@ export class BlockHeader {
try {
const header = (await blockchain.getBlock(hash)).header
return header
} catch (error) {
} catch (error: any) {
Copy link
Member

Choose a reason for hiding this comment

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

Where is this coming from? Is this a new linter rule? Or is it a TypeScript version related change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes it was changed in v4, from my understanding it is a more strict enforcement of noImplicitAny (microsoft/TypeScript#36775 (comment))

Copy link
Member

Choose a reason for hiding this comment

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

Seems to have been promoted by the Ethereum community. Really strange how small the world sometimes is! 😛

Copy link
Member

Choose a reason for hiding this comment

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

(but makes sense, I like that)

@ryanio
Copy link
Contributor Author

ryanio commented Sep 6, 2021

@ryanio thanks for the analysis, cool find! 😄

Since you guys have talked this through I would go along with the switch to TypeScript 4.

What would be the final state here for this to be ready to be reviewed and merged? Would you remove the nightly test run triggers again and otherwise the PR stays the same?

thanks! great, yes just removed it.

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

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

LGTM

@holgerd77 holgerd77 merged commit a3984a3 into master Sep 7, 2021
@holgerd77 holgerd77 deleted the debug-failing-nightly-karma branch September 7, 2021 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Monorepo, VM: API browser tests failing on master (nightly CI run)
2 participants