fix(lang): 0.R4 - ludic.ui's UiAct is its own, and a name that meets a package's export says whose it is

A game's exported UiAct collided with ludic.ui's, which nothing outside ludic.ui uses: it is private
to ludic.ui now, and a private record of one spelling in two modules never clashed. A real clash - a
type named like one a package exports - is still refused, and the message names the package and the
way out (`ludic_ui exports it, and exported names are one namespace - rename this one, or declare it
without export inside a module of your own`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-26 06:57:35 +03:00
parent eb1e780733
commit d46f0adb5e
10 changed files with 1095 additions and 879 deletions

View file

@ -119,7 +119,10 @@ show.
The same holds for a `property` and an `event`: `fishing` and `hunting` may each have a private
`Catch` record and a private `Landed` event with different fields, and each module's types, `new`,
`emit` and `@On` reach its own (compiled as `Catch__fishing`). Two exported ones of one spelling are
refused (`'Catch' is defined twice`, `event 'Landed' is defined twice`). Three kinds of record stay
refused (`'Catch' is defined twice`, `event 'Landed' is defined twice`). When one of the two is a package's export the message
says so (`'UiNode' is defined twice (...): ludic_ui exports it, and exported names are one namespace -
rename this one, or declare it without export inside a module of your own`); a package exports only
what a program uses, so ludic.ui's `UiAct` is its own and a game's may take the name. Three kinds of record stay
one namespace, because other code names them by spelling: a generic record, a property that is an
entity's component (a `model` names it), and the record a component or a view generates.