Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ eyre = "0.6.8"
# needs real I/O (git fetch, filesystem), so it's off by default for
# `comline-core`'s wasm32 consumers (the playground editor, the language
# server); the CLI is the one consumer that actually runs `comline build`.
comline-core = { git = "https://github.com/ComlineProject/core", rev = "d11d82b95c5dfa0c72476eb0947772533b7ce7e5", features = ["deps"] }
comline-core = { git = "https://github.com/ComlineProject/core", rev = "b933209052b06b328ee3da3355665faa0787063d", features = ["deps"] }
# All three pinned to revs that agree on one `comline-codegen`, and bumped
# together: comline-rust and comline-typescript's codegen crates consume
# `comline-codegen`'s types, so the rev below must be byte-identical to the
# one *they* pin - Cargo only unifies a git dependency across identical rev
# strings, and two copies of `GenRequest` are two incompatible types.
comline-codegen = { git = "https://github.com/ComlineProject/generation", rev = "55d3fdc064ae3216f313975ce08071f3e5f32d3f" }
comline-codegen = { git = "https://github.com/ComlineProject/generation", rev = "bb89a516af2fdfa28ce7b9c137b53c1478ef4807" }
# The official Markdown and HTML documentation renderers (`comline doc`),
# linked in like the official generators. Same generation rev as
# `comline-codegen`.
comline-doc-markdown = { git = "https://github.com/ComlineProject/generation", rev = "55d3fdc064ae3216f313975ce08071f3e5f32d3f" }
comline-doc-html = { git = "https://github.com/ComlineProject/generation", rev = "55d3fdc064ae3216f313975ce08071f3e5f32d3f" }
comline-codegen-rust = { git = "https://github.com/ComlineProject/comline-rust", rev = "be90c80b97266025c4a4b69588f26cff1ca51e06", optional = true }
comline-codegen-typescript = { git = "https://github.com/ComlineProject/comline-typescript", rev = "02ededc33c5473762c774757c69f5dfdef40626a", optional = true }
comline-doc-markdown = { git = "https://github.com/ComlineProject/generation", rev = "bb89a516af2fdfa28ce7b9c137b53c1478ef4807" }
comline-doc-html = { git = "https://github.com/ComlineProject/generation", rev = "bb89a516af2fdfa28ce7b9c137b53c1478ef4807" }
comline-codegen-rust = { git = "https://github.com/ComlineProject/comline-rust", rev = "de0b8e51665bbf56f24e23a6f0164044428a9e61", optional = true }
comline-codegen-typescript = { git = "https://github.com/ComlineProject/comline-typescript", rev = "9952c5ad7400c4005b30e892f6a5e9f974799a48", optional = true }
# `comline conformance`: the conformance runner (corpus loading, judging,
# profile proofs) and its case format, a public spec. Pinned by git rev.
comline-runtime-conformance = { git = "https://github.com/ComlineProject/runtime", rev = "cf5e06780793d8e71b0ec1133da8fd6c0e42b8e9" }
Expand Down
4 changes: 3 additions & 1 deletion src/changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ fn config_line(change: &ConfigChange) -> String {
ConfigChange::SpecificationVersionChanged { old, new } => mark(
"🔄",
"~",
format!("Changed `specification_version`: {old} {arrow} {new}"),
format!(
"Moved to edition {new} (from {old}); no bump by itself, the schema changes decide"
),
),
ConfigChange::DependencyRemoved { project } => {
mark("❌", "-", format!("Removed dependency `{project}`"))
Expand Down
26 changes: 26 additions & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,32 @@ first error found. Unlike `build`, this never writes to `.comline/` and never \
bumps the version, so it is safe to run in editors and pre-commit hooks.")]
Check,

/// Apply the fixes the language asks for, or move to another edition
#[command(long_about = "\
Apply the fixes Comline attaches to what it reports about the language: add a \
missing `specification_version` to `config.idp`, and replace each use of a \
keyword or type the package's edition deprecates or removes, when it has a \
replacement. A use without one is listed to change by hand.

With `--edition N`, the schemas are checked and fixed under edition N, and \
`config.idp` moves to it, unless N removes a word the schemas still use that \
has no replacement. Moving to a new edition doesn't bump the version by \
itself; whatever it changes in the compiled schema does.

Examples:
comline fix
comline fix --dry-run
comline fix --edition 2")]
Fix {
/// Move the package to this edition, fixing what it deprecates or removes
#[arg(long, value_name = "N")]
edition: Option<u8>,

/// List the fixes without writing them
#[arg(long)]
dry_run: bool,
},

/// Show what each protocol speaks on the wire and which guarantees it keeps
#[command(long_about = "\
For each protocol, the format, framing and handshake it resolves to, their \
Expand Down
Loading
Loading