Repository navigation
comline.toml: use comline-codegen's shared config, and point at its schema - #109
Merged
Merged
Conversation
…chema comline.toml's types, parsing and resolution moved to comline_codegen::config (generation de7ceb4), which also generates the file's JSON Schema. What stays here is rendering a target's layout into a path, which needs core's template engine. Behaviour and messages are unchanged. `comline new`'s comline.toml starts with a #:schema line naming the schema, which Taplo-based editors read; docs/cli.md says so. Moves core to 2ae9986 (core#148), and the generators to their branches on it (comline-rust 5346678, comline-typescript c2096cd). Under core#148's rule a framing without conformance vectors gives up encoding conformance, so the dependency-framing tests' `acme` ships its vectors.
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.
Step 4 of the core 2ae9986 cascade, and the CLI side of comline.toml editor support (generation#92).
comline_codegen::config, and the moved code is gone fromsrc/gen_config.rs. That file keeps onlyDestination::dest_for, which renders a target'slayoutinto a path with core's template engine.external::DEFAULT_TIMEOUTisconfig::DEFAULT_TIMEOUT. Behaviour and error messages are unchanged. The moved unit tests now run in generation.#:schema.comline new's comline.toml starts with#:schema https://comlineproject.github.io/docs/schemas/comline-toml/0.x.json. The scaffold test asserts that line. It's a TOML comment, and the scaffold test still builds and generates from the project.#:schemaline, and correctsmodetocode | lib.2ae9986(core#148)de7ceb4, the same string comline-rust and comline-typescript pin5346678(comline-rust#84)c2096cd(comline-typescript#100)tests/fixtures/generatorsacmepackage therefore shipslines.vectors.jsonbeside its profile, copied fromtests/fixtures/conformance_package.Output check. I ran
comline generatewithmainand with this branch onsimple_project,validated_project,chat_projectandconformance_package. Each ran under 8 comline.toml variants: default, lib, lib with inline std, custom layout/out/async/validate, only + flattened target, a bad mode, a typo'd key, anddefault_framing.Cargo.tomldependency (4d6e1c5 → 37082de). It comes from comline-rust#82, already on comline-rust main, which this branch picks up by moving off0e5c60e.cargo fmt --check, both clippy configurations andcargo test(13 + 105) pass locally.cargo tree -dshows one copy of each comline crate.Merge after generation#92, comline-rust#84 and comline-typescript#100.