Resolve local/Git project sources and C compilation plans #6

Closed
opened 2026-09-03 14:22:17 +00:00 by JayKobe6k · 0 comments
Owner

Goal

Turn a local directory or Git origin plus build settings into a deterministic, typed plan of C translation units for indexing.

Scope

  • Accept a local project directory or Git origin as the source for index new.
  • Acquire Git sources into managed cache storage without shell interpolation; record normalized origin and resolved commit.
  • Define options for selecting a Git revision and for reusing/updating an existing managed checkout.
  • Discover or accept an explicit compile_commands.json.
  • Represent compiler executable, working directory, source path, and arguments as typed values without flattening commands into one shell string.
  • Define how caller-provided build commands/settings may generate a compilation database, including working directory and environment overrides.
  • Normalize duplicate entries and ordering, reject sources outside the project according to a documented policy, and fingerprint each compilation command.
  • Produce portable project-relative source identities while retaining native PathBuf values at filesystem boundaries.

Acceptance criteria

  • Unit tests cover local paths, HTTPS and SSH Git origins, fixed Git revisions, compile database discovery, explicit compile database paths, duplicate commands, relative working directories, spaces, and non-UTF-8-capable argument storage.
  • External commands are constructed as program plus argument vectors, never shell-interpolated.
  • The same inputs yield a stable ordered plan and stable fingerprints.
  • Failures identify the source, compilation database entry, or build step that failed.
  • Integration tests use local Git fixtures and do not require network access.

Dependencies

Depends on #2 and #4.

## Goal Turn a local directory or Git origin plus build settings into a deterministic, typed plan of C translation units for indexing. ## Scope - Accept a local project directory or Git origin as the source for `index new`. - Acquire Git sources into managed cache storage without shell interpolation; record normalized origin and resolved commit. - Define options for selecting a Git revision and for reusing/updating an existing managed checkout. - Discover or accept an explicit `compile_commands.json`. - Represent compiler executable, working directory, source path, and arguments as typed values without flattening commands into one shell string. - Define how caller-provided build commands/settings may generate a compilation database, including working directory and environment overrides. - Normalize duplicate entries and ordering, reject sources outside the project according to a documented policy, and fingerprint each compilation command. - Produce portable project-relative source identities while retaining native `PathBuf` values at filesystem boundaries. ## Acceptance criteria - Unit tests cover local paths, HTTPS and SSH Git origins, fixed Git revisions, compile database discovery, explicit compile database paths, duplicate commands, relative working directories, spaces, and non-UTF-8-capable argument storage. - External commands are constructed as program plus argument vectors, never shell-interpolated. - The same inputs yield a stable ordered plan and stable fingerprints. - Failures identify the source, compilation database entry, or build step that failed. - Integration tests use local Git fixtures and do not require network access. ## Dependencies Depends on #2 and #4.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
JayKobe6k/ClariTree#6
No description provided.