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

Pin typescript dependency to 4.4.4 for VM nightly tests #1602

Closed
wants to merge 8 commits into from

Conversation

acolytec3
Copy link
Contributor

@acolytec3 acolytec3 commented Dec 10, 2021

  • Bumps libp2p-bootstrap to 0.14.0 to resolve missing dependency issue within that dep
  • Pins Typescript to v4.4.4 as workaround for this karma issue that causes vm browser tests on nightly to fail.

@codecov
Copy link

codecov bot commented Dec 10, 2021

Codecov Report

Merging #1602 (78de029) into master (bffbc03) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

Flag Coverage Δ
block 84.96% <ø> (ø)
blockchain 85.08% <ø> (ø)
client 70.89% <ø> (ø)
common 100.00% <ø> (ø)
devp2p 83.17% <ø> (+0.13%) ⬆️
ethash ∅ <ø> (∅)
trie 86.09% <ø> (ø)
tx 88.62% <ø> (ø)
util 91.81% <ø> (ø)
vm 79.71% <ø> (ø)

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

@acolytec3 acolytec3 closed this Dec 10, 2021
@ryanio
Copy link
Contributor

ryanio commented Dec 11, 2021

I will spend some time tomorrow and see if I can fix this on the karma-typescript side, then we won't need to pin the TS version and we can use my temporary fork until merged upstream.

@@ -2,7 +2,10 @@ name: VM Nightly
on:
schedule:
- cron: 0 0 * * *

push:
Copy link
Member

Choose a reason for hiding this comment

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

This does not disable the nightly tests right? It just adds it to this specific branch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, I'll remove it from our final PR if we end up going with this solution. This was just to allow me to test without running the entire ci suite every time I committed.

@ryanio
Copy link
Contributor

ryanio commented Dec 20, 2021

PR in flight to fix monounity/karma-typescript#502

@acolytec3
Copy link
Contributor Author

acolytec3 commented Dec 30, 2021

The fix was merged into karma so we just need to keep an eye out for the next release so we can bump our dependency. I'll try building locally off whatever their latest commit from GitHub is and verify that it resolves the issue for us

@ryanio
Copy link
Contributor

ryanio commented Jan 9, 2022

I went down the rabbit hole in ethereumjs/rlp to see if this could be patched by using an updated karma-typescript location, but since it's a monorepo it needs some transformation with https://gitpkg.now.sh and then some custom scripts for a build step.

This monstrosity is what I came up with, that works here:

"karma-typescript": "https://gitpkg.now.sh/monounity/karma-typescript/packages/karma-typescript?8c0664d864a00c8d6a3bf6d04d26cc2255600435&scripts.preinstall=npm%20config%20set%20puppeteer_skip_chromium_download%20true%20%26%26%20%%26%26%20npm%20i%20typescript%404%20--ignore-scripts%20%26%26%20npm%20i%20--only%3Ddev%20--ignore-scripts%20%26%26%20npx%20json%20-I%20-f%20tsconfig.json%20-e%20%22this.compilerOptions.noImplicitAny%3Dfalse%3Bthis.compilerOptions.skipLibCheck%3Dtrue%22%20&scripts.postinstall=%26%26%20npm%20run%20build"

It does these things:

  1. Sets puppeteer_skip_chromium_download to true to skip that step
  2. Installs typescript@4, otherwise the package-lock had an old typescript v3.9.9 that was being installed and used in karma which conflicted with our version used in the library.
  3. Installs devDeps, otherwise build step has missing types
  4. Updates tsconfig noImplicityAny: false and skipLibCheck: true to avoid more build step errors
  5. Finally, runs build so dist can be made available

@acolytec3
Copy link
Contributor Author

Wow. I guess that works. Nice work!

@acolytec3 acolytec3 closed this Jan 12, 2022
@holgerd77 holgerd77 deleted the vm-nightly-typescript-version branch June 30, 2022 12:33
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.

3 participants