Skip to content

[V2:17] Add Platform Development Setup#31

Open
ritorhymes wants to merge 15 commits into
eips-wg:masterfrom
ritovision:v2/17-platform-dev-setup
Open

[V2:17] Add Platform Development Setup#31
ritorhymes wants to merge 15 commits into
eips-wg:masterfrom
ritovision:v2/17-platform-dev-setup

Conversation

@ritorhymes

@ritorhymes ritorhymes commented May 5, 2026

Copy link
Copy Markdown
Contributor

Part of V2: Multi-repo local build system.

Summary

This PR adds the platform-contributor setup layer for people changing build-eips itself: build-eips init --platform-dev optionally clones preprocessor/ and eipw/ without changing the default proposal workspace shape or making those repos required for normal EIPs/ERCs users. The POSIX and PowerShell scripts/dev-setup wrappers build the local debug build-eips (no released-binary fallback), install Zola 0.22.1 only when missing while reusing any existing 0.22.1-or-newer install, then run init --platform-dev through that local binary (defaulting to ../EIPs, auto-cloning from https://github.com/eips-wg/EIPs.git if missing, with ACTIVE_REPO_ROOT/WORKSPACE_ROOT overrides and optional --template) followed by doctor. It also adds release archive SHA-256 sidecars for downstream repo setup scripts that fetch released binaries (the local-source dev wrappers do not consume them) and setup-helper doctor checks for POSIX download/archive tools, so review should focus on optional-repo scoping, local-binary-only execution, Zola version detection and reuse policy, EIPs auto-clone behavior, env override handling, downstream sidecar usage, and the expanded setup docs/tests.

  • Add build-eips init --platform-dev for optional platform contributor workspace setup.
  • Clone optional preprocessor/ and eipw/ repos when --platform-dev is passed.
  • Keep default init behavior unchanged: proposal siblings, theme/, .local-build/, .build-eips.toml, and WORKSPACE.md remain the baseline.
  • Add POSIX and PowerShell scripts/dev-setup entrypoints for local build-eips development.
  • Have setup scripts run cargo build for the local debug binary, ensure a supported Zola is available, install 0.22.1 when needed, run init --platform-dev, and run doctor.
  • Add default EIPs checkout bootstrap, WORKSPACE_ROOT / ACTIVE_REPO_ROOT overrides, PATH guidance, and optional --template setup support.
  • Add SHA-256 sidecars to release archives for downstream setup-script verification.
  • Extend doctor with setup-helper checks for POSIX download/archive tools.
  • Expand README, generated workspace docs, and setup tests.

Review Notes

This PR is the contributor setup layer for people changing build-eips itself. It builds on the workspace lifecycle commands from V2:06-V2:07 and the completed runtime command surface from V2:08-V2:16.

--platform-dev only adds optional platform repos. It does not change the required workspace shape for normal proposal work, and it does not make preprocessor/ or eipw/ required for regular EIPs/ERCs users.

The setup scripts are front-door convenience wrappers for local development. They run cargo build in this checkout to produce target/debug/build-eips or target/debug/build-eips.exe, install Zola 0.22.1 when needed, reuse existing 0.22.1-or-newer installs, bootstrap the workspace through that local debug binary, and run doctor. They do not install or reuse a released build-eips.

By default the scripts use ../EIPs as the active proposal repo and clone https://github.com/eips-wg/EIPs.git if it is missing. ACTIVE_REPO_ROOT can point setup at an existing proposal checkout, and WORKSPACE_ROOT can override the workspace location.

The release workflow checksum sidecars support setup flows that download release archives. The platform dev scripts in this PR are local-source scripts, but the sidecars are needed by downstream repo setup scripts.

Verification

  • Review src/cli.rs and src/main.rs for init --platform-dev parsing and dispatch.
  • Review src/workspace.rs for optional preprocessor/eipw cloning, setup-helper doctor checks, workspace doc generation, and setup tests.
  • Review scripts/dev-setup and scripts/dev-setup.ps1 for local Cargo build, supported Zola detection, Zola 0.22.1 install, existing 0.22.1-or-newer reuse, default EIPs bootstrap, ACTIVE_REPO_ROOT / WORKSPACE_ROOT handling, init --platform-dev, doctor execution, PATH guidance, and optional template support.
  • Review .github/workflows/release.yml for SHA-256 sidecar generation on release archives.
  • Review README.md and src/workspace_doc.md for contributor setup, workspace layout, troubleshooting, and targeted-render command guidance.
  • Review workspace tests for default init behavior, --template, --platform-dev, combined optional repos, generated docs, config preservation, and doctor setup-helper checks.

Add workspace-local `.build-eips.toml` loading and starter configuration. Introduce `config::ActiveRepo` to load the selected checkout’s `Build.toml`, validate explicit `-C` roots, and expose active repository context to later commands. Keep source materialization, initialization, and diagnostics in their owning later branches.
Add clean and dirty source materialization for the active repository and sibling content. Use `config::RepositoryUse` throughout the runtime path, preserve tracked working-tree materialization and `index_path`, and reject dirty active manifests in clean modes. Build, check, and serve prepare sources without fetching the active upstream; `changed` retains upstream fetching for comparison.
Add workspace initialization from the selected active `Build.toml`. Clone missing sibling repositories from declared locations and initialize a missing theme checkout from the manifest repository and pin. Preserve existing usable checkouts and fail without deleting unusable paths. Write `.build-eips.toml` only when absent and generate `WORKSPACE.md` for the initialized workspace.
Add `build-eips doctor` for validating workspace configuration, active `Build.toml`, managed sibling repositories, the local theme checkout, and required tools. Report ok/warn/fail diagnostics; invalid active manifests and unusable theme configuration fail, while expected sibling and theme-pin conditions can warn. Keep diagnostics read-only and leave execution and runtime behavior to later branches.
Resolve build, check, and serve source policy around local active sources, clean mode, remote siblings, build roots, and base URL precedence. Keep `--clean` and `--remote-siblings` as source controls and limit `--only` to supported local dirty modes. Route runtime commands through one resolved execution policy.
Run Zola with the editable `workspace/theme` checkout. Materialize tracked local theme files into prepared `themes/eips-theme`, load Zola and eipw configuration from that local checkout, and keep runtime commands independent of manifest network access.
Add prepared runtime build pipeline. Materialize active and sibling sources according to resolved execution policy, preprocess merged proposal content, prepare the local theme mount, and invoke runtime checks and rendering from `pipeline.rs`. Keep serve watch and sync behavior in the serve runtime branch.
Add server binding resolution and serve-only host/port flags for local Zola serve commands.

Run Zola serve with the resolved server binding, optional base URL override, fast/force serve flags, and generated output directory.

Add dirty serve watching for dirty active-repo paths and local theme changes. Clean mode disables active-repo sync but keeps theme sync.
Add build-eips preview for serving the existing resolved output directory without rebuilding or starting dirty sync.

Reuse server binding resolution and preview-only host/port flags, and report missing output before binding the local server.

Add a tiny_http static file server with safe path resolution, index-file fallback, basic content types, and preview path tests.
Add proposal number parsing, proposal path classification, and content-path helpers for flat and directory proposal layouts.

Introduce the proposal-selection data needed by later editorial and targeted-rendering commands while leaving user-facing render selection, render-plan construction, and targeted rendering behavior to their owning later branches.
Add `build-eips editorial lint` and `build-eips editorial check` as the first user-facing proposal-selection commands.

Keep eipw options scoped to editorial lint/check. Normal build, check, and serve prepare runtime sources, preprocess markdown, and run Zola without carrying eipw source-selection flags.

Run editorial-selected eipw lint against the prepared merged source tree so cross-repo EIP/ERC references resolve through the same content layout used by local builds.

Prepare runtime sources from the local active checkout, merge sibling repositories, and keep active-upstream fetches in changed-file comparison and editorial `--against-upstream` target selection.
Add targeted build rendering. Resolve `--only` and `[render].only` for local dirty builds, create an `OnlyRenderPlan`, rewrite links for omitted proposal content, and prune unselected content before Zola. Keep targeted mode restrictions enforced by execution policy.
Resolve cross-proposal asset links before Zola sees prepared markdown.

Add proposal asset path resolution, rendered URL builders, and an OnlyRenderPlan asset inventory so links can be validated before targeted pruning removes omitted proposal content.

Rewrite static asset links to rendered relative URLs when targets are available locally, and to public EIP/ERC asset URLs when targeted rendering omits the target proposal. Keep selected asset markdown links on the existing Zola @/... path, while omitted asset markdown links use public page URLs.

Preserve query strings and fragments, leave fragment-only and raw HTML links untouched, and skip already-generated Zola markdown so repeated preprocessing remains idempotent.
Extend targeted rendering to local dirty serve by accepting --only on serve and applying workspace [render].only to local serve runs.

Pass OnlyRenderPlan into dirty serve sync and filter active-repo dirty paths to selected proposal content. Avoid reintroducing omitted proposal markdown or assets into the materialized repo.

Add incremental targeted markdown preprocessing for dirty serve updates, including selected asset markdown, retained non-proposal pages, selected deletions, and filesystem timestamp fallback for new dirty files.
Add --platform-dev workspace initialization for cloning optional preprocessor and eipw repos alongside proposal repos and theme.

Add POSIX and PowerShell dev-setup scripts that build the local build-eips binary, ensure a supported Zola is available, and install 0.22.1 when needed while reusing existing 0.22.1-or-newer installs.

Add setup documentation, release archive checksum sidecars, doctor helper checks, and focused setup tests for contributor workspace setup.
@ritorhymes ritorhymes force-pushed the v2/17-platform-dev-setup branch from c48d299 to 11d5d8d Compare June 21, 2026 22:41
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