Skip to content
This repository was archived by the owner on Oct 9, 2026. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .aiderignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
vendored_parsers/
crates/diffr-core/vendored_parsers/
sample_files/
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# diffr is implemented in Rust; keep GitHub's language stats honest.
sample_files/** linguist-vendored
vendored_parsers/** linguist-vendored
crates/diffr-core/vendored_parsers/** linguist-vendored
37 changes: 31 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1.85.0
uses: dtolnay/rust-toolchain@1.99.0
with:
targets: ${{ matrix.job.target }}

Expand All @@ -57,21 +57,46 @@
steps:
# v4.2.2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: dtolnay/rust-toolchain@1.85.0
- uses: dtolnay/rust-toolchain@1.99.0
with:
# The tests build every bundled plugin as a component.
targets: wasm32-wasip2
# Component loading is host behaviour, so it is tested once, natively,
# rather than on every target the matrix above cross-compiles for.
- run: cargo xtask test-plugins

build_core_wasm:
name: Build diffr-core for wasm32-unknown-unknown
runs-on: ubuntu-22.04
steps:
# v4.2.2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: dtolnay/rust-toolchain@1.99.0
with:
# The engine must keep building for the browser target; the
# grammars' archives need llvm-ar.
targets: wasm32-unknown-unknown
components: llvm-tools
# The engine and the diff session are one code path on every target:
# only loading a grammar differs in the browser. What a target lacks
# (git, threads, Wasmtime, a clock) comes from the caller instead.
- name: Check that only the grammar loader is gated by target
run: |
gated=$(git grep -l target_family -- crates/diffr-core/src ':!crates/diffr-core/src/parse/tree_sitter_parser.rs' || true)
if [ -n "$gated" ]; then
echo "target_family gates outside parse/tree_sitter_parser.rs:"
echo "$gated"
exit 1
fi
- run: cargo xtask build-core-wasm

test_mime_db:

Check warning on line 93 in .github/workflows/test.yml

View check run for this annotation

GitHub Advanced Security / CodeQL

Workflow does not contain permissions

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {{contents: read}}
name: Test with MIME database
runs-on: ubuntu-22.04
steps:
# v4.2.2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: dtolnay/rust-toolchain@1.85.0
- uses: dtolnay/rust-toolchain@1.99.0
# This runs tests that rely on the MIME database being present.
- run: cargo test -- --ignored

Expand All @@ -90,7 +115,7 @@
steps:
# v4.2.2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: dtolnay/rust-toolchain@1.85.0
- uses: dtolnay/rust-toolchain@1.99.0
- run: cargo fmt --all -- --check

actionlint:
Expand Down Expand Up @@ -129,9 +154,9 @@
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.10
- uses: dtolnay/rust-toolchain@1.85.0
- uses: dtolnay/rust-toolchain@1.99.0
- run: cargo build --locked
- run: cargo test --locked --features all-languages --bin diffr --test cli
- run: cargo test --locked --features all-languages --lib --bin diffr --test cli
- working-directory: diffr-ts
run: |
bun install --frozen-lockfile
Expand Down
4 changes: 2 additions & 2 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[files]
extend-exclude = [
"vendored_parsers/", "sample_files/",
"src/tags/linguist/",
"crates/diffr-core/vendored_parsers/", "sample_files/",
"crates/diffr-core/src/tags/linguist/",
"demo_files/",
# Git index lines carry blob hashes that can spell words.
"examples/review/real/*/change.patch",
Expand Down
Loading
Loading