Concrete
Rulesworkspace

concrete/workspace/unportable-name

A source file name, the template key, a section key or a fixture id would not name the same file on Windows and macOS: two differ only by case or Unicode form, or one is a reserved device name (`con`, `nul`, `com1`…), ends in a dot or a space, or carries a character Windows refuses in a file name (`:`, `\`, `?`, `*`, a control character…). A key or id must also be NFC.

A source file name, the template key, a section key or a fixture id would not name the same file on Windows and macOS: two differ only by case or Unicode form, or one is a reserved device name (con, nul, com1…), ends in a dot or a space, or carries a character Windows refuses in a file name (:, \, ?, *, a control character…). A key or id must also be NFC.

Graded by the workspace stage of concrete check, in the tree venue. A violation reports this id and the file it failed at — see every rule and concrete check.

Reason

A template is built on one machine and edited on others, and a name is only safe if it names the same file on all of them. Linux accepts almost any name; Windows and macOS ignore case, so "Home" and "home" are one file there; Windows reserves device names such as CON and NUL whatever the extension, strips a trailing dot or space, and refuses :, \, ?, * and control characters; macOS holds an accented name's composed and decomposed Unicode spellings as one file, where Linux and git keep them apart. A section key, a fixture id and the template key become directories of the artifact, and every source file feeds the workspace's version, so any of these names can make the same template write, publish or version differently depending on where it was built. A key or an id is also held to the composed spelling, since nothing normalizes your own strings; a source file's spelling is not, since macOS can list a composed file decomposed and the version records every path composed anyway.

No type catches this, and the machine that would notice is rarely the one you run concrete check on, so only concrete check grades it, identically on every OS. concrete build grades every path it derives before it writes anything, and concrete publish grades the assembled artifact's paths again, which catches names derived from yours: two identical images named Hero.png and hero.png in different folders become two asset names one letter apart.

Fix

Rename what the finding names. For a pair that differs only by case, rename one so the two differ in letters, not in capitals; for two files whose names differ only in how an accent is encoded, delete one. Retype an accented key or id, or spell it without the accent. Anything else — a device name, a trailing dot or space, a refused character — rename to letters, digits, hyphens, underscores and dots.

Before and after

my-template/
  sections/hero/section.tsx     key: "hero"
  sections/banner/section.tsx   key: "Hero"
  fixtures/full.json            fixture id `full`
  fixtures/Full.json            fixture id `Full`
  notes/aux.md
  notes/draft v2.
  media/café.jpg                twice: once composed, once decomposed
my-template/
  sections/hero/section.tsx     key: "hero"
  sections/banner/section.tsx   key: "banner"
  fixtures/full.json            fixture id `full`
  fixtures/full-sparse.json     fixture id `full-sparse`
  notes/auxiliary.md
  notes/draft-v2.md
  media/café.jpg

On this page