Repository navigation
fix(cli): say when a site declaration is not being read - #12
Merged
Merged
Conversation
A site whose render-facing declaration plates could not see built anyway, in silence, and the result looked like a rendering bug. Render keys on an `exports.<name>` entry (`shell`, `stylesheet`, `lang`, `syntaxes`, `index`, `front_page` and the rest of a term node's `site:` keys) are now named with where they belong and what the site fell back to. `read_term_config` warns when the gate field's vocabulary is a flat `terms:` store, and separately when a reified one has no node for the gate's value. A site with no front page from any source is reported as anchored at the archive root with a synthesized index. An archive that declares nothing render-facing still hears nothing. Closes docs/tasks/unread-site-declaration.md. Behavioural-change: `plates build` and `plates serve` print new warnings for an archive whose export entries carry render keys, whose gate field's vocabulary is flat or has no node for the gate's value, or whose site has no front page while declaring something render-facing; `read_term_config` returns a warning in `TermConfig::warnings` for the flat and missing-node cases where it used to return none.
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.
What changed
plates-cli's newunread_export_keysreadsexports:off every surface prov reads it from (the root'sprov:block, the workspace node, the config document). It warns for eachindex,front_page,shell,stylesheet,style,lang,syntaxes,headerorfooteron an entry. The warning names the key, the term node it belongs on (site.<key>, orfront_page:), and what the site was built with instead.read_term_configwarns once when the gate field's vocabulary is a flatterms:store (fix: point the field at an index of term documents). It warns once, with different wording, when the vocabulary is reified but has no node for the gate's value (fix: add a node for the term). A pointer that resolves to nothing is still left toprov check.exports:that has no front page, no term node, and a root its audience can't see is reported as anchored at the archive root with a synthesized index. This only fires when the site declared something render-facing: a vocabulary on its gate field, or one of the keys above.status: donewith a status note.Why
Before this, a site whose render config sat somewhere plates doesn't look built silently in the built-in shell. The output looked like a correct one-entry site, so nothing pointed at the declaration. This is the repro from the task.
Closes
docs/tasks/unread-site-declaration.md.Verification
term::tests: no vocabulary is silent; a flat store warns; a reified vocabulary with no node warns differently; a found node is silent.build::tests::a_declaration_plates_is_not_reading_is_named: the task's repro, built end to end from disk.an_archive_that_declares_no_render_config_hears_nothing.a_site_fronted_by_its_term_node_hears_nothing.termwarning tests failed before the fix.plates build. Onmainit prints only✓ diaryx — 2 pages. On this branch it prints the two unread-key warnings, the flat-store warning and the front-page note.ship ci: all 7 jobs passed (fmt, clippy, test, docs, wasm, alone, msrv).prov checkfinds nothing.Open questions
audiencevocabulary and no render config now gets the flat-store warning on every build. The task asks for that, but say if it is too noisy.