Design format: a change is one new file, never an edit to FORMAT (#1563)
A PR that saves something new adds crates/doc/src/format/pending/<name>.rs (a note, and an upgrade step if older designs must be rewritten). The build writes the next format number while changes are pending and lists them in format_pending; scripts/fold-format-pending.sh fixes them as v<N>/ at release time. Formats 23 and 24 move into v23/ and v24/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
067f2642c2
commit
9a07932f20
16 files changed
+494
-33
No files matched your search
@@ -2133,6 +2133,10 @@ pub struct Document {
|
||||
pub render: std::sync::Arc<crate::render_settings::RenderSettings>,
|
||||
#[serde(default = "default_format")]
|
||||
pub format: String,
|
||||
/// The changes of `format` this design has while they are pending (no release has fixed
|
||||
/// that number yet; `crate::format::pending_names`). Empty, and not saved, otherwise.
|
||||
#[serde(default = "crate::format::pending_names", skip_serializing_if = "Vec::is_empty")]
|
||||
pub format_pending: Vec<String>,
|
||||
pub name: String,
|
||||
#[serde(default = "default_units")]
|
||||
pub units: String,
|
||||
@@ -2350,6 +2354,7 @@ impl Document {
|
||||
Document {
|
||||
render: Default::default(),
|
||||
format: default_format(),
|
||||
format_pending: crate::format::pending_names(),
|
||||
name: name.into(),
|
||||
units: default_units(),
|
||||
metadata: Default::default(),
|
||||
|
||||
Reference in new issue
Block a user