Skip to main content

max / quasi

Suffix the template manifests, so a git consumer does not read them `[workspace] exclude` keeps this repo's own build away from them and stops there. A consumer taking quasi as a git dependency gets the whole checkout and cargo scans it for manifests, so four files named Cargo.toml holding `{{name}}-core` printed three parse errors on every build of every generated app, from a path inside ~/.cargo/git/checkouts that names neither repo. Found by generating outside ~/Code, where the [patch] block does not apply and the crates resolve from makenot.work — which is the only place the fault was visible, since a path dependency in this repo is covered by the exclude.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-08-09 19:26 UTC
Signed with PGP, not checked
Commit: 1a12db91ce19319627d89f920eed389a52208a68
Parent: 5960f0a
5 files changed, +15 insertions, -4 deletions
@@ -6,6 +6,17 @@
6 6 //! review as the code it is. The workspace excludes the directory, since those
7 7 //! manifests name a crate that does not exist until a name is filled in.
8 8 //!
9 + //! # Why the manifests carry a `.tmpl` suffix and nothing else does
10 + //!
11 + //! `[workspace] exclude` keeps this repo's own build away from them, and it is
12 + //! not enough. A consumer taking quasi as a git dependency gets the whole
13 + //! checkout, and cargo scans it for manifests: four files named `Cargo.toml`
14 + //! holding `{{name}}-core` meant three parse errors printed on every build of
15 + //! every generated app, from a path inside `~/.cargo/git/checkouts`. Suffixing
16 + //! them is what stops a file that is not yet a manifest from looking like one.
17 + //! Nothing else in the template needs it, because nothing else is a file cargo
18 + //! goes looking for by name.
19 + //!
9 20 //! Adding a file to the template means adding a line here. That is deliberate:
10 21 //! walking the directory at build time would make a file that is present but
11 22 //! unlisted silently ship, and a missing `include_str!` is a compile error.
@@ -32,7 +43,7 @@
32 43 pub static FILES: &[Entry] = &[
33 44 Entry {
34 45 path: "Cargo.toml",
35 - body: Body::Text(include_str!("../template/Cargo.toml")),
46 + body: Body::Text(include_str!("../template/Cargo.toml.tmpl")),
36 47 },
37 48 Entry {
38 49 path: "README.md",
@@ -85,7 +96,7 @@
85 96 },
86 97 Entry {
87 98 path: "crates/{{name}}-core/Cargo.toml",
88 - body: Body::Text(include_str!("../template/crates/core/Cargo.toml")),
99 + body: Body::Text(include_str!("../template/crates/core/Cargo.toml.tmpl")),
89 100 },
90 101 Entry {
91 102 path: "crates/{{name}}-core/build.rs",
@@ -117,7 +128,7 @@
117 128 },
118 129 Entry {
119 130 path: "crates/{{name}}-desktop/Cargo.toml",
120 - body: Body::Text(include_str!("../template/crates/desktop/Cargo.toml")),
131 + body: Body::Text(include_str!("../template/crates/desktop/Cargo.toml.tmpl")),
121 132 },
122 133 Entry {
123 134 path: "crates/{{name}}-desktop/build.rs",
@@ -140,7 +151,7 @@
140 151 },
141 152 Entry {
142 153 path: "crates/{{name}}-server/Cargo.toml",
143 - body: Body::Text(include_str!("../template/crates/server/Cargo.toml")),
154 + body: Body::Text(include_str!("../template/crates/server/Cargo.toml.tmpl")),
144 155 },
145 156 Entry {
146 157 path: "crates/{{name}}-server/src/main.rs",