From a798a78dc9c4ee9d890bdf2433f3f317400ab1a3 Mon Sep 17 00:00:00 2001 From: LouisBunt <141839514+LouisBunt@users.noreply.github.com> Date: Sun, 8 Nov 2026 07:40:56 +0000 Subject: [PATCH] Agents and scripts: Save and Save As describe their exact parameters and replies (#13307) file.save and file.save_as now publish typed input and output schemas, so agents and scripts can read which parameters they take and what they return, and the warn and strict parameter checks cover them. Each parameter is read the way the handler reads it today. Save As keeps its "`path` is required" message, Save and Save As keep refusing an unknown format or compression word themselves, and the reply is built from a typed value that serializes to the same JSON as before. Their lines leave unconverted.txt. Part of #2829. Made with Claude Sonnet 5.5 (medium effort, fast mode off) through the Claude API, with Claude Opus 5.5 as advisor. --- crates/engine/src/cmd/file.rs | 30 +++- crates/engine/src/schema/mod.rs | 1 + crates/engine/src/schema/save.rs | 139 ++++++++++++++ crates/engine/src/schema/save_tests.rs | 219 +++++++++++++++++++++++ crates/engine/src/schema/unconverted.txt | 2 - 5 files changed, 382 insertions(+), 9 deletions(-) create mode 100644 crates/engine/src/schema/save.rs create mode 100644 crates/engine/src/schema/save_tests.rs diff --git a/crates/engine/src/cmd/file.rs b/crates/engine/src/cmd/file.rs index 57459f61856..dd7735d2335 100644 --- a/crates/engine/src/cmd/file.rs +++ b/crates/engine/src/cmd/file.rs @@ -23,6 +23,8 @@ use solidcraft_io::Format; use super::CommandSpec; use super::print_face; use crate::params::{bad, bool_, num, str_, string_list}; +use crate::schema::save::{SaveAsParams, SaveParams, SaveResult}; +use crate::schema::{TypedContract, output_schema_for}; use crate::{EngineError, Result, Session}; pub static COMMANDS: &[CommandSpec] = &[ @@ -40,15 +42,19 @@ pub static COMMANDS: &[CommandSpec] = &[ .at("SOLID", "INSERT") .icon("import") .params("path: .3mf, .stl, .obj, .ply (with faces), .glb or .gltf file (its meshes join the design as mesh bodies in a new component named after the file → component, component_name, occurrence; a glTF file's node tree becomes nested components held as one rigid group until component.unlock, a mesh placed again another occurrence, its materials the bodies' appearances, and its metres millimetres); name?; up?: z|y for a glTF file (default y: glTF has Y up, so the import's component is turned a quarter turn about X, Y becoming Z → stand_up: its occurrence; z: the file's axes are kept); units?: mm|cm|m|in|ft for an STL or OBJ file, or a PLY file with faces (default mm): the unit its coordinates are in, scaled to millimetres as the file is read (a 3MF or glTF file states its own). The design keeps the millimetre mesh and not the unit, so insert the file again to try another; origin?: bool (default false: the mesh keeps its file's coordinates; true: once read, scaled and stood up, the import's occurrence is moved so the box around its bodies is centred on X and Y of the active component with its lowest point on Z = 0 → moved_to_origin: [x, y, z], the shift made)"), - CommandSpec::new("file.save", "Save", save) + CommandSpec::new("file.save", "Save", crate::checked!("file.save", save)) .icon("save") .key("Ctrl+S") .noundo() + .contract(&SAVE_CONTRACT) + .output(output_schema_for::) .params("path? (default: current file; a name that opens as another kind of file, such as .step, .stl or .dxf, is refused: file.export writes those); format?: container|json (default: json for .json, otherwise container); compression?: fast|compact (default: fast); cache?: bool (the evaluated model, so the design opens without rebuilding; default: true); preview?: bool (saved display meshes, default: false); overwrite?: bool (replace the design's file even though another program or computer changed it since it was opened or saved; without it that save is refused)"), - CommandSpec::new("file.save_as", "Save As", save_as) + CommandSpec::new("file.save_as", "Save As", crate::checked!("file.save_as", save_as)) .icon("save") .key("Ctrl+Shift+S") .noundo() + .contract(&SAVE_AS_CONTRACT) + .output(output_schema_for::) .params("path (a design file name, .sc as a rule; one that opens as another kind of file, such as .step, .stl or .dxf, is refused: file.export writes those); format?: container|json (default: json for .json, otherwise container); compression?: fast|compact (default: fast); cache?: bool (the evaluated model, so the design opens without rebuilding; default: true); preview?: bool (saved display meshes, default: false); overwrite?: bool (as file.save, when `path` is the design's own file)"), CommandSpec::new("doc.recovery_list", "Recoverable Designs", recovery_list).icon("restore") .noundo() @@ -122,6 +128,8 @@ fn new_doc(s: &mut Session, p: &Value) -> Result { Ok(json!({"name": name})) } +const SAVE_CONTRACT: TypedContract = TypedContract::new(); +const SAVE_AS_CONTRACT: TypedContract = TypedContract::new(); const EXPORT_STEP_CONTRACT: crate::schema::TypedContract = crate::schema::TypedContract::new(); const EXPORT_STL_CONTRACT: crate::schema::TypedContract = crate::schema::TypedContract::new(); const EXPORT_3MF_CONTRACT: crate::schema::TypedContract = crate::schema::TypedContract::new(); @@ -682,7 +690,15 @@ fn write_bytes( s.disk = solidcraft_io::design_lock::stamp(path); s.read_only = false; s.mark_saved(); - let mut out = json!({"path": path, "bytes": bytes.len(), "name": s.doc.name}); + let mut out = SaveResult { + path: path.to_string(), + bytes: bytes.len(), + name: s.doc.name.clone(), + kept_format: None, + warnings: None, + not_kept: None, + param_warnings: Vec::new(), + }; // A newer SolidCraft's file keeps what this version can't read, and its format number. What // couldn't go back, because the design was changed around it, is said. if s.doc.newer_file.is_some() { @@ -690,13 +706,13 @@ fn write_bytes( if format == "json" && s.doc.newer_file.as_ref().is_some_and(|file| file.needs_container()) { lost.push("the parts of the file beside the design, which plain JSON has no room for: save as .sc to keep them".to_string()); } - out["kept_format"] = json!(s.doc.format); + out.kept_format = Some(s.doc.format.clone()); if !lost.is_empty() { - out["warnings"] = json!(lost.iter().map(|what| format!("Not kept: {what}. The previous file is `{path}.bak`.")).collect::>()); - out["not_kept"] = json!(lost); + out.warnings = Some(lost.iter().map(|what| format!("Not kept: {what}. The previous file is `{path}.bak`.")).collect()); + out.not_kept = Some(lost); } } - Ok(out) + serde_json::to_value(out).map_err(|e| bad("file.save", e.to_string())) } impl Session { diff --git a/crates/engine/src/schema/mod.rs b/crates/engine/src/schema/mod.rs index 8bfce597340..dbe6a1d25f5 100644 --- a/crates/engine/src/schema/mod.rs +++ b/crates/engine/src/schema/mod.rs @@ -100,6 +100,7 @@ pub mod render_shots; pub mod render_stage; pub mod render_surface_resources; pub mod render_ui; +pub mod save; pub mod section; pub mod sheet; pub mod silhouette; diff --git a/crates/engine/src/schema/save.rs b/crates/engine/src/schema/save.rs new file mode 100644 index 00000000000..dcdecbfbbf0 --- /dev/null +++ b/crates/engine/src/schema/save.rs @@ -0,0 +1,139 @@ +//! Contracts and result types for the commands in `cmd/file.rs` that save the design: +//! `file.save` and `file.save_as` (#13307). +//! +//! The handlers read their parameters from the raw JSON, so each key here reads as its handler +//! reads it. `file.save_as` refuses a missing, blank or over-long `path` with its own message, +//! so there `path` is optional in the type and required in the schema. `format` and +//! `compression` are text in the type: the handler refuses a word it doesn't know, whichever of +//! the two commands was called, with a message that names `file.save` (kept as it is), so the +//! schema lists the words and the handler stays the one to refuse them. Whether the path can be +//! written, or the design has moved or changed on disk, stays the handler's to check. + +use schemars::{JsonSchema, Schema, SchemaGenerator, json_schema}; +use serde::de::Error as _; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_json::Value; + +use super::check::whole; +use super::motion::require; +use super::types::not_blank_pattern; + +/// `file.save_as`' `path` as `path_arg` reads it: text with something in it, under 4096 bytes; +/// anything else, `null` included, is refused with the handler's message. +fn save_as_path<'de, D: Deserializer<'de>>(d: D) -> Result, D::Error> { + match Value::deserialize(d)? { + Value::String(s) if !s.trim().is_empty() && s.len() < 4096 => Ok(Some(s)), + _ => Err(D::Error::custom(whole("`path` is required"))), + } +} + +fn save_as_path_schema(_: &mut SchemaGenerator) -> Schema { + json_schema!({"type": "string", "pattern": not_blank_pattern(), "maxLength": 4095}) +} + +fn path_required(schema: &mut Schema) { + require(schema, "path"); +} + +fn format_schema(_: &mut SchemaGenerator) -> Schema { + json_schema!({"type": "string", "enum": ["container", "json"]}) +} + +fn compression_schema(_: &mut SchemaGenerator) -> Schema { + json_schema!({"type": "string", "enum": ["fast", "compact"]}) +} + +/// Write the design to a file and make that file the design's own: the next `file.save` writes +/// it again. With no `path`, the design's current file is written; a design that has none yet +/// needs a `path`. A name that opens as another kind of file (`.step`, `.stl`, `.dxf` and the +/// like) is refused: `file.export` writes those. Not an undo step. +#[derive(Debug, Deserialize, JsonSchema)] +#[schemars(deny_unknown_fields)] +pub struct SaveParams { + /// The design file to write. Default: the design's current file. A blank value counts as + /// left out. + #[serde(default)] + pub path: Option, + /// container (`.sc`) or json. Default: json for a path ending in `.json`, otherwise + /// container. The handler refuses any other word. + #[serde(default, skip_serializing_if = "Option::is_none")] + #[schemars(schema_with = "format_schema")] + pub format: Option, + /// fast or compact. Default: fast. The handler refuses any other word. + #[serde(default, skip_serializing_if = "Option::is_none")] + #[schemars(schema_with = "compression_schema")] + pub compression: Option, + /// Keep the evaluated model in the file, so the design opens without rebuilding. Default: + /// true. Plain json has no room for it. + #[serde(default)] + pub cache: Option, + /// Keep the display meshes in the file. Default: false. + #[serde(default)] + pub preview: Option, + /// Replace the design's file even though another program or computer changed it since it was + /// opened or saved; without it that save is refused. Only matters when the path is the + /// design's own file. Default: false. + #[serde(default)] + pub overwrite: Option, +} + +/// Write the design to a new file (a design file name, `.sc` as a rule) and make that file the +/// design's own. A name that opens as another kind of file (`.step`, `.stl`, `.dxf` and the like) +/// is refused: `file.export` writes those. A design with no name of its own, or one borrowed from +/// the file it was saved as before, takes the new file's name. Not an undo step. +#[derive(Debug, Deserialize, JsonSchema)] +#[schemars(deny_unknown_fields, transform = path_required)] +pub struct SaveAsParams { + // Optional in the type and required in the schema (`path_required`). + /// The design file to write: text, not blank, under 4096 bytes. + #[serde(default, deserialize_with = "save_as_path", skip_serializing_if = "Option::is_none")] + #[schemars(schema_with = "save_as_path_schema")] + pub path: Option, + /// container (`.sc`) or json. Default: json for a path ending in `.json`, otherwise + /// container. The handler refuses any other word. + #[serde(default, skip_serializing_if = "Option::is_none")] + #[schemars(schema_with = "format_schema")] + pub format: Option, + /// fast or compact. Default: fast. The handler refuses any other word. + #[serde(default, skip_serializing_if = "Option::is_none")] + #[schemars(schema_with = "compression_schema")] + pub compression: Option, + /// Keep the evaluated model in the file, so the design opens without rebuilding. Default: + /// true. Plain json has no room for it. + #[serde(default)] + pub cache: Option, + /// Keep the display meshes in the file. Default: false. + #[serde(default)] + pub preview: Option, + /// As for `file.save`, when `path` is the design's own file: replace it even though another + /// program or computer changed it. Default: false. + #[serde(default)] + pub overwrite: Option, +} + +/// What `file.save` and `file.save_as` return. +#[derive(Debug, Serialize, JsonSchema)] +pub struct SaveResult { + /// The file written. + pub path: String, + /// Its size in bytes. + pub bytes: usize, + /// The design's name once saved (a design with no name of its own takes the file's). + pub name: String, + /// A file a newer SolidCraft saved: the format number it keeps. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub kept_format: Option, + /// A newer file: what could not be kept, in sentences, when something could not. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub warnings: Option>, + /// A newer file: what could not be kept, one item each, when something could not. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub not_kept: Option>, + /// In the warn parameter-check mode: what the call's parameters got wrong. + #[serde(default, skip_serializing_if = "Vec::is_empty")] + pub param_warnings: Vec, +} + +#[cfg(test)] +#[path = "save_tests.rs"] +mod tests; diff --git a/crates/engine/src/schema/save_tests.rs b/crates/engine/src/schema/save_tests.rs new file mode 100644 index 00000000000..1795fd8da3d --- /dev/null +++ b/crates/engine/src/schema/save_tests.rs @@ -0,0 +1,219 @@ +use std::path::PathBuf; + +use serde_json::{Value, json}; + +use super::{SaveAsParams, SaveParams, SaveResult}; +use crate::Session; +use crate::schema::tests::{assert_keys, assert_strict_keeps_todays_errors, conforms}; +use crate::schema::{ParamCheck, input_schema_for, output_schema_for}; + +#[test] +fn schemas_and_the_key_check_agree() { + let keys = ["cache", "compression", "format", "overwrite", "path", "preview"]; + assert_keys(input_schema_for::(), &keys); + assert_keys(input_schema_for::(), &keys); +} + +#[test] +fn strict_keeps_todays_errors() { + assert_strict_keeps_todays_errors(&[ + ("file.save", json!({})), + ("file.save", json!({"path": ""})), + ("file.save", json!({"path": " "})), + ("file.save", json!({"path": null})), + ("file.save_as", json!({})), + ("file.save_as", json!({"path": ""})), + ("file.save_as", json!({"path": " "})), + ("file.save_as", json!({"path": 5})), + ("file.save_as", json!({"path": null})), + ("file.save_as", json!({"path": ["a.sc"]})), + ("file.save_as", json!({"path": "x".repeat(4096)})), + // Words the handler refuses itself, in its own wording (which names `file.save`). + ("file.save_as", json!({"path": "/tmp/solidcraft-save-schema-never.sc", "format": "xml"})), + ("file.save_as", json!({"path": "/tmp/solidcraft-save-schema-never.sc", "compression": "max"})), + ("file.save", json!({"path": "/tmp/solidcraft-save-schema-never.sc", "format": "xml"})), + ("file.save", json!({"path": "/tmp/solidcraft-save-schema-never.sc", "compression": "max"})), + // A name that opens as another kind of file. + ("file.save_as", json!({"path": "/tmp/solidcraft-save-schema-never.step"})), + ("file.save", json!({"path": "/tmp/solidcraft-save-schema-never.stl"})), + ]); +} + +fn parse(v: Value) -> Result { + serde_path_to_error::deserialize::<_, T>(&v).map_err(|e| e.to_string()) +} + +/// The types read each key as the handlers do: `null` is absent, `file.save` takes any text for +/// `path` (blank means the current file) and `file.save_as` takes not-blank text under 4096 +/// bytes, with the handler's message for the rest. +#[test] +fn the_types_read_each_key_as_the_handlers_do() { + let all = json!({"format": "json", "compression": "compact", "cache": false, "preview": true, "overwrite": true}); + for key in ["path", "format", "compression", "cache", "preview", "overwrite"] { + assert!(parse::(json!({ key: null })).is_ok(), "{key}: null reads as left out"); + } + assert!(parse::(json!({})).is_ok()); + assert!(parse::(json!({"path": ""})).is_ok()); + assert!(parse::(json!({"path": "a.sc"})).is_ok()); + let mut with_path = all.clone(); + with_path["path"] = json!("a.sc"); + assert!(parse::(with_path.clone()).is_ok()); + assert!(parse::(with_path).is_ok()); + assert!(parse::(json!({"path": 5})).is_err()); + assert!(parse::(json!({"cache": "yes"})).is_err()); + + assert!(parse::(json!({})).is_ok(), "a missing path is the handler's to refuse"); + assert!(parse::(json!({"path": "x".repeat(4095)})).is_ok()); + for bad in [json!(""), json!(" \t"), json!(7), json!(null), json!(["a"]), json!("x".repeat(4096))] { + assert_eq!(parse::(json!({"path": bad})).err().as_deref().map(|e| e.ends_with("`path` is required")), Some(true), "{bad}"); + } + // The words the handler checks are left to it, in both commands. + assert!(parse::(json!({"path": "a.sc", "format": "xml", "compression": "max"})).is_ok()); +} + +#[test] +fn the_schemas_take_what_the_handlers_read() { + let takes = |schema: schemars::Schema, cases: &[(Value, bool)]| { + let schema = schema.as_value(); + for (p, takes) in cases { + assert_eq!(conforms(schema, schema, p), *takes, "{p}"); + } + }; + takes( + input_schema_for::(), + &[ + (json!({}), true), + (json!({"path": "a.sc", "format": "container", "compression": "fast", "cache": true, "preview": false, "overwrite": false}), true), + (json!({"format": "json", "compression": "compact"}), true), + (json!({"format": "xml"}), false), + (json!({"compression": "max"}), false), + (json!({"cache": 1}), false), + (json!({"path": 1}), false), + ], + ); + takes( + input_schema_for::(), + &[ + (json!({"path": "a.sc"}), true), + (json!({"path": "a.json", "format": "json", "compression": "compact", "cache": false, "preview": true, "overwrite": true}), true), + (json!({}), false), + (json!({"path": "a.sc", "format": "xml"}), false), + ], + ); +} + +/// The `path` pattern is the not-blank one (`conforms` doesn't read patterns), with the length cap. +#[test] +fn save_as_path_schema_is_pinned() { + let schema = input_schema_for::(); + let path = &schema.as_value()["properties"]["path"]; + assert_eq!(path["pattern"], json!(crate::schema::types::not_blank_pattern())); + assert_eq!(path["maxLength"], json!(4095)); + assert_eq!(schema.as_value()["required"], json!(["path"])); + assert!(input_schema_for::().as_value().get("required").is_none()); +} + +/// A misspelt key is reported by the check, with the key it probably meant. +#[test] +fn the_check_names_what_is_wrong() { + let issues = |id: &str, p: Value| crate::schema::issues(id, &p).into_iter().map(|i| i.message).collect::>(); + assert_eq!(issues("file.save", json!({"overwite": true})), ["unknown key `overwite`; did you mean `overwrite`?"]); + assert_eq!(issues("file.save_as", json!({"path": "a.sc", "cache": "no"})), ["`cache` must be true or false"]); + assert_eq!(issues("file.save_as", json!({"path": " "})), ["`path` is required"]); + assert_eq!(issues("file.save", json!({"path": "a.sc", "format": "container"})), Vec::::new()); +} + +fn folder(name: &str) -> PathBuf { + let dir = std::env::temp_dir().join(format!("solidcraft-save-schema-{name}-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(&dir).unwrap_or_else(|e| panic!("{e}")); + dir +} + +fn matches(id: &str, reply: &Value) { + let schema = output_schema_for::(); + let schema = schema.as_value(); + assert!(conforms(schema, schema, reply), "{id}: {reply} doesn't match {schema}"); + assert!(reply.get("param_warnings").is_none(), "{id}: {reply}"); +} + +/// Every form of both commands, in Warn: no `param_warnings`, and each reply matches the output +/// schema and is what the handler returned before (the keys a plain save has, nothing else). +#[test] +fn save_replies_match_the_output_schema() { + let dir = folder("replies"); + let mut s = Session { param_check: ParamCheck::Warn, ..Session::default() }; + let mut run = |id: &str, p: Value| s.execute(id, &p).unwrap_or_else(|e| panic!("{id} {p}: {e}")); + run("solid.box", json!({"length": 10, "width": 20, "height": 5})); + let design = dir.join("part.sc"); + let first = run("file.save_as", json!({"path": design})); + assert_eq!(first["path"], json!(design), "{first}"); + assert!(first["bytes"].as_u64().is_some_and(|b| b > 0) && first["name"] == "part", "{first}"); + let mut keys: Vec<_> = first.as_object().map(|o| o.keys().cloned().collect()).unwrap_or_default(); + keys.sort(); + assert_eq!(keys, ["bytes", "name", "path"], "{first}"); + matches("file.save_as", &first); + matches("file.save", &run("file.save", json!({}))); + matches("file.save", &run("file.save", json!({"path": null, "format": null}))); + matches("file.save", &run("file.save", json!({"path": ""}))); + matches("file.save", &run("file.save", json!({"path": design, "compression": "compact", "cache": false, "preview": true, "overwrite": true}))); + matches("file.save", &run("file.save", json!({"path": design, "format": "container", "compression": "fast"}))); + let json_file = dir.join("part.json"); + matches("file.save_as", &run("file.save_as", json!({"path": json_file}))); + matches("file.save_as", &run("file.save_as", json!({"path": dir.join("other.sc"), "format": "json", "overwrite": false}))); + matches("file.save", &run("file.save", json!({"path": dir.join("again.sc"), "preview": false, "cache": true}))); + + // A misspelt key still runs in Warn, says so, and the reply still matches the schema. + let warned = run("file.save", json!({"path": design, "overwite": true})); + let warnings = warned["param_warnings"].as_array().cloned().unwrap_or_default(); + assert_eq!(warnings.len(), 1, "{warned}"); + assert!(warnings[0].as_str().is_some_and(|w| w.contains("overwite") && w.contains("overwrite")), "{warned}"); + let schema = output_schema_for::(); + assert!(conforms(schema.as_value(), schema.as_value(), &warned), "{warned}"); + let warned = run("file.save_as", json!({"path": design, "compresion": "fast"})); + assert!(warned["param_warnings"].as_array().is_some_and(|w| w.len() == 1), "{warned}"); + // In Strict the same misspelling is refused. + let mut strict = Session { param_check: ParamCheck::Strict, ..Session::default() }; + assert!(strict.execute("file.save_as", &json!({"path": design, "overwite": true})).is_err()); + let _ = std::fs::remove_dir_all(&dir); +} + +/// A file a newer SolidCraft saved keeps its format number: the reply carries it and matches. What +/// could not be kept (`warnings`, `not_kept`) is part of the type, and serializes as the handler +/// has always written it. +#[test] +fn a_newer_files_reply_matches_the_output_schema() { + let dir = folder("newer"); + let mut s = Session { param_check: ParamCheck::Warn, ..Session::default() }; + let run = |s: &mut Session, id: &str, p: Value| s.execute(id, &p).unwrap_or_else(|e| panic!("{id} {p}: {e}")); + run(&mut s, "solid.box", json!({"length": 10, "width": 20, "height": 5})); + let plain = dir.join("plain.json"); + run(&mut s, "file.save_as", json!({"path": plain})); + let mut file: Value = serde_json::from_str(&std::fs::read_to_string(&plain).unwrap_or_default()).unwrap_or_default(); + file["format"] = json!(solidcraft_doc::format::format_string(solidcraft_doc::format::FORMAT + 1)); + file["future_section"] = json!({"anything": [1, 2, 3]}); + file["features"][0]["draft_v2"] = json!({"angle": 3.0}); + let newer = dir.join("newer.json"); + std::fs::write(&newer, file.to_string()).unwrap_or_else(|e| panic!("{e}")); + run(&mut s, "doc.open", json!({"path": newer})); + let saved = run(&mut s, "file.save", json!({})); + assert_eq!(saved["kept_format"], file["format"], "{saved}"); + assert!(saved.get("warnings").is_none() && saved.get("not_kept").is_none(), "{saved}"); + matches("file.save", &saved); + let lost = serde_json::to_value(SaveResult { + path: "a.sc".into(), + bytes: 3, + name: "a".into(), + kept_format: Some("solidcraft/99".into()), + warnings: Some(vec!["Not kept: x. The previous file is `a.sc.bak`.".into()]), + not_kept: Some(vec!["x".into()]), + param_warnings: Vec::new(), + }) + .unwrap_or_default(); + assert_eq!( + lost, + json!({"path": "a.sc", "bytes": 3, "name": "a", "kept_format": "solidcraft/99", "warnings": ["Not kept: x. The previous file is `a.sc.bak`."], "not_kept": ["x"]}) + ); + matches("file.save", &lost); + let _ = std::fs::remove_dir_all(&dir); +} diff --git a/crates/engine/src/schema/unconverted.txt b/crates/engine/src/schema/unconverted.txt index 84dab1e3d6e..7a698542b96 100644 --- a/crates/engine/src/schema/unconverted.txt +++ b/crates/engine/src/schema/unconverted.txt @@ -11,8 +11,6 @@ file.export file.insert_mesh file.insert_step file.new -file.save -file.save_as file.save_mesh file.slicers joint.sweep