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

Experiment: Replace lerna/fluid-build with pnpm and lage #4593

Closed
wants to merge 25 commits into from

Conversation

tylerbutler
Copy link
Member

@tylerbutler tylerbutler commented Dec 14, 2020

This draft PR is an experiment of replacing our custom fluid-build tool and lerna with pnpm workspaces and lage.

I do not intend to check this in; I am sharing it in case anyone else is investigating speeding up our build system.

Goals of the experiment:

  • Speed up installation/bootstrapping of a new Fluid repo clone.
  • Speed up experimentation with new packages or mass package upgrades (no lengthy lerna bootstrap step to change deps).
  • Save disk space when using multiple Fluid repo clones.
  • Determine what, if anything, doesn't work in this setup.

How to try it

  1. Install pnpm globally: npm i -g pnpm.
  2. Run pnpm install.
  3. Use pnpm run lage -- build to run a build using lage.
  4. You can also bypass lage and use pnpm to build directly using pnpm run tsc.

Note that the build will fail. Likely with an error like this:

ERR! Running C:\Program Files\nodejs\pnpm.CMD run tsc
ERR! > @fluidframework/odsp-driver@0.31.0 tsc E:\code\FluidFramework3\packages\drivers\odsp-driver
ERR! > tsc
ERR! src/test/mockFetch.ts(25,23): error TS2345: Argument of type 'Promise<{ ok: boolean; status: number; text: () => Promise<string>; headers: Headers; }>' is not assignable to parameter of type 'Promise<Response>'.
ERR!   Type '{ ok: boolean; status: number; text: () => Promise<string>; headers: Headers; }' is missing the following properties from type 'Response': clone, redirected, statusText, type, and 10 more.

That's the current state. I may work on it some more but feel free to take it and run if you're interested.

@tylerbutler
Copy link
Member Author

@christiango I noticed you're a contributor to lage so you might be interested in this.

@christiango
Copy link
Member

Thanks for the heads up! Some teams at Microsoft have recently moved from PNPM to Yarn, so it may be worth getting plugged into those conversations to get the full context. Office Online did this recently.

That being said, lage should be a choice independent of your package manager choice.

@SamBroner
Copy link
Contributor

Very neat. What kind of perf improvements do you see?

@tylerbutler
Copy link
Member Author

Thanks for the heads up! Some teams at Microsoft have recently moved from PNPM to Yarn, so it may be worth getting plugged into those conversations to get the full context. Office Online did this recently.

That being said, lage should be a choice independent of your package manager choice.

See PR #4804 for the yarn side of the experiment. Let's move most of the discussion there regarding comparing the two options.

Very neat. What kind of perf improvements do you see?

I haven't done formal tests yet but it feels much faster, especially when updating dependencies or installing multiple clones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Build related issues area: tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants