Files
solidcraft/crates/doc/src/drawing/format/pending
bherbruckandClaude Opus 5.5 7e002f182d Opening a design from a newer SolidCraft: it opens with a notice instead of being refused (#12166)
* Open a design from a newer SolidCraft with a warning instead of refusing it

A newer format number or an unknown change no longer blocks opening. What
this version can read opens; a feature it can't read stays on the timeline
with an error, and fields, sections and container parts it doesn't know are
named in the reply and written back by Save, under the file's own number.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Saving a newer design from the CLI, and editing a feature this version can't read

`run --save` writes a design holding a feature only a newer build can build;
`--out` still stops, since it would export the part without that feature.
Edit Feature on such a feature says why instead of opening the palette.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Translate the newer-design notice for the complete catalogs; clippy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 12:18:25 +00:00
..

Pending drawing-format changes

One file per change to what a drawing file saves that no release has shipped yet. Drawings ("format": "solidcraft-drawing/N", #3890) are versioned by the same code as designs (crates/doc/src/format.rs, Family), from their own first format, 1. Adding a file here is the whole format bump: never edit the DRAWING family in format.rs, another change's file or a ../v<N>/ folder.

  • Name it after the change, lowercase with dashes: sheet-views.rs.

  • Start it with a //! note: what is saved, what an older drawing gets without it, and what the last release does with a drawing that has it (it warns about the newer format number, opens what it can read and keeps the rest).

  • If older drawings must be rewritten as they open, add the step to the same file:

    //! …the note…
    use serde_json::Value;
    
    pub fn step(v: &mut Value) -> crate::Result<()> {
        // rewrite the drawing's JSON here
        Ok(())
    }
    

    Steps run in file-name order, after the steps of every older format.

While this folder has a change in it, the build writes the next drawing format number (the last folded one + 1, which no release reads), and lists the changes a drawing has in its format_pending field, so a later build applies only the steps that drawing is missing. At release time scripts/fold-format-pending.sh moves these files into ../v<N>/, as it does the design format's (crates/doc/src/format/pending/README.md).