E-CHANNEL-008
The same channel name is imported from two different source files.
Verified behaviour, 2026-07-26 against v0.7.1. This code appears to be shadowed: importing the same channel name from two files is rejected by the module system as E-IMPORT-004 before the channel-specific check runs, including with as aliasing. The probe below produces E-IMPORT-004. The guidance above still holds — the fix is the same — but expect the import diagnostic, not this one. Reported upstream.
What it means
Cross-file channel imports must have distinct name= values. The channel name is the WebSocket wire name, so two channels sharing it from different source files would collide on the same route — messages for one would be delivered to the other.
Minimal reproducer
This is the exact source compiled against the linked compiler to establish the behaviour described above. Read the callout at the top of this page before using it — it does not produce E-CHANNEL-008.
app.scrml
<program title="p">
import { chat as roomA } from "./a.scrml"
import { chat as roomB } from "./b.scrml"
<p>x</p>
</>
a.scrml
<channel name="chat">
<messages> = []
</>
b.scrml
<channel name="chat">
<messages> = []
</>
How to fix
-
Rename the channel in one source file.
The
name=attribute is the wire identity; make it unique per channel. - Import only one of them. If the two channels are meant to be the same channel, they should be one declaration.
Related
Specification
Normative text: §38.2, §38.12.2, §38.12.7, §38.12.8, §34. Spec lives at compiler/SPEC.md .