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

+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());