Skip to content

wip: copy from unionlabs/union/gnoland#1

Draft
benluelo wants to merge 6 commits into
onbloc:mainfrom
unionlabs:union-ibc-gno
Draft

wip: copy from unionlabs/union/gnoland#1
benluelo wants to merge 6 commits into
onbloc:mainfrom
unionlabs:union-ibc-gno

Conversation

@benluelo

@benluelo benluelo commented May 6, 2026

Copy link
Copy Markdown

very wip, just copied the progress from unionlabs/union#5455.

TODO:

  • finish copying over the spec types/utils (events, msgs, paths)
  • add all entrypoints
  • implement upgrade functionality (somehow)
  • fully implement app and client registration functionality

@notJoon notJoon requested review from aronpark1007 and notJoon May 11, 2026 00:48
notJoon added a commit that referenced this pull request May 11, 2026
* chore: add nix flake for reproducible dev shell

Adopt the flake from #1 (WIP) so the toolchain pins land
ahead of that PR: nixpkgs 25.11, gno upstream at the same commit as
.gno-version (e16676ee), gnopls, plus the Go/Python/Rust-adjacent tools
the project's tooling already shells out to (go, gofumpt, rsync, jq).

The flake builds gno/gnopls/gnodev from source but does NOT integrate
this repo's native stdlibs — keccak256/bn254/cometbls bindings still
need `make install-gno`, which symlinks stdlibs/ into a working gno
checkout and re-runs `go generate`. The flake's role is the supporting
toolchain (reproducible Python with pytest baked in for the regression
tests, formatters via treefmt-nix, editor LSPs).

Adjustments vs #1's flake: dropped `pkgsStatic` (dev
shell doesn't need fully-static binaries and dynamic linking gives
better binary cache hits), extracted `mkGnoTool` helper to dedupe the
gno/gnodev derivations, used `modRoot` instead of the `prePatch cd`
hack, dropped redundant `treefmt.programs.nixfmt.package` override,
and stripped flake-parts template boilerplate.

`.envrc` is a one-line `use flake` for direnv users; `.direnv/` added
to .gitignore. CI continues to pin pytest inline; promoting CI to Nix
is a separate change.

Assisted-By: Claude Opus 4.7 (1M context)

* docs: update README to include development setup instructions

* ci(test): run workflow inside nix develop, pin toolchain via flake

Replace `actions/setup-go@v5` + inline `pip install pytest` with the
flake's pinned toolchain. The test job now installs Nix and sources a
minimal `devShells.ci` (python+pytest, go, rsync — all from
cache.nixos.org substitutes, no source builds) for every subsequent
step.

Refactors from /simplify:

- `devShells.default` now inherits from `devShells.ci` via `inputsFrom`,
  so the python+go+rsync baseline has one source of truth.
- `nix print-dev-env .#ci` is materialized once at job start; later
  steps source it through BASH_ENV instead of re-evaluating the flake
  on each `nix develop --command` call (saves ~10–20s per run).
- `flake.lock` is added to the Go build-cache key so a nixpkgs bump
  that changes Go's version invalidates `~/.cache/go-build` cleanly.
- `timeout-minutes: 30` guards against Nix download stalls.

Workflow path triggers gain `flake.nix` and `flake.lock`. Out of scope:
gno-coverage.yml and lint.yml (separate change), and /nix/store caching
(premature without a measurement).

Assisted-By: Claude Opus 4.7 (1M context)

* fix(flake): prepend GOBIN to PATH in ci shell

`nix print-dev-env` rebuilds PATH from the shell's store paths only,
which dropped the runner's `~/go/bin` entry — `make install-gno`
installs the gno binary there, and `make verify-gno` then failed with
"ERROR: 'gno' not found on PATH".

Add a shellHook that prepends `\${GOBIN:-\$HOME/go/bin}` to PATH so the
gno binary stays reachable from every step that sources the dev env
via BASH_ENV.

Assisted-By: Claude Opus 4.7 (1M context)

* ci(coverage): migrate workflow to nix develop, expand path triggers

Match test.yml's setup: install Nix, materialize the ci dev shell once
into BASH_ENV, drop `actions/setup-go@v5`. The custom GNO_REPO /
GNO_COMMIT env vars (pointing at the gno fork that carries the
`-cover` flag) pass through unchanged — the ci shell only supplies
python/go/rsync, the experimental gno is still built by
`make install-gno GNO_COMMIT=...`.

Add `flake.nix` / `flake.lock` to the path triggers so flake-only
changes still fire this workflow (the immediate motivation: this PR
touched only flake files and skipped coverage entirely). Add
`flake.lock` to the gobuild-cover cache key for the same reason as
test.yml — Go-version bumps via nixpkgs invalidate `~/.cache/go-build`.
`timeout-minutes: 30` guards against Nix download stalls, same as
test.yml.

Assisted-By: Claude Opus 4.7 (1M context)
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