Skip to content

Conversation

@nyurik
Copy link
Member

@nyurik nyurik commented Jan 13, 2026

NOTES:

  • this PR should produce identical generated code - hence no changes to the test snapshots
  • MSRV was failing due to typed-builder 0.23.2 requiring newer Rust, and had to be bumped to 1.88
  • enable Release-plz to help automate release process

AI:

This pull request introduces several improvements and refactorings across CI configuration, the build system, and the code generation logic. The most significant changes are a major overhaul of the GitHub Actions CI workflow for better modularity and coverage, enhancements to the justfile build automation, and a consistent refactoring of code generation functions to use mutable references for writers. Additionally, a new configuration file for release automation is added, and a minor license list update is made.

CI/CD and Build System Improvements:

  • The .github/workflows/ci.yml workflow is completely restructured: jobs are modularized into test, test-msrv, coverage, and release-plz, with improved caching, MSRV (Minimum Supported Rust Version) checks, and automated publishing/PR creation for releases. The workflow now uses just for build orchestration and adds a job to ensure embedded target builds.
  • The justfile is enhanced: a new build-thumbv7em-none-eabihf recipe is added for embedded builds, and the main ci-test and ci-test-msrv recipes now invoke this target. A helper for conditional Rust target installation is introduced, and the code generation snapshot recipe is improved to clear old snapshots before regenerating. [1] [2] [3] [4]

Code Generation Refactoring:

  • All code generation functions in src/lib.rs are refactored to accept &mut impl Write instead of taking ownership of the writer, ensuring consistency and efficiency. Associated call sites and adapter usages are updated accordingly. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]

Release Automation:

  • A new release-plz.toml file is added to configure release automation, enabling workspace dependency updates and standardized git tag naming.

Other Minor Changes:

  • The license allow-list in deny.toml is updated to remove Unicode-DFS-2016.

These changes collectively improve the project's maintainability, CI reliability, and code generation consistency.

@codecov
Copy link

codecov bot commented Jan 13, 2026

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors code generation functions to consistently use mutable references for writers, modernizes the CI workflow with improved modularity and MSRV checking, and adds release automation.

Changes:

  • Refactored all code generation functions in src/lib.rs to accept &mut impl Write instead of taking ownership, improving consistency and efficiency
  • Completely restructured GitHub Actions CI workflow with separate jobs for testing, MSRV validation, code coverage, and automated release management via release-plz
  • Enhanced justfile with new embedded target build recipes and improved MSRV testing workflow
  • Simplified pattern matching in src/pad.rs from match to if let for better readability

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/lib.rs Refactored ~20 functions to use &mut impl Write parameters instead of owned writers; extracted variables in writeln! calls for readability; added trailing commas for consistency
src/pad.rs Simplified match expression to if-let pattern for newline position detection
.github/workflows/ci.yml Complete restructure: modularized into separate jobs (test, test-msrv, coverage, release-plz) with improved caching and automated publishing
justfile Added build-thumbv7em-none-eabihf and rustup-add-target recipes; updated ci-test and ci-test-msrv to include embedded builds; improved bless-generate to clear old snapshots
release-plz.toml New configuration file for automated release management with workspace dependency updates
deny.toml Removed Unicode-DFS-2016 from license allow-list
Cargo.lock.msrv New MSRV lockfile added for testing minimum supported Rust version
Cargo.lock Minor dependency update (clap_lex 0.7.6 → 0.7.7)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant