aboutsummaryrefslogtreecommitdiffstats
path: root/CLAUDE.md
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-07-08 11:25:38 +0200
committerDanilo M. <danix@danix.xyz>2026-07-08 11:25:38 +0200
commitefeeeb045ee8f7d92bc718c40661df0f5fb070c7 (patch)
tree632e789f2d4ac01487c37f4bcdec2a9f41526efb /CLAUDE.md
parent006043e71cf6ee40b69da2e129a095ff4661dfb5 (diff)
downloadmkhintfile-efeeeb045ee8f7d92bc718c40661df0f5fb070c7.tar.gz
mkhintfile-efeeeb045ee8f7d92bc718c40661df0f5fb070c7.zip
fix: version-aware bundled-dep reconcile; release v1.2.1v1.2.1
reconcile_bundle_deps flagged a dep as changed on raw URL-string inequality. Manifests serve bare-tag archive URLs (.../archive/v0.26.7.tar.gz) while hints use the SBo-fetched tree shape (.../archive/v0.26.7/tree-sitter-0.26.7.tar.gz) — same version, different path — so every dep was reported changed at a version that had not moved. Add _url_version to parse and normalize the version from a URL basename, and detect change by version rather than URL string. Only rewrite a line when the version actually differs. Change report now shows "name old-ver -> new-ver". Regression test T-BM17 pins the same-version, different-shape case as no change (180 passed). Bump MKHINT_VERSION and man title to 1.2.1, rebuild mkhint.1.gz. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'CLAUDE.md')
-rw-r--r--CLAUDE.md20
1 files changed, 13 insertions, 7 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
index c245686..77af699 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -155,13 +155,19 @@ When adding new features, add a corresponding test case to `tests/mkhint_test.sh
the upstream deps manifest (`NAME_URL`/`NAME_SHA256` pairs, e.g. neovim's
`cmake.deps/deps.txt`), matches each extra `DOWNLOAD` line via
`match_dep_url` (repo-path first, exact basename-stem fallback for blob
- hosts), and rewrites changed lines + recomputes their md5. Runs
- automatically when the primary changed this run, otherwise only with
- `--force` (check-only flag). `--new` on a listed package prints the reconcile
- report without changing the hint. Manifest deps with no hint line are listed
- as an FYI, never added (would need a SlackBuild change). Helpers:
- `load_bundle_manifests`, `manifest_url_for`, `fetch_manifest`,
- `parse_manifest`, `match_dep_url`, `reconcile_bundle_deps`.
+ hosts). A matched line is rewritten only when its upstream *version* differs
+ (`_url_version` parses the version from each URL basename and normalizes it),
+ not when only the URL path shape differs, so a manifest's bare-tag
+ `archive/v0.26.7.tar.gz` and the hint's SBo-fetched
+ `archive/v0.26.7/tree-sitter-0.26.7.tar.gz` at the same version are treated as
+ current. Changed lines get their md5 recomputed; the report shows
+ `name old-ver -> new-ver`. Runs automatically when the primary changed this
+ run, otherwise only with `--force` (check-only flag). `--new` on a listed
+ package prints the reconcile report without changing the hint. Manifest deps
+ with no hint line are listed as an FYI, never added (would need a SlackBuild
+ change). Helpers: `load_bundle_manifests`, `manifest_url_for`,
+ `fetch_manifest`, `parse_manifest`, `match_dep_url`, `_url_version`,
+ `reconcile_bundle_deps`.
- `--delete` / `-d`: removes hint file and `.bak` if present. Accepts multiple package names. Exits 2 on first missing file.
- Downloads go to `/tmp/mkhint/download` (single shared temp file, deleted after md5 calculation).
- Multiline `DOWNLOAD`/`DOWNLOAD_x86_64`: parsed via `parse_multiline_var` (awk). First URL always re-downloaded. Continuation URLs (2+) prompt user interactively — changed URLs re-downloaded, unchanged URLs keep existing md5. Written back via `perl -i` with `\` continuation format preserved. Shared logic in `update_checksums` → `_process_download_var`.