Repository navigation
Framing facts and titles in notes; a store in another IR format is refused (generation#137 step 2, core#269) - #156
Merged
Merged
Conversation
… pins comline-core -> e2d68a5, comline-codegen/doc-markdown/doc-html -> 8e7dca8 (a commit on the open generation#140), comline-codegen-rust -> 3e6864d (comline-rust#124), comline-codegen-typescript -> b5fc243 (comline-typescript#164); the same revs in tests/fixtures/generators. Nothing needed fixing to build.
…#269) Adapts the CLI to core's ensure_compatible_store: a .comline/ stamped with another IR format, no stamp but history, or an unreadable or invalid stamp is refused by every command, build and release included, with core's own message (it says nothing was changed). CliError::StoreFormat becomes CliError::Store(StoreError), exit code 2; error::from_core maps a core StoreError found in an eyre report to it, for build, release and the facts of the working tree. From the WIP on deps/core-07d86da (f1dba37), rebased onto main without its [patch] block (a local cargo checkout path), and without the calls to changes::render_unseen, which the WIP never defined. Tests: store_stamp expected the old message and a build that migrated a wrong stamp; they now expect core's message and a refused build that changes nothing.
The no-connection note and the async-unused warning no longer hardcode
JSON-RPC and datagram: each framing in use is named by
comline_codegen::connections::framing_title, with a reason from
why_lockstep (frames go one way; frames don't name the protocol and none
is client-provided; a framing of the package's own). inspect names the
framing a format is implied by the same way ("JSON-RPC's format"
comes from the title, not from the text).
Spec 0.11 has every framing profile state `protocol`, so the `lines` fixture framing does (`unnamed`: its requests carry no protocol), and `comline conformance` proves it with the runtime's conformance at 8f8c0cb (runtime#123), which knows the fact. comline-reference follows to the same rev.
build, diff and release print one line per unseen config: a config an older build doesn't store counts as changed (at least a patch), and `comline build` stores it from now on. build also counts it as a change to report, as the bump already does.
main printed only the message and its causes, so no #[diagnostic(help(...))] was ever shown. It now prints the help last, as `help: ...` under --plain (a cyan `help` otherwise), always, like the error.
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 2 of ComlineProject/generation#137, and the CLI side of core#269. Folds in the IR-migration WIP from
deps/core-07d86da.Pins (three commits, in this order)
comline-coree2d68a5comline-codegen,comline-doc-markdown,comline-doc-htmlat 8e7dca8, a commit on the open generation#140 (not its newer head); this rev is not onmainyetcomline-codegen-rust3e6864d (head of the open comline-rust#124),comline-codegen-typescriptb5fc243 (head of the open comline-typescript#164)tests/fixtures/generators/Cargo.toml;comline-runtime-conformanceis unchangedcomline-*git crates moved in the lock files (comline-catalog0.10.0 to 0.11.0 comes with core).Store in another IR format (from
deps/core-07d86da, f1dba37)CliError::StoreFormatbecomesCliError::Store(StoreError)with core's message (exit code 2);error::from_coremaps a coreStoreErrorto it.history::ensure_readableuses core'sensure_compatible_store.buildandreleaserefuse such a store instead of rebuilding it, and nothing deletes it. The WIP's local[patch]block is dropped. A config an older build doesn't store (core'sunseen) now prints one line each under "Configs not compared" inbuild,releaseanddiff, and counts towardhas_changes(changes::render_unseen, which the WIP called but never defined). Every error now prints its diagnostic help after the message, which shows the three existing helps:NotAProject,Store(pointing tocomline reset) andConfirmationRequired.tests/cli/store_stamp.rsnow expects core's message and a refusedbuild.Messages
Services/serve/connect" note and theasync = truewarning name each framing in use byframing_titlewith a reason fromwhy_lockstep, instead of hardcoded JSON-RPC /datagramtext.inspectshows "{framing title}'s format" for a format a framing implies.