Giter VIP home page Giter VIP logo

Comments (4)

kristovatlas avatar kristovatlas commented on July 21, 2024

Same issue for the other 2 sub-repos.

After talking with @schnogz, there's no obvious quick fix.

Although we use yarn to build, we're not using its locking system. yarn bootstrap calls lerna to run the installs, using npm in turn. Therefore, the top-level package-lock.json file will be respected, but it doesn't appear that it will be applied to the 3 sub-repos with their own package.json files.

Resolution: There may be a way in lerna to generate the child lock files. The dev team is also considering getting rid of lerna and using npm's workspaces functionality, which should simply the package locking situation.

from blockchain-wallet-v4-frontend.

tony-blockchain avatar tony-blockchain commented on July 21, 2024
  1. We have to switch to yarn workspaces, which improves build time, by saving time downloading common modules
  2. I'd migrate to yarn.lock and using yarn as installer, as in my experience it proved to be much more stable and well designed. Npm has changed their lock behaviour twice already:
  • First time they've built from package-lock
  • Then(npm v5) they started updating package-lock during install (wth?)
  • Now they introduced npm ci which builds from package-lock

UPDATE: just testsed:

  1. Current bootstrap job takes about 67 seconds on each install
  2. yarn install with workspaces takes about 88 seconds on first install and then 30 second on consecutive installs

with npm

cross-env npm ci && lerna bootstrap --hoist --ignore-scripts

✨  Done in 67.61s.
yarn bootstrap  72.94s user 46.03s system 175% cpu 1:07.95 total

with yarn

yarn install

First time

✨  Done in 88.46s.
yarn install  43.84s user 43.27s system 98% cpu 1:28.82 total

Second time

✨  Done in 30.12s.
yarn install  35.03s user 37.21s system 236% cpu 30.499 total

from blockchain-wallet-v4-frontend.

tony-blockchain avatar tony-blockchain commented on July 21, 2024

Here's the original workspaces issue related to child yarn.locks
yarnpkg/yarn#5428

First comment cites yarn blog to explain that while using package separately through npm yarn.lock/package-lock.json is irrelevant because the package is already built.
And build is still performed in monorepo.

BTW there are only 6 dependencies in the whole project that are not shared.

from blockchain-wallet-v4-frontend.

schnogz avatar schnogz commented on July 21, 2024

We have now completely migrated off of Lerna and into Yarn workspaces. As @tony-blockchain pointed out above, the yarn.lock file in the root of the repo will lock dependencies for all sub-packages.

Marking closed.

from blockchain-wallet-v4-frontend.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.