feat: delegate low-level ops to the tx3c binary; drop tx3-* crates#110
Merged
Conversation
trix no longer links tx3-lang/tx3-tir. Every low-level Tx3 operation is delegated to the tx3c binary as a subprocess; the tx3c CLI surface is the versioned contract (driver/compiler split, cf. cargo<->rustc). This decouples trix's release cadence from the toolchain's. - spawn/compat.rs: per-tool version-window matrix + ensure_supported(), routed through every external-CLI chokepoint (tx3c, cshell, dolos). tx3c window is >= 0.18.0, < 0.19.0 (the release introducing decode / --emit tir-json / --diagnostics-format). TX3_SKIP_COMPAT_CHECK escape hatch for developing/CI against an unreleased toolchain. - check / inspect tir: delegate to tx3c (build --diagnostics-format json, build --emit tir-json, decode --emit tir-json); diagnostic rendering reconstructed from the JSON contract. - codegen: remove the in-process legacy module; the tx3c-delegating path is the only one. Built-in SDK plugins pinned to codegen-v1beta0. - Cargo.toml: drop tx3-lang/tx3-tir, add semver. - tests/e2e: nested codegen layout, ungate codegen_deps, skip-compat in the harness. - design/004-toolchain-delegation.md: records the architecture. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- design/004: reframe as the general "trix drives dependent CLIs as subprocesses" decision (tx3c/dolos/cshell), not tx3c-specific. - spawn/compat: drop the stored `before`; the exclusive upper bound is derived as the next major (`min.major + 1`.0.0). A breaking CLI change must come with a major bump, so trix accepts any same-major release and no longer needs an update per dependent-tool minor. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`cargo clippy -- -D warnings` (the CI lint step) rejected the long-standing
unused `use trix::{builder, devnet, dirs, home, spawn, wallet}` imports in
the bin root. Only cli/commands/config/global/telemetry/updates are used.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
What
trixno longer linkstx3-lang/tx3-tir. Every low-level Tx3 operation is delegated to thetx3cbinary as a subprocess; a dependent tool's CLI surface is the versioned contract (driver pattern, cf. cargo↔rustc).cargo tree -i tx3-lang/-i tx3-tirnow both error.spawn/compat.rs: per-tool version matrix +ensure_supported(), routed through every external-CLI chokepoint (tx3c,cshell,dolos). Inclusive lower bound; exclusive upper bound derived as the next major (a breaking CLI change must come with a major bump, so same-major releases are accepted). Distinct too-old / too-new messages.TX3_SKIP_COMPAT_CHECKescape hatch.check/inspect tir: delegate totx3c(build --diagnostics-format json,build --emit tir-json,decode --emit tir-json); diagnostics reconstructed from the JSON contract (terminal output unchanged).codegen: legacy in-process module removed; the tx3c-delegating path is the only one. Output nests undergen/<project>/.Cargo.toml: droptx3-lang/tx3-tir, addsemver.design/004-toolchain-delegation.md: the general "trix drives dependent CLIs as subprocesses" decision (tx3c/dolos/cshell), tool-agnostic.tx3csurface). Compat window istx3c >= 0.18.0, < 1.0.0; that surface ships in tx3 0.18.0. Confirm the lower bound against the actually published tx3 version before tagging trix.TX3_SKIP_COMPAT_CHECK=1until atx3c >= 0.18.0is installed (a locally builttx3cstill reports the pre-release version). The e2e harness already sets it; a workflow-level export is needed for any path that runs the builttrixdirectly. Remove once tx3 0.18.0 is in CI's toolchain.Known follow-up (accepted)
CURRENT_CODEGEN_VERSIONis flipped tocodegen-v1beta0for the built-in SDK plugins (web/rust/python/go). The SDK repos do not yet shipcodegen-v1beta0bindgen templates — a knowingly-accepted gap to close via a fast follow-up in those repos before a user-facing release.Out of scope / handoff
The
tx3-lang/upchannel must pair tx3 0.18.0'stx3cwith the nexttrixsotx3upinstalls a matched set. Not in this repo.Verification
cargo build;cargo tree -i tx3-lang/-i tx3-tirboth error.cargo test: 20 passed, 1 failed — the failure isdevnet_starts_and_cshell_connects(dolosbinary absent in this env), pre-existing and unrelated; expected green in CI wheredolosis present.tx3c0.17.0 → too-old; 0.18.0 / 0.19.0 / 0.99.0 → ok; 1.0.0 → too-new.inspect tir(project + interface) byte-identical to directtx3c;checkreproduces analyzer codes/messages and exit status.🤖 Generated with Claude Code