Skip to content

Commit

Permalink
Parallelized analyze (#36)
Browse files Browse the repository at this point in the history
* parallelize analyze

* version bump
  • Loading branch information
pnordahl authored Nov 23, 2024
1 parent 85f8984 commit 014fe8f
Show file tree
Hide file tree
Showing 7 changed files with 229 additions and 266 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ jobs:
git config --global user.name "FIRST_NAME LAST_NAME"
git config --global user.email "[email protected]"
- run: cargo clippy --locked -- -D warnings
- run: cargo build --locked --verbose --all
- run: cargo build --locked
- run: cargo test --locked -- --nocapture
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## [3.5.6] - 2024-11-23

### Changed
- (internal) Parallelized analyze

## [3.5.5] - 2024-11-21

### Added
Expand Down
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ description = "A tool for effective polyglot, multi-project monorepo development
license = "MIT"
homepage = "https://github.com/pnordahl/monorail"
repository = "https://github.com/pnordahl/monorail"
version = "3.5.5"
version = "3.5.6"
authors = ["Patrick Nordahl <[email protected]>"]
edition = "2021"
keywords = ["monorail", "monorepo", "build", "cli", "build-tool"]
keywords = ["monorail", "monorepo", "build", "cli", "build-tool", "development-orchestrator"]
resolver = "2"

[dependencies]
Expand All @@ -24,6 +24,7 @@ tracing = { version = "0.1.40", features = ["attributes"] }
tracing-subscriber = { version = "0.3.18", features = ["time", "fmt", "std", "registry", "json", "env-filter"] }
once_cell = "1.20.2"
chrono = { version = "0.4.38", default-features = false, features = ["alloc", "now", "std"] }
rayon = "1.10.0"

[dev-dependencies]
tempfile = "3.13"
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ At this time, Windows is unsupported. However, there are no technical limitation

## Overview

`monorail` blends features of build systems like `bazel` and `buck` with the simplicity and flexibility of command runners like `make` and `just` to create a lightweight monorepo development system. It combines a graph representation of your repository with incremental change tracking, enabling guided and efficient parallel execution across any subset of your monorepo.
`monorail` is a tool best classified as a "development orchestrator". It is designed to be generic and minimally opinionated, allowing you to flexibly define the components of your repository in virtually any way. Similarly, it makes no requirements about the tooling you use; shell scripts, interpreters, compilers, or even a large monorepo build system such as `bazel` are equally supported. At its core, `monorail` is a means of fine-tuning how and when your preferred tools are invoked, making it an effective abstraction for building efficient parallelized workflows for development and CI/CD.

`monorail` is internally driven by two things:
`monorail` is internally driven by three things:

1. A graph representation of your repository, built from a list of `target` entries and each target's `uses` list.
2. A change detection provider, which provides a view of changes in the repository
3. A scheduler and parallel execution engine for user-defined executables

Changes are mapped to affected targets, and a graph traversal powers various dependency-related tasks such as target grouping for parallel execution, "depended upon by" analysis, and so forth.

Expand All @@ -40,7 +41,7 @@ Monorail has a small lexicon:
* `target`: a unique container that can be referenced by change detection and command execution
* `uses`: a set of paths that a target depends upon
* `ignores`: a set of paths that should not affect a target during change detection
* `command`: executable code written in any language and invoked per target
* `command`: executable code written in any language
* `sequence`: a named list of commands

See the [Tutorial](./TUTORIAL.md) for a practical walkthrough of using `monorail` to build a toy monorepo, or [Monorail Example Repo](https://github.com/pnordahl/monorail-example) for a pre-built example.
Expand Down
Loading

0 comments on commit 014fe8f

Please sign in to comment.