AtlatestRepositorysigil-lsp
1
#!/usr/bin/env bash2
set -euo pipefail3
repo_root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)4
cd "$repo_root"5
monorepo_source=${SIGIL_MONOREPO_SOURCE:?set SIGIL_MONOREPO_SOURCE to the P2 Sigil checkout}6
[[ -f "$monorepo_source/packages/sigil-help/package.sgl" ]] || {7
printf 'FAIL: P2 monorepo does not provide sigil-help\n' >&2; exit 1; }8
rg -q -F 'url: "codeberg:sigil/sigil" package: "sigil-help"' package.sgl9
rg -q -F '(search-docs "_sigil_lsp_warmup_")' src/sigil/lsp/server.sgl || {10
printf 'FAIL: LSP initialized notification no longer warms the help index\n' >&2; exit 1; }11
if rg -n '\(sigil docs([[:space:]]|\))|sigil-docs' src test README.md package.sgl sigil.lock \12
-g '!gate-h2-help-migration.sh' -g '!**/transcripts/**'; then13
printf 'FAIL: active LSP consumer still names old help package/namespace\n' >&2; exit 114
fi15
sigil build --no-cache16
sigil test --report17
printf 'PASS: LSP hover/completion/definition resolve monorepo sigil-help metadata\n'