Repository navigation
feat: --external-std / comline.toml external_std for comline generate - #50
Merged
Merged
Conversation
added 3 commits
October 11, 2026 04:54
Wires comline-rust#30's external_std opt-in through the CLI: a new comline.toml [generate] external_std field (per-target override, COMLINE_GENERATE_EXTERNAL_STD env var, --external-std flag), same precedence chain mode/out/layout already use. Also fixes a real gap found while testing end-to-end: code mode's own driver independently expects a generated file for every schema it knows about, which breaks once a generator deliberately drops one (std's own schemas, under external_std) - skip that check for std specifically, mirroring the same namespace-prefix convention the generator itself uses to decide what to drop. Bumps comline-codegen/-rust/-typescript to revs carrying GenRequest.external_std (generation#40, comline-rust#30, comline-typescript#25 - all branch-tip, pending merge).
comline-rust's branch had the wrong Cargo.toml dependency key (comline-std, hyphen) for a package whose real name is comline_std (underscore) - caught by actually cargo build-ing a generated crate against the real dependency, not just string-matching in tests. Bump the pin to the fixed commit and correct this repo's own test assertions to match.
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
external_stdopt-in through the CLI: a newcomline.toml[generate] external_stdfield (per-target override,COMLINE_GENERATE_EXTERNAL_STDenv var,--external-stdflag) - same precedence chainmode/out/layoutalready use.codemode's own driver incommands/generate.rsindependently expects a generated file for every schema it knows about, erroring"generator produced no file for X"otherwise - this breaks the moment a generator deliberately drops one, which is exactly whatexternal_stddoes forstd's own schemas. Fixed by skipping that check specifically for std-originated namespaces whenexternal_stdis on, mirroring the same namespace-prefix convention the generator itself already uses to decide what to drop.comline-codegen/-rust/-typescriptto the revs carryingGenRequest.external_std(generation#40, comline-rust#30, comline-typescript#25 - all branch-tip, pending those PRs' merge, per established precedent in this project).docs/cli.mdupdated with the new field/flag/env var.Test plan
cargo testclean (74 tests: 17 unit + 57 integration, including 6 newexternal_std-specific ones covering both the config precedence chain and real end-to-end CLI behavior in bothcodeandlibmode)cargo clippy --all-targetscleancargo run -- generate --helpshows the new flag correctly