Repository navigation
comline.toml: core's package-wire freeze, and framings judged by their frozen facts - #99
Merged
Merged
Conversation
…r frozen facts - source::apply_package_wire, a copy of core's private freeze of the package's framing and handshake, is gone: the comline.toml context calls core's schema::ir::package_wire::apply_package_wire with the package's frozen config (source::declared_config), so handshake parameters now freeze as the build freezes them too. - The used-encodings check judged only official framings, by their embedded profiles. Every manifest in view (the package's and its dependencies') now has its encodings frozen as core freezes them, profile read from beside it (source::declared_encoding_units), and the set goes through generation's encodings::used_as_declared, the function comline generate's fill uses. A declaration whose profile can't be read keeps its name and mappings and states nothing. - The protocol hover named the format a framing implies "JSON-RPC's format" whatever the framing; it names the framing. - Pins core#209, generation, comline-rust and comline-typescript on one core. Refs ComlineProject/runtime#15
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.
Follow-up to
comline@2(ComlineProject/runtime#15).1. No copy of core's package-wire freeze
source::apply_package_wire(from language-server#98) copied core's private logic for freezing a package'swire.framingand default handshake into its protocols, and had already drifted: it froze a stated handshake's parameters as the plain name. It's deleted. The comline.toml context now calls core'sschema::ir::package_wire::apply_package_wire(core#209) with the package's frozen config (source::declared_config, the interpretationdeclared_wirealready did, now public).declared_wirestays, built from it.2. Framings judged by their frozen facts
The used-encodings check only knew the official framings' grammar, from their embedded profiles, so a third party's JSON framing never asked for
json@1's mapping. Now:source::declared_encoding_units(manifest, path)freezes eachencodingsentry of a manifest as core does, reading its profile from beside the manifest, so the unit carries the frozengrammar,callsanddirections. Entries are frozen one at a time: one whose profile can't be read (not on disk, mid-edit, wasm) keeps its name, kind and mappings and states nothing.Context::from_filescollects them for the package's manifest and every dependency's (Context::declared), and computesusedwith generation'sencodings::used_as_declared(generation#123), the same functioncomline generate'sencodings::fillcalls. The editor and the CLI can't disagree.a_dependencys_framing_is_judged_by_its_frozen_facts: a dependency declarescom.acme.lines@1withpayload = jsonin its profile, the package uses it with no format, and the editor expectsjson@1alongsidepacked@1, which is the exact setused_as_declaredgives for the frozen declaration.payload = opaque, or an unreadable profile, doesn't expectjson@1.Other name-keyed checks
Grepped for
jsonrpc,datagram@,comline@1/@2andjson@1used as rules:handlers/protocol_summary.rs: the format a framing implies was labelled "JSON-RPC's format" whatever the framing. Core decides it by facts (unverified::default_format); the label now names the framing: "implied by<framing>".handlers/protocol_summary.rsDEFAULT_HANDSHAKEcomparison: a note about core's defaults, not a rule about an encoding's behaviour. Left as is.jsonrpc,datagram,...) list the official framings to pick from. Left as is.Pins
core#209 (
d11d82b), generation55d3fdc, comline-rust#111 (be90c80), comline-typescript#137 (02ededc).Merge after core#209, generation#123, comline-rust#111, comline-typescript#137 and cli#138.
Refs ComlineProject/runtime#15