[V2:17] Add Platform Development Setup#31
Open
ritorhymes wants to merge 15 commits into
Open
Conversation
This was referenced May 5, 2026
8565d1e to
901ba70
Compare
901ba70 to
c48d299
Compare
This was referenced Jun 19, 2026
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.
c48d299 to
11d5d8d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the platform-contributor setup layer for people changing
build-eipsitself:build-eips init --platform-devoptionally clonespreprocessor/andeipw/without changing the default proposal workspace shape or making those repos required for normal EIPs/ERCs users. The POSIX and PowerShellscripts/dev-setupwrappers build the local debugbuild-eips(no released-binary fallback), install Zola 0.22.1 only when missing while reusing any existing 0.22.1-or-newer install, then runinit --platform-devthrough that local binary (defaulting to../EIPs, auto-cloning fromhttps://github.com/eips-wg/EIPs.gitif missing, withACTIVE_REPO_ROOT/WORKSPACE_ROOToverrides and optional--template) followed bydoctor. 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-helperdoctorchecks 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.build-eips init --platform-devfor optional platform contributor workspace setup.preprocessor/andeipw/repos when--platform-devis passed.initbehavior unchanged: proposal siblings,theme/,.local-build/,.build-eips.toml, andWORKSPACE.mdremain the baseline.scripts/dev-setupentrypoints for localbuild-eipsdevelopment.cargo buildfor the local debug binary, ensure a supported Zola is available, install 0.22.1 when needed, runinit --platform-dev, and rundoctor.WORKSPACE_ROOT/ACTIVE_REPO_ROOToverrides, PATH guidance, and optional--templatesetup support.doctorwith setup-helper checks for POSIX download/archive tools.Review Notes
This PR is the contributor setup layer for people changing
build-eipsitself. It builds on the workspace lifecycle commands from V2:06-V2:07 and the completed runtime command surface from V2:08-V2:16.--platform-devonly adds optional platform repos. It does not change the required workspace shape for normal proposal work, and it does not makepreprocessor/oreipw/required for regular EIPs/ERCs users.The setup scripts are front-door convenience wrappers for local development. They run
cargo buildin this checkout to producetarget/debug/build-eipsortarget/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 rundoctor. They do not install or reuse a releasedbuild-eips.By default the scripts use
../EIPsas the active proposal repo and clonehttps://github.com/eips-wg/EIPs.gitif it is missing.ACTIVE_REPO_ROOTcan point setup at an existing proposal checkout, andWORKSPACE_ROOTcan 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
src/cli.rsandsrc/main.rsforinit --platform-devparsing and dispatch.src/workspace.rsfor optionalpreprocessor/eipwcloning, setup-helper doctor checks, workspace doc generation, and setup tests.scripts/dev-setupandscripts/dev-setup.ps1for 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_ROOThandling,init --platform-dev, doctor execution, PATH guidance, and optional template support..github/workflows/release.ymlfor SHA-256 sidecar generation on release archives.README.mdandsrc/workspace_doc.mdfor contributor setup, workspace layout, troubleshooting, and targeted-render command guidance.--template,--platform-dev, combined optional repos, generated docs, config preservation, and doctor setup-helper checks.