Infs toolchain resolver#192
Conversation
…ent compiler compatibility checks in build command
- Bump dependencies: sha2 to 0.11, zip to 8.5.1, toml to 1.1.2, and winreg to 0.56. - Add a function to check verbosity from environment variables in paths.rs. - Implement metadata reading with schema version warning in paths.rs. - Add integration test to ensure `infs doctor` output matches VS Code extension's line contract.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Adds a more robust infs↔infc pairing story by (1) improving infc resolution (prefer workspace sibling binaries), (2) introducing an explicit compatibility handshake (--commit-hash, --abi-version), and (3) expanding doctor diagnostics to help users understand which compiler will run and why.
Changes:
- Introduce
inference-compiler-interfacecrate to share compiler ABI version constants betweeninfsandinfc. - Add
infc --commit-hash/--abi-versioninformational flags and integrate a compatibility handshake intoinfs build. - Improve
infstoolchain resolution (workspace sibling priority, verbose tracing) and enhancedoctoroutput + tests (including VS Code output-contract locking).
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| core/compiler-interface/src/lib.rs | Adds shared ABI constants + helper accessor for ABI version string. |
| core/compiler-interface/Cargo.toml | Declares new workspace crate for ABI/version handshake constants. |
| core/cli/src/parser.rs | Makes source path optional and adds --commit-hash / --abi-version flags. |
| core/cli/src/main.rs | Implements early-exit handlers for new informational flags; adjusts path handling. |
| core/cli/build.rs | Embeds INFC_GIT_COMMIT at build time for --commit-hash. |
| core/cli/Cargo.toml | Enables build script and depends on the new compiler-interface crate. |
| core/cli/tests/cli_integration.rs | Adds integration tests for infc informational flags. |
| apps/infs/src/toolchain/resolver.rs | Adds workspace-sibling resolution, resolution source reporting, and verbose tracing + tests. |
| apps/infs/src/toolchain/doctor.rs | Enhances checks: enumerates multiple infc on PATH, reports resolved infc, warns on ambiguity. |
| apps/infs/src/toolchain/conflict.rs | Adds which_all-based enumeration of all infc binaries on PATH + formatting + tests. |
| apps/infs/src/toolchain/paths.rs | Adds best-effort metadata parsing + optional verbose schema mismatch warning + tests. |
| apps/infs/src/commands/doctor.rs | Documents VS Code parsing contract and prints expanded duplicate-PATH warnings. |
| apps/infs/src/commands/build.rs | Adds compatibility handshake (commit hash + ABI version) before invoking infc + tests. |
| apps/infs/tests/cli_integration.rs | Adds contract test to lock doctor check-line format for VS Code parsing. |
| apps/infs/Cargo.toml | Updates deps and adds inference-compiler-interface + regex dev-dependency. |
| Cargo.toml | Registers inference-compiler-interface in workspace dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds a more robust infs→infc toolchain resolution and compatibility handshake, plus locks down infs doctor output formatting for editor integrations.
Changes:
- Introduces
inference-compiler-interfacecrate to shareinfs/infcABI version constants. - Extends
infcwith--commit-hashand--abi-version(and adds build scripts to embed commit hashes). - Updates
infstoolchain resolver priorities (workspace-sibling first), adds verbose tracing, expands doctor diagnostics, and adds compatibility probing ininfs build.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| core/compiler-interface/src/lib.rs | Defines shared compiler ABI major/minor constants. |
| core/compiler-interface/Cargo.toml | Adds new workspace crate manifest for the ABI constants. |
| core/cli/tests/cli_integration.rs | Adds integration tests for infc --commit-hash and --abi-version. |
| core/cli/src/parser.rs | Makes source path optional and adds new informational flags. |
| core/cli/src/main.rs | Implements --commit-hash/--abi-version fast paths; adjusts path handling. |
| core/cli/build.rs | Build script to embed INFC_GIT_COMMIT and rerun when git HEAD changes. |
| core/cli/Cargo.toml | Enables build script and adds dependency on compiler-interface crate. |
| apps/infs/tests/cli_integration.rs | Adds snapshot-style tests to enforce VS Code doctor-line regex contract. |
| apps/infs/src/toolchain/resolver.rs | Adds workspace-sibling resolution, verbose tracing, and “source” reporting. |
| apps/infs/src/toolchain/paths.rs | Adds metadata reader with optional verbose schema drift warning. |
| apps/infs/src/toolchain/doctor.rs | Adds “Resolved infc” and ambiguity checks; enumerates all PATH infcs. |
| apps/infs/src/toolchain/conflict.rs | Adds PATH enumeration (which_all) and duplicate warning formatting. |
| apps/infs/src/commands/doctor.rs | Adjusts PATH-conflict output to remain regex-compatible; prints duplicate PATH info. |
| apps/infs/src/commands/build.rs | Adds infc compatibility handshake (commit hash + ABI version probing). |
| apps/infs/Cargo.toml | Adds compiler-interface + regex dev-dep; bumps several third-party deps. |
| Cargo.toml | Registers inference-compiler-interface in workspace dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "Resolved infc", | ||
| format!("{} (source: {})", path.display(), source.label()), | ||
| ), | ||
| Err(err) => DoctorCheck::warning("Resolved infc", err.to_string()), |
| /// a source file argument. Regular compilation still requires a path and | ||
| /// exits with an error if one is not supplied. |
No description provided.