RX0166

Domain: Parsing

Error message

an import, and the project is the namespace: %s (%s)

In the message, %s marks a value that the engine fills in when it raises the error.

The story

You wrote an import, and rush told you there is no such thing. That is not a missing feature, it is a design choice. In rush, the project is the namespace. Every rush file at or under the folder holding the manifest is loaded together into one shared symbol space, on every run. So there is nothing to import, include, require, or use. No loader, either. Everything is already reachable. To call a function from another file, write its dotted module path, like lib dot validators dot check dot cpf. To call a public function from another project, begin with that project's name. Think of a city where every street is already on one map: you do not need to import the street before walking down it. The engine refuses the statement at parse, and explains why in the message, quoting the line you wrote. The fix: delete the import line and call the function by its full dotted name. One less thing to maintain, and one less place for things to go out of sync.

Text from the Rush engine's error catalogue.