Add diff applying error & improve CI #32

Merged
schmelczer merged 12 commits from asch/diff-error into main 2025-12-06 21:54:08 +00:00
schmelczer commented 2025-12-06 11:53:39 +00:00 (Migrated from github.com)

An invalid diff, such as one with a too long "equal" would be applied without trouble. This is misleading behaviour, so this PR adds a DiffError type to account for these cases.

Additionally:

  • This PR renames IntegerOrString to IntegerOrText
  • Automatically installs cargo deps in the scripts, rather then instructing devs through the README
  • Cleans up CI so that it uses the dev scripts
An invalid diff, such as one with a too long "equal" would be applied without trouble. This is misleading behaviour, so this PR adds a `DiffError` type to account for these cases. Additionally: - This PR renames `IntegerOrString` to `IntegerOrText` - Automatically installs cargo deps in the scripts, rather then instructing devs through the README - Cleans up CI so that it uses the dev scripts
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-12-06 11:53:58 +00:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull request overview

This PR enhances error handling by introducing a DiffError type to catch invalid diffs that were previously applied without warning. The PR also improves developer experience by automating dependency installation in scripts and streamlining the CI pipeline.

Key Changes:

  • Adds DiffError type with thiserror dependency for better error handling
  • Renames IntegerOrString to IntegerOrText with additional From trait implementations
  • Automates cargo tool installation in development scripts

Reviewed changes

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

Show a summary per file
File Description
src/types/number_or_string.rs Adds From trait implementations for various types and reformats error handling code
scripts/test.sh Adds automatic installation of cargo-insta and wasm-pack, adds Node.js version check, changes npm install to npm ci
scripts/lint.sh Adds automatic installation of cargo-machete and runs it
scripts/bump-version.sh Adds automatic installation of cargo-edit and wasm-pack
scripts/build-website.sh Adds automatic installation of wasm-pack
README.md Removes manual cargo tool installation instructions
Cargo.toml Adds thiserror dependency
.github/workflows/check.yml Simplifies CI by using development scripts instead of duplicating commands

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

## Pull request overview This PR enhances error handling by introducing a `DiffError` type to catch invalid diffs that were previously applied without warning. The PR also improves developer experience by automating dependency installation in scripts and streamlining the CI pipeline. **Key Changes:** - Adds `DiffError` type with `thiserror` dependency for better error handling - Renames `IntegerOrString` to `IntegerOrText` with additional `From` trait implementations - Automates cargo tool installation in development scripts ### Reviewed changes Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment. <details> <summary>Show a summary per file</summary> | File | Description | | ---- | ----------- | | src/types/number_or_string.rs | Adds `From` trait implementations for various types and reformats error handling code | | scripts/test.sh | Adds automatic installation of cargo-insta and wasm-pack, adds Node.js version check, changes npm install to npm ci | | scripts/lint.sh | Adds automatic installation of cargo-machete and runs it | | scripts/bump-version.sh | Adds automatic installation of cargo-edit and wasm-pack | | scripts/build-website.sh | Adds automatic installation of wasm-pack | | README.md | Removes manual cargo tool installation instructions | | Cargo.toml | Adds thiserror dependency | | .github/workflows/check.yml | Simplifies CI by using development scripts instead of duplicating commands | </details> --- 💡 <a href="/schmelczer/reconcile/new/main/.github/instructions?filename=*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
@ -2,7 +2,9 @@
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-12-06 11:53:58 +00:00

Extra space after 'which' should be removed.

which wasm-pack || cargo install wasm-pack
Extra space after 'which' should be removed. ```suggestion which wasm-pack || cargo install wasm-pack ```
Sign in to join this conversation.
No description provided.