diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 2d20522810..69795b6b6e 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -59,7 +59,9 @@ Partial commits are OK during the session. Before your final commit of the session, fully mirror CI: ```bash -./prep-all.sh +# Bootstrap — if either of these fails, jump to the fallback below. +nix develop -c forge soldeer install +nix develop -c forge build nix develop -c npm run lint-format-check:all nix develop -c npm run build:raindex # if Rust/raindex changed nix develop -c npm run build:ui @@ -78,22 +80,47 @@ nix develop -c npm run test nix develop -c cargo test --workspace ``` -## Fallback if end-of-session `./prep-all.sh` fails early +## Fallback if the end-of-session gate fails early -If the end-of-session gate fails during `./prep-all.sh`, run these steps -sequentially so dependencies still build: +Use this when a step fails because the dependency tree is not in place, rather +than because your change is wrong. That is not only the two bootstrap lines: +`lint-format-check:all` runs `@rainlanguage/raindex`'s `check`, which is `tsc` +over `dist/`, and `build:ui` builds `@rainlanguage/ui-components` against that +same `dist/`, so on a tree that has never been built both die on missing files +rather than on anything you wrote. Rebuild from scratch, one workspace at a +time, so you can see which step breaks: ```bash -nix develop -c forge install -nix develop -c bash -c '(cd lib/rain.interpreter && rainix-sol-prelude && rainix-rs-prelude && rainlang-prelude)' -nix develop -c bash -c '(cd lib/rain.interpreter/lib/rain.interpreter.interface/lib/rain.math.float && rainix-sol-prelude && rainix-rs-prelude)' -nix develop -c bash -c '(cd lib/rain.interpreter/lib/rain.metadata && rainix-sol-prelude && rainix-rs-prelude)' -nix develop -c rainix-sol-prelude && nix develop -c rainix-rs-prelude && nix develop -c raindex-prelude +nix develop -c forge soldeer install +nix develop -c forge build nix develop -c raindex-ui-components-prelude -nix develop -c npm run build -w @rainlanguage/raindex -nix develop -c npm run build -w @rainlanguage/ui-components -nix develop -c npm run build -w @rainlanguage/webapp +nix develop .#wasm-shell -c bash -c ' + set -euxo pipefail + npm install --no-check + npm run build -w @rainlanguage/raindex + npm run build -w @rainlanguage/ui-components + npm run build -w @rainlanguage/webapp +' ``` +A failure that names your own code — a lint rule, a type error in a file you +touched, a failing assertion — is a real failure, and reinstalling will not +change it. Debug it where it is reported. + +Solidity dependencies are Soldeer packages, resolved into `dependencies/` by +`forge soldeer install` (`foundry.toml` sets `libs = ['dependencies']`). They +are plain source drops — there is nothing to prepare or build inside one, so +there is no per-dependency step here. + +`npm install --no-check` must run from the workspace root, and `.#wasm-shell` is +a slim shell whose `shellHook` does not run it for you — hence the explicit +first line inside the `bash -c`. `forge` and `raindex-ui-components-prelude` +come from the default `nix develop -c` shell; `.#wasm-shell` has neither. + +If the problem is stale committed artifacts (`meta/`, `src/generated/`, +`crates/*/abis`, `subgraph/`) rather than a build that will not run, that is the +`copy-artifacts` regen cascade and not this bootstrap — follow the runbook in +the root `CLAUDE.md`. + Goal: all CI checks in `.github/workflows` pass. Be patient with long builds/tests and never commit with failing lint/tests. diff --git a/.soldeerignore b/.soldeerignore index 376ba851e7..e1846eee10 100644 --- a/.soldeerignore +++ b/.soldeerignore @@ -1,6 +1,6 @@ # Publish only the Solidity source (src/) to Soldeer. raindex is a large # multi-language repo; without this the push zips the whole tree (crates/, -# packages/, subgraph/, lib/, target/, node_modules/, audit/ ...) and fails. +# packages/, subgraph/, target/, node_modules/, audit/ ...) and fails. # Same syntax as .gitignore. # Tooling / repo files @@ -15,7 +15,6 @@ .git .github .gitignore -.gitmodules .pre-commit-config.yaml .prettierignore .soldeerignore @@ -39,7 +38,6 @@ slither.config.json /flake.lock /flake.nix /foundry.toml -/lib /meta /node_modules /out diff --git a/REUSE.toml b/REUSE.toml index 07b8bfab31..25a57ce587 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -19,7 +19,6 @@ path = [ "remappings.txt", "soldeer.lock", "slither.config.json", - "typeshare.toml", "REUSE.toml", "package.json", "package-lock.json",