From 79e4425a07ed3b57199eefb65b525485448c31f5 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 7 Jul 2026 19:27:47 +0200 Subject: feat: --hintfile -V reconciles bundled deps for listed packages Parity with --check: the update path runs Phase 2 (report + apply) after the primary bump. Co-Authored-By: Claude Opus 4.8 --- mkhint | 19 +++++++++++++++++++ tests/mkhint_test.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/mkhint b/mkhint index c0ae79a..f1e9131 100755 --- a/mkhint +++ b/mkhint @@ -1446,6 +1446,25 @@ main() { if [[ "${check_nvchecker_take:-0}" -eq 1 ]]; then nvtake -c "$NVCHECKER_CONFIG" "$HINT_FILE" >&2 || true fi + + load_bundle_manifests + local _bm_pkg="${HINT_FILE%.hint}" + _bm_pkg="${_bm_pkg##*/}" + if pkg_has_manifest "$_bm_pkg"; then + local _bm_hint="${HINT_DIR%/}/${_bm_pkg}.hint" + local _bm_cur; _bm_cur=$(grep '^VERSION=' "$_bm_hint" | sed 's/VERSION="//;s/"$//') + local _bm_url; _bm_url=$(manifest_url_for "$_bm_pkg" "$_bm_cur") + echo "" + echo "Bundled-dep reconcile: $_bm_pkg (manifest @ $_bm_cur)" + reconcile_bundle_deps "$_bm_pkg" "$_bm_hint" "$_bm_url" report || true + local _bm_ans + read -r -p "Apply bundled-dep updates for $_bm_pkg? [Y/n] " _bm_ans + _bm_ans="${_bm_ans:-Y}" + if [[ "$_bm_ans" =~ ^[Yy]$ ]]; then + reconcile_bundle_deps "$_bm_pkg" "$_bm_hint" "$_bm_url" apply || true + fi + fi + prompt_slackrepo "$HINT_FILE" ;; new) diff --git a/tests/mkhint_test.sh b/tests/mkhint_test.sh index 8e1eed4..a684fe7 100755 --- a/tests/mkhint_test.sh +++ b/tests/mkhint_test.sh @@ -1747,6 +1747,36 @@ echo "$out" | grep -q 'deps not in hint:' && echo "$out" | grep -qi 'wasmtime' \ || { echo " FAIL: FYI. out=$out"; (( FAIL++ )); ERRORS+=("T-BM16"); } rm -f "$MOCK_BASE/manifest_fixture" "$MOCK_BASE/bundle-manifests" "$MOCK_HINT/bmnvim.hint" +# ── T-BM18: --hintfile -V on a listed pkg reconciles bundled deps ──────────── +echo "" +echo "T-BM18: -f listed pkg -V bumps primary AND reconciles bundled deps" +cat > "$MOCK_BASE/bundle-manifests" << 'EOF' +bmnvim https://example.com/bmnvim/v{VERSION}/deps.txt +EOF +cat > "$MOCK_BASE/manifest_fixture" << 'EOF' +NVIM_URL https://github.com/neovim/neovim/archive/v0.14.0.tar.gz +NVIM_SHA256 a +TREESITTER_URL https://github.com/tree-sitter/tree-sitter/archive/v0.26.8.tar.gz +TREESITTER_SHA256 b +EOF +cat > "$MOCK_HINT/bmnvim.hint" << 'EOF' +VERSION="0.13.0" +DOWNLOAD="https://github.com/neovim/neovim/archive/v0.13.0/bmnvim-0.13.0.tar.gz \ + https://github.com/tree-sitter/tree-sitter/archive/v0.26.7/tree-sitter-0.26.7.tar.gz" +MD5SUM="aaa \ + bbb" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +ARCH="x86_64" +EOF +# stdin: continuation-URL prompt(s) for the primary bump, then apply Y, then slackrepo n +run_mkhint -f bmnvim -V 0.14.0 < <(printf '\nY\nn\n') >/dev/null 2>&1 || true +grep -q 'VERSION="0.14.0"' "$MOCK_HINT/bmnvim.hint" \ + && grep -q 'tree-sitter/archive/v0.26.8' "$MOCK_HINT/bmnvim.hint" \ + && { echo " PASS: -f -V bumped primary + reconciled deps"; (( PASS++ )); } \ + || { echo " FAIL: -f -V parity:"; cat "$MOCK_HINT/bmnvim.hint"; (( FAIL++ )); ERRORS+=("T-BM18"); } +rm -f "$MOCK_BASE/manifest_fixture" "$MOCK_BASE/bundle-manifests" "$MOCK_HINT/bmnvim.hint" + # ─── SUMMARY ────────────────────────────────────────────────────────────────── teardown -- cgit v1.2.3