Repository navigation
Editions: config.idp's edition, deprecated words, and core's fixes as quick fixes - #101
Merged
Merged
Conversation
added 2 commits
November 9, 2026 11:45
… quick fixes A config.idp without a specification_version, or with one this core doesn't know, is an error at its span (core#102). A schema's uses of words its package's edition deprecates are struck-through warnings, and removed words errors. Completions mark deprecated keywords and primitive types. Any core diagnostic's Fix now travels in the LSP diagnostic's data, and textDocument/codeAction offers it as a preferred quick fix, for schemas and config.idp alike.
core b933209 (core#217), generation bb89a51, comline-rust de0b8e5, comline-typescript 9952c5a: the revs the CLI uses.
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.
Language-server half of language editions (core#217).
Diagnosticnow keeps itsFixin the LSP diagnostic'sdata(underfix, as LSPTextEdits already in UTF-16 positions);code_actions::fix_actionsoffers each back as a preferredquickfix. Wired for schemas andconfig.idp, and into the existing validation and parse conversions, so a core diagnostic that gains a fix later gets one in the editor with no LS change. (src/analysis/diagnostics.rswith_fix/from_core,src/handlers/code_actions.rsfix_actions,src/backend.rs.)config.idp.edition::check_configruns on an open manifest: a missingspecification_versionis an error on thecongregationline with "Addspecification_version = 1"; an unknown one is an error at the number with "Use edition 1". The build's own message for an unknown edition is suppressed when this one is shown, so it isn't said twice.Projectreads the package's edition from itsconfig.idp(ProjectContext::edition, newest when there's none). Each of the package's own schemas getsedition::deprecationsfor it: deprecated words as warnings taggedDEPRECATED, removed ones as errors, with their fixes. Dependencies' schemas are skipped.vocabulary::deprecationknows are taggedDEPRECATED, with the note in their detail.vocabulary::DEPRECATIONSis empty today, so the tests use a synthetic table (as core's do) throughedition_diagnostics(source, edition, table)andmark_deprecated_words(items, lookup), plus round trips that apply the quick fix and check the result.Pins: core
b933209(core#217), generationbb89a51, comline-rustde0b8e5, comline-typescript9952c5a. Don't merge before core#217.Refs ComlineProject/core#102