Resolve project sources and C compilation plans #23
No reviewers
Labels
No labels
area/cli
area/core
area/database
area/indexing
area/query
type/epic
type/feature
type/foundation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
JayKobe6k/ClariTree!23
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-6-project-sources"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Tests
nix develop --command cargo fmt --all -- --checknix develop --command cargo lintnix develop --command cargo test --all-targets --all-featuresnix develop --command cargo doc --no-deps --all-featuresnix develop --command cargo check --target x86_64-pc-windows-gnu --all-targets --all-featuresnix develop --command nixfmt --check flake.nixnix flake checkCloses #6
Found three actionable issues in source checkout and environment handling.
@ -99,0 +153,4 @@#[arg(long, requires = "build_program")]build_cwd: Option<PathBuf>,/// Set a portable ASCII build variable as NAME=VALUE; repeatable.#[arg(long, requires = "build_program", value_parser = parse_environment_set)][P2] This
&strvalue parser requires every--build-env-setargument to be valid Unicode, while the documented compilation contract says environment values retain arbitrary native encoding and the domain model usesOsString. A non-UTF-8 value is therefore rejected before it can reach the lossless model. Please parse this option fromOsStrand preserve the value asOsString, or narrow the documented contract explicitly.@ -0,0 +116,4 @@} else {self.clone_checkout(&cache_root, &checkout, source)};let unlock_result = FileExt::unlock(&lock).map_err(|error| ProjectSourceError::Cache {[P1] Every request for an origin mutates the same cached checkout, but the per-origin lock is released as soon as
prepare()returns. Concurrent indexing jobs can then replace the checkout revision while an earlier job is still reading it, producing a compilation plan and indexed facts from mixed revisions. Please keep a lease/lock alive for the full consumer operation or materialize immutable revision-specific worktrees.@ -0,0 +202,4 @@[OsString::from("fetch"),OsString::from("--prune"),OsString::from("--tags"),[P2]
git fetch --prune --tagsprunes remote-tracking branches but does not delete local tags removed from the remote. A deleted tag can therefore continue to resolve from this cache indefinitely, causing refreshes to index an obsolete revision. Please explicitly synchronize/prune tags against the remote before resolving a tag reference.Review comment #927: Fixed in
99c0702.ProjectSourcePortnow returns an owned lease, and managed Git leases retain the exclusive checkout lock through application planning, parsing, analysis, persistence, and activation. Integration coverage proves contention while leased and release on drop. Full tests and the Windows GNU cross-check passed.Review comment #928: Fixed in
99c0702. Refresh now usesgit fetch --prune --prune-tags origin; the local bare-repository regression deletes a remote tag and verifies it no longer resolves.nix develop --command cargo test --test project_sourcesand the complete all-target/all-feature suite passed.Review comment #930: Fixed in
99c0702.--build-env-setnow uses anOsStrtyped parser with lossless Unix-byte and Windows-wide splitting at the first=, preserving native values asOsString. CLI boundary coverage and the Windows GNU all-target/all-feature check passed.