microsoft / microsoft/lage

Running transitive dependencies in parallel

Open
#177 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
816
Forks
88
PR merge metrics
No merged PRs in 30d

Description

Hey all, I've been looking at adopting lage for a project and was wondering how to support a specific scenario:

Let's say I'm in a typescript monorepo using esbuild for per-package transpilation. Each package has a transpile task that does a source-only transformation with esbuild, and a separate typecheck task that runs tsc with --noEmit. App packages have a bundle task that consume the output of transpile and produce an app bundle.

If I want to bundle some app in my monorepo, then I would want to first typecheck and transpile that package and all its dependencies.

  • The typechecking would have to happen in topological order (e.g. "typecheck": [ "^typecheck" ] in my lage.config.js)
  • the transpile task for the app package and its transitive dependencies could all happen in parallel, since a source-only transformation has no dependencies.
  • The bundle task would depend on all the builds from the app package and its transitive dependencies

Is there a way to make bundle depend on all the transpile tasks in all transitive dependencies of my app, while still allowing all the transpile tasks to be run in parallel? I went through the docs and didn't see anything showing how, but I might have missed it.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the lage.config.js task dependency syntax and the existing documentation on transitive dependencies. Reproduce the described TypeScript monorepo scenario with transpile, typecheck, and bundle tasks, then determine how the dependency graph should express parallel transpilation and the final bundle prerequisite. Done means the requested scheduling behavior is documented or supported and verified for this scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.