Skip to content

refactor: split monorepo.rs and versioning.rs into focused submodules - #449

Merged
BryanFRD merged 1 commit into
mainfrom
refactor/monorepo-split-into-modules
May 18, 2026
Merged

BryanFRD merged 1 commit into
mainfrom
refactor/monorepo-split-into-modules

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Why

Two more monoliths trimmed down following #447 (config) and #448 (git):

File Before After
src/monorepo.rs 1792 LOC, single file src/monorepo/ — 8 files, biggest is run.rs (1125 LOC, isolates the run_release_logic pipeline)
src/versioning.rs 861 LOC src/versioning/ — 4 files

monorepo split

File LOC Contents
mod.rs 12 Re-exports check and release
check.rs ~42 The check entry point
release.rs ~124 release, cleanup_failed_release_attempt, MAX_RELEASE_REGENERATE_ATTEMPTS
run.rs ~1125 run_release_logic — the core pipeline both check and release call
preview.rs ~90 Preview-comment posting (PR/MR forge integration)
util.rs ~97 tags_for_package, pick_higher_semver, collect_dirty_files, auto_stage_new_files, is_package_touched
types.rs ~23 CheckCommit, CheckPackage, CheckResult
tests.rs ~195 Tests

versioning split

File LOC Contents
mod.rs ~58 Top-level entry points: bootstrap_version, compute_next_version, bump_version, truncate_version
strategies.rs ~98 Per-strategy bumpers: bump_semver, calver_version, calver_seq_version, bump_sequential, bump_zerover
detect.rs ~107 Tag classification: strip_tag_prefix, TagClass, classify_tag, detect_strategy_from_tags
tests.rs ~526 Tests

Compat

All external imports unchanged (use crate::monorepo::*, use crate::versioning::* keep working via re-exports).

Verification

  • cargo test --bin ferrflow → 598 passed
  • cargo clippy --workspace --all-targets -- -D warnings → clean
  • cargo fmt --check → clean

Conflict

refactor/git-split-into-modules (#448) and fix/push-tags-shell-out-libgit2-revwalk-bug may need to be rebased on top of this. Suggested order: merge those two first if possible, then rebase this.

Copilot AI review requested due to automatic review settings May 18, 2026 18:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@BryanFRD
BryanFRD merged commit 20b189a into main May 18, 2026
24 of 25 checks passed
@BryanFRD
BryanFRD deleted the refactor/monorepo-split-into-modules branch May 18, 2026 18:21

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Details
Benchmark suite Current: e5c5e51 Previous: 0b5fe57 Ratio
git_find_tag/100 1355511 ns/iter (± 38746)
git_find_tag/1000 13933470 ns/iter (± 208995)

This comment was automatically generated by workflow using github-action-benchmark.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants