[V2:05] Add Source Materialization Layer#19
Open
ritorhymes wants to merge 2 commits into
Open
Conversation
9d809a2 to
34531df
Compare
This was referenced May 5, 2026
5d204fb to
65a9b3c
Compare
65a9b3c to
4b52595
Compare
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.
4b52595 to
75f58c8
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 source-materialization boundary that later workspace, runtime, and serve/watch PRs use to choose between clean cloned sources and dirty local working trees. It introduces
SourceMaterialization::{Clean, Dirty}plus git helpers for availability, clone/fetch, dirty working-tree copying, tracked-path sync, and sibling merge behavior. Existing build and changed-file flows still useClean, so review should focus on thegit.rssource-state contract, not on a switch to dirty as the default.SourceMaterialization::{Clean, Dirty}and use manifest-derivedRepositoryUsevalues to carry resolved repository endpoints intogit::Fresh::new.git.rs.HEAD, while remote sibling sources continue fetchingmaster.Review Notes
This is the git/source foundation for later workspace and runtime behavior. It does not make dirty local workspaces the default yet; existing build and changed flows continue using clean cloned sources.
Workspace init uses the clone/repo availability pieces in V2:06. Execution policy starts selecting clean versus dirty source modes in V2:08. The prepared runtime pipeline consumes materialized active and sibling sources in V2:10, and serve/watch behavior consumes the dirty sync helpers in V2:11.
Review this as the source-materialization boundary:
git.rsowns repository availability, cloned source setup, dirty working-tree copying, tracked path sync, and sibling merge behavior. Later PRs decide when those paths are used.Dirty materialization rejects conflicted index entries before copying and fails explicitly on unsupported dirty paths, so later runtime PRs can fail with an explicit source state error instead of silently building from an ambiguous tree.
RepositoryUsecarries the activeBuild.tomllocation and declared sibling repository endpoints into source materialization, keeping repository resolution explicit at the git boundary.Verification
src/git.rsforSourceMaterialization,RepositoryUse, clone/fetch setup, dirty materialization, tracked path sync, dirty rejection errors, and sibling merge behavior.src/changed.rsandsrc/main.rsfor the clean materialization wiring used by existing behavior.src/config.rsfor manifest-derived repository locations andRepositoryUseconstruction used by source materialization.