Rename SolveCraft to SolidCraft everywhere, with compatibility shims (#389)

* WIP deep rename (not for push)

* WIP2

* WIP3

* WIP4 wxs fix

* rustfmt

* Rename the remaining identifiers in merged crash-report code

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RjGw4gA5ZvKrU8MQP6sBgT

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
This commit is contained in:
bherbruckandClaude Opus 5.5 authored and GitHub committed 2026-10-12 17:17:01 -04:00
1 parent 27415e4dd7
commit 296683229d
464 files changed
+3408 -2956

No files matched your search

+8 -8
View File
@@ -1,8 +1,8 @@
//! `cargo xtask book`: generate the book's command reference and screenshots, then build it.
//!
//! The command reference (`docs/book/src/reference/commands.md`) comes from
//! `solvecraft-cli commands`, so it can't drift from the registry. The screenshots in
//! `docs/book/src/generated/` are CPU renders by `solvecraft-cli snapshot` of `examples/*.json`
//! `solidcraft-cli commands`, so it can't drift from the registry. The screenshots in
//! `docs/book/src/generated/` are CPU renders by `solidcraft-cli snapshot` of `examples/*.json`
//! and `docs/book/scripts/*.json`, plus the app screenshot from `docs/screenshots/`. Both are
//! gitignored and attributed in ATTRIBUTION.md. The book itself is built by `mdbook` (a separate
//! tool, not a dependency) into `target/book`.
@@ -23,9 +23,9 @@ pub fn run(root: &Path, build: bool) -> Result<(), String> {
c.args(["build", "-q", "--release", "-p", "solidcraft-cli"]);
crate::run(c, "cargo build -p solidcraft-cli")?;
let out = cli().arg("commands").output().map_err(|e| format!("solvecraft-cli: {e}"))?;
let out = cli().arg("commands").output().map_err(|e| format!("solidcraft-cli: {e}"))?;
if !out.status.success() {
return Err(format!("solvecraft-cli commands failed:\n{}", String::from_utf8_lossy(&out.stderr)));
return Err(format!("solidcraft-cli commands failed:\n{}", String::from_utf8_lossy(&out.stderr)));
}
let cmds: Value = serde_json::from_slice(&out.stdout).map_err(|e| format!("commands JSON: {e}"))?;
let md = reference(cmds.as_array().map(Vec::as_slice).unwrap_or_default());
@@ -40,7 +40,7 @@ pub fn run(root: &Path, build: bool) -> Result<(), String> {
let png = gen_dir.join(format!("{stem}.png"));
let mut c = cli();
c.arg("snapshot").arg(s).arg("--out").arg(&png).args(["--width", SNAPSHOT_SIZE.0, "--height", SNAPSHOT_SIZE.1]);
let o = c.output().map_err(|e| format!("solvecraft-cli snapshot: {e}"))?;
let o = c.output().map_err(|e| format!("solidcraft-cli snapshot: {e}"))?;
if !o.status.success() {
return Err(format!("snapshot of {} failed:\n{}", s.display(), String::from_utf8_lossy(&o.stderr)));
}
@@ -58,7 +58,7 @@ pub fn run(root: &Path, build: bool) -> Result<(), String> {
Ok(())
}
/// The release solvecraft-cli just built.
/// The release solidcraft-cli just built.
fn cli() -> std::process::Command {
let mut c = cargo();
c.args(["run", "-q", "--release", "-p", "solidcraft-cli", "--"]);
@@ -83,8 +83,8 @@ fn json_files(dir: &Path) -> Result<Vec<std::path::PathBuf>, String> {
fn reference(cmds: &[Value]) -> String {
let s = |c: &Value, k: &str| c[k].as_str().unwrap_or_default().to_string();
let mut md = format!(
"# Command reference\n\nGenerated by `cargo xtask book` from `solvecraft-cli commands` ({} commands). Every command runs the same \
way from the toolbar, a script, `solvecraft-cli exec <id> '<json>'`, the control channel and MCP. Parameters marked `?` are \
"# Command reference\n\nGenerated by `cargo xtask book` from `solidcraft-cli commands` ({} commands). Every command runs the same \
way from the toolbar, a script, `solidcraft-cli exec <id> '<json>'`, the control channel and MCP. Parameters marked `?` are \
optional; `expr` is a number or an expression with units.\n",
cmds.len()
);
+5 -5
View File
@@ -2,7 +2,7 @@
//!
//! The page lists every registered command by area (the first part of its dotted id), with its
//! label, id and toolbar place. It comes only from SolidCraft's command registry
//! (`solvecraft-cli commands`), so it can't drift from what the program does; it compares with
//! (`solidcraft-cli commands`), so it can't drift from what the program does; it compares with
//! nothing else.
use std::path::Path;
@@ -32,9 +32,9 @@ pub fn run(root: &Path) -> Result<(), String> {
let out = crate::cargo()
.args(["run", "-q", "--release", "-p", "solidcraft-cli", "--", "commands"])
.output()
.map_err(|e| format!("solvecraft-cli: {e}"))?;
.map_err(|e| format!("solidcraft-cli: {e}"))?;
if !out.status.success() {
return Err(format!("solvecraft-cli commands failed:\n{}", String::from_utf8_lossy(&out.stderr)));
return Err(format!("solidcraft-cli commands failed:\n{}", String::from_utf8_lossy(&out.stderr)));
}
let cmds: Value = serde_json::from_slice(&out.stdout).map_err(|e| format!("commands JSON: {e}"))?;
let list = cmds.as_array().map(Vec::as_slice).unwrap_or_default();
@@ -61,8 +61,8 @@ pub fn page(cmds: &[Value]) -> String {
}
let mut md = format!(
"# Features\n\nSolidCraft's commands by area, generated by `cargo xtask features` from the command registry \
(`solvecraft-cli commands`). **{} commands.** Every command runs the same way from the toolbar, a script, \
`solvecraft-cli exec <id> '<json>'`, the control channel and MCP; parameters are in the \
(`solidcraft-cli commands`). **{} commands.** Every command runs the same way from the toolbar, a script, \
`solidcraft-cli exec <id> '<json>'`, the control channel and MCP; parameters are in the \
[command reference](book/src/reference/commands.md) (`cargo xtask book`). Status and plans: [ROADMAP](../ROADMAP.md).\n",
cmds.len()
);
+26 -26
View File
@@ -32,7 +32,7 @@ impl Class {
}
}
/// The layering table. Names are package names without the `solvecraft-`
/// The layering table. Names are package names without the `solidcraft-`
/// prefix.
pub const TABLE: &[(&str, Class)] = &[
("geom", Class::Layer(0)),
@@ -47,7 +47,7 @@ pub const TABLE: &[(&str, Class)] = &[
("testkit", Class::Testkit),
// apps and tooling
("solidcraft", Class::Exempt),
("solidcraft-cli", Class::Exempt),
("cli", Class::Exempt),
("web", Class::Exempt),
("xtask", Class::Exempt),
];
@@ -71,7 +71,7 @@ pub const UI_CRATES: &[&str] = &["egui", "eframe", "egui-wgpu", "wgpu", "winit",
pub const UI_MIN_LAYER: u8 = 5;
pub fn short_name(pkg: &str) -> &str {
pkg.strip_prefix("solvecraft-").unwrap_or(pkg)
pkg.strip_prefix("solidcraft-").unwrap_or(pkg)
}
pub fn classify(pkg: &str) -> Option<Class> {
@@ -129,7 +129,7 @@ impl std::fmt::Display for Violation {
write!(f, "{krate}: standalone crate must not depend on workspace crate {dep}")
}
Violation::TestkitAsNormalDep { krate } => {
write!(f, "{krate}: solvecraft-testkit may only be a dev-dependency")
write!(f, "{krate}: solidcraft-testkit may only be a dev-dependency")
}
Violation::UiBelowL5 { krate, dep, layer } => {
write!(f, "{krate} (L{layer}) depends on UI crate `{dep}`; UI toolkits are only allowed in L5+")
@@ -236,67 +236,67 @@ mod tests {
#[test]
fn clean_downward_graph_passes() {
let g = [
c("solvecraft-geom", &[("kurbo", Normal, false)]),
c("solvecraft-doc", &[("solvecraft-geom", Normal, true)]),
c("solvecraft-engine", &[("solvecraft-doc", Normal, true), ("solvecraft-testkit", Dev, true)]),
c("solvecraft-ui-egui", &[("solvecraft-engine", Normal, true), ("egui", Normal, false)]),
c("solidcraft-cli", &[("solvecraft-ui-egui", Normal, true)]),
c("solidcraft-geom", &[("kurbo", Normal, false)]),
c("solidcraft-doc", &[("solidcraft-geom", Normal, true)]),
c("solidcraft-engine", &[("solidcraft-doc", Normal, true), ("solidcraft-testkit", Dev, true)]),
c("solidcraft-ui-egui", &[("solidcraft-engine", Normal, true), ("egui", Normal, false)]),
c("solidcraft-cli", &[("solidcraft-ui-egui", Normal, true)]),
];
assert!(check(&g).is_empty(), "{:?}", check(&g));
}
#[test]
fn upward_dependency_flagged() {
let v = check(&[c("solvecraft-doc", &[("solvecraft-engine", Normal, true)])]);
let v = check(&[c("solidcraft-doc", &[("solidcraft-engine", Normal, true)])]);
assert!(matches!(v[..], [Violation::Upward { from: 2, to: 4, .. }]));
}
#[test]
fn sideways_dependency_flagged() {
let v = check(&[c("solvecraft-kernel", &[("solvecraft-sketch", Normal, true)])]);
let v = check(&[c("solidcraft-kernel", &[("solidcraft-sketch", Normal, true)])]);
assert!(matches!(v[..], [Violation::Upward { from: 1, to: 1, .. }]));
}
#[test]
fn self_dev_dependency_ignored() {
assert!(check(&[c("solvecraft-doc", &[("solvecraft-doc", Dev, true)])]).is_empty());
assert!(check(&[c("solidcraft-doc", &[("solidcraft-doc", Dev, true)])]).is_empty());
}
#[test]
fn upward_dev_dependency_flagged() {
let v = check(&[c("solvecraft-geom", &[("solvecraft-doc", Dev, true)])]);
let v = check(&[c("solidcraft-geom", &[("solidcraft-doc", Dev, true)])]);
assert!(matches!(v[..], [Violation::Upward { kind: Dev, .. }]));
}
#[test]
fn ui_crates_below_l6_flagged() {
for dep in ["egui", "eframe", "winit", "egui_kittest", "rfd", "bevy_ecs", "bevy"] {
let v = check(&[c("solvecraft-engine", &[(dep, Normal, false)])]);
let v = check(&[c("solidcraft-engine", &[(dep, Normal, false)])]);
assert!(matches!(v[..], [Violation::UiBelowL5 { layer: 4, .. }]), "{dep}");
}
assert!(check(&[c("solvecraft-engine", &[("egui_extras_not", Normal, false)])]).is_empty());
assert!(check(&[c("solvecraft-ui-egui", &[("winit", Normal, false)])]).is_empty());
assert!(check(&[c("solidcraft-engine", &[("egui_extras_not", Normal, false)])]).is_empty());
assert!(check(&[c("solidcraft-ui-egui", &[("winit", Normal, false)])]).is_empty());
}
#[test]
fn unregistered_crate_is_error() {
let v = check(&[c("solvecraft-mystery", &[])]);
assert!(matches!(&v[..], [Violation::Unregistered { krate }] if krate == "solvecraft-mystery"));
let v = check(&[c("solidcraft-mystery", &[])]);
assert!(matches!(&v[..], [Violation::Unregistered { krate }] if krate == "solidcraft-mystery"));
assert!(v[0].to_string().contains("register"));
}
#[test]
fn testkit_only_as_dev_dependency() {
let v = check(&[c("solvecraft-doc", &[("solvecraft-testkit", Normal, true)])]);
let v = check(&[c("solidcraft-doc", &[("solidcraft-testkit", Normal, true)])]);
assert!(matches!(v[..], [Violation::TestkitAsNormalDep { .. }]));
assert!(check(&[c("solvecraft-doc", &[("solvecraft-testkit", Dev, true)])]).is_empty());
assert!(check(&[c("solvecraft-testkit", &[("solvecraft-engine", Normal, true)])]).is_empty());
assert!(check(&[c("solidcraft-doc", &[("solidcraft-testkit", Dev, true)])]).is_empty());
assert!(check(&[c("solidcraft-testkit", &[("solidcraft-engine", Normal, true)])]).is_empty());
}
#[test]
fn apps_and_xtask_exempt() {
for app in ["solidcraft", "solidcraft-cli", "xtask"] {
assert!(check(&[c(app, &[("egui", Normal, false), ("solvecraft-ui-egui", Normal, true)])]).is_empty());
assert!(check(&[c(app, &[("egui", Normal, false), ("solidcraft-ui-egui", Normal, true)])]).is_empty());
}
}
@@ -304,17 +304,17 @@ mod tests {
fn metadata_parsing() {
let meta: Value = serde_json::from_str(
r#"{"packages":[
{"name":"solvecraft-doc","dependencies":[
{"name":"solvecraft-geom","kind":null,"path":"/x/crates/geom"},
{"name":"solidcraft-doc","dependencies":[
{"name":"solidcraft-geom","kind":null,"path":"/x/crates/geom"},
{"name":"serde","kind":null},
{"name":"proptest","kind":"dev"}]},
{"name":"solvecraft-geom","dependencies":[]}
{"name":"solidcraft-geom","dependencies":[]}
]}"#,
)
.unwrap();
let g = from_metadata(&meta).unwrap();
assert_eq!(g.len(), 2);
let doc = g.iter().find(|c| c.name == "solvecraft-doc").unwrap();
let doc = g.iter().find(|c| c.name == "solidcraft-doc").unwrap();
assert!(doc.deps[0].workspace && !doc.deps[1].workspace);
assert_eq!(doc.deps[2].kind, Dev);
assert!(check(&g).is_empty());
+6 -6
View File
@@ -1,7 +1,7 @@
//! `cargo xtask licences [--check]`: THIRD-PARTY-LICENSES.txt, the licences of every crate built
//! into the shipped programs (solvecraft, solvecraft-cli, solvecraft-web), read from
//! into the shipped programs (solidcraft, solidcraft-cli, solidcraft-web), read from
//! `cargo metadata` and the crates' own licence files. The programs embed it (Help ▸ About ▸
//! Licences, `solvecraft-cli licences`), so a release download needs no licence files beside it.
//! Licences, `solidcraft-cli licences`), so a release download needs no licence files beside it.
//! `--check` (part of `cargo xtask ci`) fails when the committed file is out of date, e.g. after a
//! dependency changed.
@@ -13,7 +13,7 @@ use serde_json::Value;
use crate::cargo;
pub const FILE: &str = "THIRD-PARTY-LICENSES.txt";
const ROOTS: &[&str] = &["solidcraft", "solidcraft-cli", "solvecraft-web"];
const ROOTS: &[&str] = &["solidcraft", "solidcraft-cli", "solidcraft-web"];
pub fn run(root: &Path, check: bool) -> Result<(), String> {
let text = generate(root)?;
@@ -119,7 +119,7 @@ fn licence_files(dir: &Path, p: &Value) -> Vec<(String, String)> {
fn render(root: &Path, crates: &[Crate]) -> String {
let rule = "=".repeat(80);
let mut out = format!(
"Third-party software in SolidCraft\n\nSolidCraft (the desktop app, solvecraft-cli and the web app) is built from the {} crates below.\n\
"Third-party software in SolidCraft\n\nSolidCraft (the desktop app, solidcraft-cli and the web app) is built from the {} crates below.\n\
Generated by `cargo xtask licences` from Cargo.lock and the crates' own licence files.\n\
SolidCraft's own licence is in LICENSE-MIT and LICENSE-APACHE, and NOTICE.\n\n",
crates.len()
@@ -165,11 +165,11 @@ fn render(root: &Path, crates: &[Crate]) -> String {
- LiberationSans-Regular.ttf (crates/sketch/fonts/LiberationSans-Regular.ttf)\n \
Copyright 2012 Red Hat, Inc. (Liberation Fonts 2.x; digitized data Google)\n \
Source: https://github.com/liberationfonts\n\n\
- BIZUDPGothic-Regular.ttf (apps/solvecraft-web/fonts/BIZUDPGothic-Regular.ttf)\n \
- BIZUDPGothic-Regular.ttf (apps/solidcraft-web/fonts/BIZUDPGothic-Regular.ttf)\n \
Copyright 2022 The BIZ UDGothic Project Authors (https://github.com/googlefonts/morisawa-biz-ud-mincho)\n \
Source: https://github.com/googlefonts/morisawa-biz-ud-gothic\n\n"
);
let ofl_path = root.join("apps/solvecraft-web/fonts/OFL.txt");
let ofl_path = root.join("apps/solidcraft-web/fonts/OFL.txt");
let fallback_path = root.join("crates/sketch/fonts/OFL.txt");
let ofl_text = std::fs::read_to_string(&ofl_path).or_else(|_| std::fs::read_to_string(&fallback_path)).unwrap_or_default();
let ofl_clean = ofl_text.replace("\r\n", "\n").trim().to_string();
+3 -3
View File
@@ -22,7 +22,7 @@ commands:
features list SolidCraft's commands by area in docs/features.md (from the registry)
oracle [--cli BIN]
replay the reference tests (tests/oracle/*/recipe.json), compare with each
case's expected.json and write docs/oracle.md (--cli: a solvecraft-cli
case's expected.json and write docs/oracle.md (--cli: a solidcraft-cli
already built, instead of cargo run --release)
book [--no-build]
generate docs/book's command reference and screenshots, then mdbook build
@@ -173,7 +173,7 @@ fn cmd_oracle(cli: Option<&str>) -> Result<(), String> {
for c in &cases {
cmd.arg(c.strip_prefix(root()).unwrap_or(c));
}
let out = cmd.output().map_err(|e| format!("solvecraft-cli: {e}"))?;
let out = cmd.output().map_err(|e| format!("solidcraft-cli: {e}"))?;
let results: serde_json::Value =
serde_json::from_slice(&out.stdout).map_err(|e| format!("oracle JSON: {e}\n{}", String::from_utf8_lossy(&out.stderr)))?;
let list = results.as_array().cloned().unwrap_or_default();
@@ -275,7 +275,7 @@ fn wasm_check() -> Result<(Command, usize), String> {
let crates = layers::from_metadata(&metadata()?)?;
let mut set: Vec<String> =
crates.iter().filter(|c| matches!(layers::classify(&c.name), Some(layers::Class::Layer(_)))).map(|c| c.name.clone()).collect();
set.push("solvecraft-web".into());
set.push("solidcraft-web".into());
let mut c = cargo();
c.args(["check", "--target", "wasm32-unknown-unknown", "--profile", "ci"]);
for p in &set {