Skip to content

feat(install): canonical root install.hexa — hx install pins latest release tag#16

Merged
dancinlife merged 1 commit into
mainfrom
feat/install-hexa-tag-pin
May 31, 2026
Merged

feat(install): canonical root install.hexa — hx install pins latest release tag#16
dancinlife merged 1 commit into
mainfrom
feat/install-hexa-tag-pin

Conversation

@dancinlife

Copy link
Copy Markdown
Contributor

What

Adds a canonical root install.hexa so hx install wilson pins to the latest release tag, matching every other package in this family (void / airgenome / sidecar each ship a root install.hexa headed "Invoked by hx install <pkg>").

How

TAG-PIN self-update (bootstrap-safe) — same precedence/idioms as void:

  • gated by WILSON_NO_SELF_UPDATE=1 + git-presence (have("git") + .git dir)
  • fetch --tags → dirty tree? git stash → checkout default branch (dynamically detected via origin/HEAD) → reset --hard origin/<defb> → detach latest v* tag
  • END block restores the default branch so the next run's self-update logic runs again

Install — faithful to wilson's model (no forced compile):

  • the default path is the INTERPRETER (hexa run core/main.hexa); it needs no compile and works the moment hx symlinks bin/wilson onto PATH
  • build/<host>/wilson is gitignored + per-host + opt-in (wilson build) and can hard-fail on hosts whose toolchain can't link — so this hook does NOT compile
  • it only ensures bin/wilson (+ bin/ws) is executable and prints that the native build is the optional, explicit wilson build
  • hx auto-symlinks bin/wilson per its detect_entry registry

Validation

  • hexa parse install.hexa → OK (parses cleanly)
  • DRY git-logic rehearsal in a --no-hardlinks throwaway clone: detach to v1.0.0 → restore to main, exit 0

🤖 Generated with Claude Code

이 패밀리의 모든 패키지가 루트 install.hexa 를 갖도록, wilson 에도
`hx install wilson` 이 호출하는 canonical 루트 install.hexa 를 추가한다.

- TAG-PIN self-update (bootstrap-safe): WILSON_NO_SELF_UPDATE=1 + git 존재
  여부로 게이트. fetch --tags → dirty면 stash → 기본 브랜치 checkout →
  reset --hard → 최신 v* 태그 detach. void 와 동일한 우선순위/관용구
  (env/exec/exec_with_status/path_exists/run_or_die).
- 실제 설치는 wilson 모델에 충실: 컴파일을 강제하지 않는다. build/<host>/wilson
  은 gitignore + per-host + opt-in 이고 일부 Linux 호스트에서 링크 실패할 수
  있다. 기본 경로는 인터프리터 `hexa run core/main.hexa` 이므로, bin/wilson(+ws)
  실행 권한만 보장하고, 네이티브 빌드는 선택적 `wilson build` 임을 안내한다.
- 종료 시 RESTORE: detach(핀한 태그) → 기본 브랜치 복원으로 다음 실행에서도
  self-update 로직이 다시 돈다.

검증: `hexa parse install.hexa` 통과. --no-hardlinks 드라이 클론에서 v1.0.0
detach→main 복원 리허설 exit 0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dancinlife dancinlife merged commit 206d6f2 into main May 31, 2026
@dancinlife dancinlife deleted the feat/install-hexa-tag-pin branch May 31, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant