hyperledger-cacti / cacti

Hyperledger Cacti is a new approach to the blockchain interoperability problem
https://wiki.hyperledger.org/display/cactus
Apache License 2.0
340 stars 282 forks source link

build(yarn): migrate from v1.2.17 to v3.6.0 #1142

Closed petermetz closed 1 year ago

petermetz commented 3 years ago

Description

Depends on https://github.com/hyperledger/cactus/pull/1141

This is an expert level good first issue, meaning that you don't need to know much about Cactus specifically, but you do need to be an expert in configuring build systems/package managers/etc.

Yarn v3 has some performance improvements (among other things) compared to Yarn v1 so we should migrate over as soon as possible (when it hits GA).

Acceptance Criteria

  1. Developer flow has not changed, commands are the same (so that we don't have to re-write half the documentation)
  2. If the dev flow must change then the PR must include the new documentation for this and also a migration guide for people who have the old project build working (it's okay to say that they need to delete everything and do a fresh clone - as long as that actually works)
  3. No plug and play for now, let's take it one step at a time.
  4. Existing documentation example commands work (such as the readme of the supply chain app which has a step by step guide)
  5. Test case execution works as it is shown in the contributing.md and build.md files (yarn jest some/path/to/test.case.test.ts and yarn tap --ts --timeout=9999 some/path/to/other/test-case.test.ts)
  6. yarn configure works as expected - does not crash due to missing or unlinked binaries from the ./node_modules/.bin/ folder
petermetz commented 2 years ago

Issues have been reported with older versions of yarn so this just became a little more urgent than before.

petermetz commented 2 years ago

Renamed the issue to match the fact that there is now Yarn v3 released instead of v2 being the latest and greatest.

petermetz commented 2 years ago

The problem I'm having right now is that although the build works, the dependency linking phase takes about an hour instead of "just" a few minutes (which was already too long IMO...)

Look at the last line of the logs for the timing data:

$ yarn
➤ YN0000: ┌ Project validation
➤ YN0057: │ @hyperledger/cactus-cmd-socket-server: 'nohoist' is deprecated, please use 'installConfig.hoistingLimits' instead
➤ YN0000: └ Completed
➤ YN0000: ┌ Resolution step
➤ YN0002: │ @angular-builders/custom-webpack@npm:12.1.0 doesn't provide @angular/compiler-cli (pe9f85), requested by @angular-devkit/build-angular
➤ YN0002: │ @angular-builders/custom-webpack@npm:12.1.0 doesn't provide @types/node (p25b75), requested by ts-node
➤ YN0002: │ @angular-builders/custom-webpack@npm:12.1.0 doesn't provide typescript (p19cdd), requested by @angular-devkit/build-angular
➤ YN0002: │ @angular-builders/custom-webpack@npm:12.1.0 doesn't provide typescript (p50e10), requested by ts-node
➤ YN0002: │ @endemolshinegroup/cosmiconfig-typescript-loader@npm:3.0.2 [8cf92] doesn't provide typescript (p5535d), requested by ts-node
➤ YN0002: │ @hyperledger/cactus-example-carbon-accounting-frontend@workspace:examples/cactus-example-carbon-accounting-frontend doesn't provide @angular-devkit/architect (pcaed6), requested by @ionic/angular-toolkit
➤ YN0002: │ @hyperledger/cactus-example-carbon-accounting-frontend@workspace:examples/cactus-example-carbon-accounting-frontend doesn't provide @angular-devkit/schematics (p8d85a), requested by @ionic/angular-toolkit
➤ YN0060: │ @hyperledger/cactus-example-carbon-accounting-frontend@workspace:examples/cactus-example-carbon-accounting-frontend provides rxjs (pc148d) with version 7.3.0, which doesn't satisfy what @ionic-native/core requests
➤ YN0060: │ @hyperledger/cactus-example-carbon-accounting-frontend@workspace:examples/cactus-example-carbon-accounting-frontend provides rxjs (pfe0e5) with version 7.3.0, which doesn't satisfy what @ionic-native/splash-screen requests
➤ YN0060: │ @hyperledger/cactus-example-carbon-accounting-frontend@workspace:examples/cactus-example-carbon-accounting-frontend provides rxjs (p0ff63) with version 7.3.0, which doesn't satisfy what @ionic-native/status-bar requests
➤ YN0002: │ @hyperledger/cactus-example-supply-chain-frontend@workspace:examples/cactus-example-supply-chain-frontend doesn't provide @angular-devkit/architect (pa007a), requested by @ionic/angular-toolkit
➤ YN0002: │ @hyperledger/cactus-example-supply-chain-frontend@workspace:examples/cactus-example-supply-chain-frontend doesn't provide @angular-devkit/schematics (p12956), requested by @ionic/angular-toolkit
➤ YN0060: │ @hyperledger/cactus-example-supply-chain-frontend@workspace:examples/cactus-example-supply-chain-frontend provides rxjs (p8ee71) with version 7.3.0, which doesn't satisfy what @ionic-native/core requests
➤ YN0060: │ @hyperledger/cactus-example-supply-chain-frontend@workspace:examples/cactus-example-supply-chain-frontend provides rxjs (p29437) with version 7.3.0, which doesn't satisfy what @ionic-native/splash-screen requests
➤ YN0060: │ @hyperledger/cactus-example-supply-chain-frontend@workspace:examples/cactus-example-supply-chain-frontend provides rxjs (p64485) with version 7.3.0, which doesn't satisfy what @ionic-native/status-bar requests
➤ YN0002: │ @hyperledger/cactus-test-cmd-api-server@workspace:packages/cactus-test-cmd-api-server doesn't provide @types/express (p681aa), requested by express-jwt-authz
➤ YN0002: │ @hyperledger/cactus-test-cmd-api-server@workspace:packages/cactus-test-cmd-api-server doesn't provide express (paf000), requested by express-jwt-authz
➤ YN0002: │ @ionic/angular-toolkit@npm:4.0.0 [00bbd] doesn't provide webpack (p7a42e), requested by copy-webpack-plugin
➤ YN0002: │ dns-over-http-resolver@npm:1.2.3 doesn't provide node-fetch (p89343), requested by native-fetch
➤ YN0002: │ ws-identity-client@npm:1.0.2 doesn't provide request (p3ccc8), requested by request-promise-native
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 1s 682ms
➤ YN0000: ┌ Fetch step
➤ YN0019: │ npm-packlist-npm-1.4.8-ddca195225-85f764bd0f.zip appears to be unused - removing
➤ YN0019: │ protoc-gen-ts-npm-0.4.0-1333fe4b6f-3a69eaae62.zip appears to be unused - removing
➤ YN0019: │ sjcl-npm-1.0.7-2fbb0e93e4-4eec2df27c.zip appears to be unused - removing
➤ YN0019: │ tar-stream-npm-2.1.4-5f7040c9c5-ba02688aa2.zip appears to be unused - removing
➤ YN0019: │ util-npm-0.10.4-7c577db41a-913f9a90d0.zip appears to be unused - removing
➤ YN0000: └ Completed in 3s 952ms
➤ YN0000: ┌ Link step
➤ YN0062: │ fsevents@patch:fsevents@npm%3A2.3.2#~builtin<compat/fsevents>::version=2.3.2&hash=1cc4b2 The platform linux is incompatible with this module, link skipped.
➤ YN0062: │ fsevents@patch:fsevents@npm%3A2.1.3#~builtin<compat/fsevents>::version=2.1.3&hash=1cc4b2 The platform linux is incompatible with this module, link skipped.
➤ YN0062: │ esbuild-android-arm64@npm:0.13.8 The platform linux is incompatible with this module, link skipped.
➤ YN0062: │ esbuild-darwin-64@npm:0.13.8 The platform linux is incompatible with this module, link skipped.
➤ YN0062: │ esbuild-darwin-arm64@npm:0.13.8 The platform linux is incompatible with this module, link skipped.
➤ YN0062: │ esbuild-freebsd-64@npm:0.13.8 The platform linux is incompatible with this module, link skipped.
➤ YN0062: │ esbuild-freebsd-arm64@npm:0.13.8 The platform linux is incompatible with this module, link skipped.
➤ YN0063: │ esbuild-linux-32@npm:0.13.8 The CPU architecture x64 is incompatible with this module, link skipped.
➤ YN0063: │ esbuild-linux-arm64@npm:0.13.8 The CPU architecture x64 is incompatible with this module, link skipped.
➤ YN0063: │ esbuild-linux-arm@npm:0.13.8 The CPU architecture x64 is incompatible with this module, link skipped.
➤ YN0063: │ esbuild-linux-mips64le@npm:0.13.8 The CPU architecture x64 is incompatible with this module, link skipped.
➤ YN0063: │ esbuild-linux-ppc64le@npm:0.13.8 The CPU architecture x64 is incompatible with this module, link skipped.
➤ YN0062: │ esbuild-netbsd-64@npm:0.13.8 The platform linux is incompatible with this module, link skipped.
➤ YN0062: │ esbuild-openbsd-64@npm:0.13.8 The platform linux is incompatible with this module, link skipped.
➤ YN0062: │ esbuild-sunos-64@npm:0.13.8 The platform linux is incompatible with this module, link skipped.
➤ YN0062: │ esbuild-windows-32@npm:0.13.8 The platform linux is incompatible with this module, link skipped.
➤ YN0062: │ esbuild-windows-64@npm:0.13.8 The platform linux is incompatible with this module, link skipped.
➤ YN0062: │ esbuild-windows-arm64@npm:0.13.8 The platform linux is incompatible with this module, link skipped.
➤ YN0062: │ fsevents@patch:fsevents@npm%3A1.2.13#~builtin<compat/fsevents>::version=1.2.13&hash=1cc4b2 The platform linux is incompatible with this module, link skipped.
➤ YN0007: │ electron@npm:13.3.0 must be built because it never has been before or the last one failed
➤ YN0007: │ grpc-tools@npm:1.11.2 must be built because it never has been before or the last one failed
➤ YN0007: │ secp256k1@npm:4.0.2 must be built because it never has been before or the last one failed
➤ YN0007: │ protobufjs@npm:6.11.2 must be built because it never has been before or the last one failed
➤ YN0007: │ web3-bzz@npm:1.5.2 must be built because it never has been before or the last one failed
➤ YN0007: │ web3-shh@npm:1.5.2 must be built because it never has been before or the last one failed
➤ YN0007: │ pkcs11js@npm:1.2.6 must be built because it never has been before or the last one failed
➤ YN0007: │ cpu-features@npm:0.0.2 must be built because it never has been before or the last one failed
➤ YN0007: │ bufferutil@npm:4.0.5 must be built because it never has been before or the last one failed
➤ YN0007: │ utf-8-validate@npm:5.0.7 must be built because it never has been before or the last one failed
➤ YN0007: │ keccak@npm:3.0.2 must be built because it never has been before or the last one failed
➤ YN0007: │ @nestjs/core@npm:8.2.0 [4e575] must be built because it never has been before or the last one failed
➤ YN0007: │ core-js-pure@npm:3.19.1 must be built because it never has been before or the last one failed
➤ YN0007: │ @angular/cli@npm:12.2.0 must be built because it never has been before or the last one failed
➤ YN0007: │ keccak@npm:1.4.0 must be built because it never has been before or the last one failed
➤ YN0007: │ secp256k1@npm:3.8.0 must be built because it never has been before or the last one failed
➤ YN0007: │ web3-bzz@npm:1.3.5 must be built because it never has been before or the last one failed
➤ YN0007: │ web3-shh@npm:1.3.5 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:2.6.12 must be built because it never has been before or the last one failed
➤ YN0007: │ esbuild@npm:0.12.17 must be built because it never has been before or the last one failed
➤ YN0007: │ core-js@npm:3.16.0 must be built because it never has been before or the last one failed
➤ YN0007: │ esbuild@npm:0.13.8 must be built because it never has been before or the last one failed
➤ YN0007: │ nice-napi@npm:1.0.2 must be built because it never has been before or the last one failed
➤ YN0007: │ iso-constants@npm:0.1.2 must be built because it never has been before or the last one failed
➤ YN0007: │ web3-bzz@npm:1.6.1 must be built because it never has been before or the last one failed
➤ YN0007: │ web3-shh@npm:1.6.1 must be built because it never has been before or the last one failed
➤ YN0007: │ aws-sdk@npm:2.965.0 must be built because it never has been before or the last one failed
➤ YN0007: │ keytar@npm:7.7.0 must be built because it never has been before or the last one failed
➤ YN0007: │ deasync@npm:0.1.24 must be built because it never has been before or the last one failed
➤ YN0007: │ grpc@npm:1.24.11 must be built because it never has been before or the last one failed
➤ YN0007: │ cbor@npm:6.0.1 must be built because it never has been before or the last one failed
➤ YN0007: │ web3@npm:1.2.7 must be built because it never has been before or the last one failed
➤ YN0007: │ @web3-js/websocket@npm:1.0.30 must be built because it never has been before or the last one failed
➤ YN0007: │ @web3-js/scrypt-shim@npm:0.1.0 must be built because it never has been before or the last one failed
➤ YN0007: │ nodemon@npm:2.0.15 must be built because it never has been before or the last one failed
➤ YN0009: │ cpu-features@npm:0.0.2 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-3c1a4bc9/build.log)
➤ YN0009: │ cpu-features@npm:0.0.2 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-bc9e3266/build.log)
➤ YN0009: │ cpu-features@npm:0.0.2 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-faa463e9/build.log)
➤ YN0009: │ cpu-features@npm:0.0.2 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-b2610671/build.log)
➤ YN0007: │ @openapitools/openapi-generator-cli@npm:2.4.14 must be built because it never has been before or the last one failed
➤ YN0007: │ web3@npm:1.5.2 must be built because it never has been before or the last one failed
➤ YN0007: │ ssh2@npm:1.5.0 must be built because it never has been before or the last one failed
➤ YN0007: │ web3@npm:1.3.5 must be built because it never has been before or the last one failed
➤ YN0007: │ web3@npm:1.6.1 must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 48m 3s
➤ YN0000: Done with warnings in 48m 9s
petermetz commented 2 years ago

There are some problems with the CI as well it seems: logs_11870.zip

zondervancalvez commented 1 year ago

@petermetz please assign this to me. thanks!

petermetz commented 1 year ago

@petermetz please assign this to me. thanks!

@zondervancalvez Assigning now, thank you!

petermetz commented 1 year ago

@petermetz please assign this to me. thanks!

@zondervancalvez Please make sure to check the related work on this (I have a branch that has partial resolution for this)

github-actions[bot] commented 1 year ago

This PR/issue depends on: