Commit Graph

6 Commits

Author SHA1 Message Date
apk 3aee6c4c58 fix(ci): install clippy/rustfmt for pinned 1.97.1 toolchain
Pinning rust-toolchain.toml to 1.97.1 made rustup auto-install a bare
1.97.1 toolchain in CI instead of using the dtolnay-installed 1.97 one
that carried clippy and rustfmt, failing the Clippy step. Declare the
components in the toolchain file so any auto-install includes them, and
align the workflow toolchain pins to 1.97.1 so CI installs the exact
toolchain cargo resolves.

Claude-Session: https://claude.ai/code/session_01VvWzWfEK6oV4HTe6EoGkff
2026-08-29 13:34:21 +02:00
apk 4ea344b124 fix(nix): pin Rust toolchain to 1.97.1 and refresh manifest hash
The flake pinned the sha256 of channel-rust-1.97.toml, a mutable file
that static.rust-lang.org rewrites on every 1.97.x patch release; the
1.97.1 release changed it and broke nix build with a fixed-output hash
mismatch. Pin the exact patch version so fenix fetches the immutable
channel-rust-1.97.1.toml, and update the hash to match.

Fixes #976

Claude-Session: https://claude.ai/code/session_01VvWzWfEK6oV4HTe6EoGkff
2026-08-29 13:31:31 +02:00
apk 35d287e9f4 chore(rust): bump toolchain to 1.97, fix new clippy lints 2026-08-15 20:52:56 +02:00
apk cd6b089a2d chore: upgrade Rust toolchain to 1.93
oxc crates >=0.133 require rustc 1.93. Pin rust-toolchain.toml and all
CI workflows accordingly.
2026-06-06 19:56:28 +02:00
apk ce978b6228 fix(ci): pin rust-toolchain.toml to 1.87
The rust-toolchain.toml specified channel = "stable", which caused
cargo to use the stable toolchain instead of 1.87. Cross-compilation
targets were being added to 1.87 but cargo switched to stable (via
rust-toolchain.toml), which didn't have them installed.
2026-06-06 19:51:47 +02:00
apk 0ddf611482 feat(rust): add Rust V1 cpd workspace — 5-crate Cargo implementation
Complete Rust V1 of the jscpd copy-paste detector as a 5-crate Cargo
workspace named `cpd` under rust/ in the jscpd monorepo.

Crates:
- cpd-core: data models, rolling-hash engine (Rabin-Karp/xxh3),
  sliding-window detect() with maximal-clone suppression
- cpd-tokenizer: 282-format registry, OXC JS/TS/JSX/TSX tokenizer,
  generic scanner for 218+ formats, SFC extractor (Vue/Svelte/Astro),
  Markdown tokenizer, mode filter (mild/weak/strict)
- cpd-finder: file walker (ignore crate), parallel tokenisation (rayon),
  orchestration pipeline, git-blame stub (gix), skip-local filter,
  statistics computation
- cpd-reporter: 11 reporters — console (jscpd-format table), console-full
  (verbose + source snippets), json, sarif, xml, csv, html (askama),
  markdown, badge (SVG), xcode, threshold, silent
- cpd: CLI binary (clap, 34 flags), .jscpd.json / package.json config
  layering

Key fixes in this session:
- Wire real ConsoleReporter in factory (was using stub)
- Add markdown + badge reporters to factory
- console.rs: per-clone format matching jscpd (bold-green paths, dim
  borders, red headers, bold Total:, dim Found N clones.)
- console_full.rs: verbose format with source snippets (20-line limit,
  line-number gutter, blame inline)
- detect.rs: suppress_subclones() filter removes sub-window clones,
  reducing count from 6274 to 290 vs jscpd 190 (from 33x to 1.5x)

CI: .github/workflows/rust.yml with tokenizer-purity check + fuzz smoke
Fuzz: standalone rust/fuzz/ workspace (cargo-fuzz, libfuzzer)
Tests: 160 passing across 13 test suites

MSRV: 1.87 / Edition 2024 / publish = false
2026-06-04 08:15:32 +02:00