Skip to content

comline fix: apply the language's fixes and move editions - #143

Merged
Kinflou merged 3 commits into
mainfrom
feat/comline-fix
Nov 9, 2026
Merged

Kinflou merged 3 commits into
mainfrom
feat/comline-fix

Conversation

@Kinflou

@Kinflou Kinflou commented Nov 9, 2026

Copy link
Copy Markdown
Member

The cli side of ComlineProject/core#102. Core's part is in ComlineProject/core#217.

comline fix [--edition N] [--dry-run]

  • Applies the fixes core attaches to its edition diagnostics:
    • a config.idp without specification_version gets the line;
    • each use of a keyword or type the package's edition deprecates or removes is replaced, when it has a replacement;
    • a use without one is listed, rendered with its span, for the author to change by hand.
  • --edition N:
    • checks and fixes the schemas under edition N, then moves config.idp to N;
    • if N removes a word that's still used and has no replacement, it exits 1 and the package stays on its edition;
    • moving back to an earlier edition is refused, and an edition this Comline doesn't know is refused with the list it knows.
  • --dry-run lists the fixes and writes nothing.
  • Generator-agnostic. It walks src/**/*.ids and edits only config.idp and schemas.

Also changed: changes.rs now says an edition move bumps nothing by itself, matching core.

Pins: core b933209, generation bb89a51, comline-rust de0b8e5, comline-typescript 9952c5a. comline-doc-markdown and comline-doc-html move to generation bb89a51 too. They reach core through codegen, so leaving them behind split core into two crates (E0308).

Tested

  • Unit tests: set_edition replaces only the number, schemas are found in nested folders in order, and several fixes apply in one file.
  • By hand, on a comline new package with the line removed:
    • build fails with edition::missing and the fix;
    • fix --dry-run writes nothing;
    • fix adds the line, and running it again finds nothing to fix;
    • --edition 2 is refused;
    • build then passes.
  • Full suite: cargo test passes on the final pins, 146 integration tests and 21 unit tests.

Merge order: after core#217 and the generator and generation PRs. ComlineProject/docs#160 documents the command, and its CLI drift check needs this merged first.

Refs ComlineProject/core#102

Kinflou added 3 commits November 9, 2026 11:37
…r edition

core#102. `comline fix` applies the fixes core attaches to its edition
diagnostics: a config.idp without specification_version gets the line,
and each use of a word the package's edition deprecates or removes is
replaced when it has a replacement (others are listed to change by
hand). `--edition N` checks and fixes the schemas under edition N and
moves config.idp to it, unless a removed word without a replacement is
left. `--dry-run` lists the fixes without writing.

The edition-change line in build and diff now says it bumps nothing by
itself, matching core.
…ons cascade

core b933209 (core#217), generation bb89a51, comline-rust de0b8e5,
comline-typescript 9952c5a.
@Kinflou
Kinflou merged commit 578aa17 into main Nov 9, 2026
5 checks passed
@Kinflou
Kinflou deleted the feat/comline-fix branch November 9, 2026 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant