Skip to content

Semantics dev tooling#5

Open
RaoulSchaffranek wants to merge 4 commits into
mainfrom
semantics-dev-tooling
Open

Semantics dev tooling#5
RaoulSchaffranek wants to merge 4 commits into
mainfrom
semantics-dev-tooling

Conversation

@RaoulSchaffranek

Copy link
Copy Markdown
Member

This PR introduces a new script scripts/dev.sh that makes it easier to work on semantic changes while working on the debugger.

Working on a debugger change that also needs a komet/wasm-semantics change
previously meant manually cloning the chain, wiring pins, and rebuilding each
repo by hand. The chain is pinned by uv git dependencies (not Nix flake inputs),
so `kup --override` can't reach komet/wasm-semantics.

dev.sh is a single front-end for that workflow:
- setup checks the chain out under .deps/ (gitignored) at the versions each
  downstream currently pins, and wires them with uv path sources so an edit
  flows up the chain with no version bumps.
- build/shell drive the fast incremental loop (nix devShell + uv + kdist);
  use installs the local build as the debugger's komet-node for parity.
- pr open/status/link/unlink opens coordinated PRs across the repos.

nix/uv/kdist stay hidden behind the script. CONTRIBUTING documents the three
modes (debug / change semantics / upstream) and notes this repo carries no
version-pin files of its own.
`use` installs a release-parity komet-node via kup + nix, which copies
only the flake dir into the Nix store and so cannot consume the editable
PATH sources the fast loop (build/shell) relies on. Rework it to:

- Point komet-node at any locally-*changed* chain repo (komet,
  wasm-semantics/pykwasm) via a git file:// source pinned to its
  committed HEAD — the same git -> uv2nix -> nix path a real release
  takes — and keep the upstream pin for repos still on their pinned tag.
- Refuse to proceed if a changed repo has uncommitted work (nix builds
  from committed history only), ignoring generated pyproject/uv.lock churn.
- Always restore the editable path sources afterward so `build` stays
  instant, even when the build fails.

Factor the shared block-writer out of inject_sources into
write_uv_sources, and add pinned_for() to resolve each repo's downstream
pin.

Also install the GitHub CLI in the devcontainer (used by `dev.sh pr`),
and drop the komet-node path override from examples/.vscode/settings.json
since the local build now lands on PATH.
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