✓
Passing Passing: the compiler rejects this program as expected.
Code
// Pins that `koru` is a DEFAULT import alias, needing no koru.json and no
// `std/compiler:paths` declaration — the same standing `std` and `app` have.
//
// The distinction this guards is between an alias that is UNDEFINED and a module
// that is ABSENT. Importing a module that does not exist under a known alias is
// KORU002 (module not found). Importing under an alias nobody declared is
// PARSE003 (unknown import alias). Before `koru` was defaulted, every program
// using the ecosystem's libraries got PARSE003 unless it carried a config file
// naming a directory — boilerplate repeated by every consumer and owned by none.
//
// Deliberately importing a module that cannot exist, so the test says the same
// thing whether or not koru-libs is installed on the machine running it: absent
// or present, a nonexistent module under a known alias is KORU002. A test that
// resolved a real library would pass here and fail on a machine without the
// sibling checkout.
import koru/definitely-not-a-real-module-xyz
tor main {}
main -> _
Actual compiler output
error[KORU002]: module not found: 'koru/definitely-not-a-real-module-xyz'
--> tests/regression/100_MODULE_SYSTEM/110_IMPORTS/110_029_koru_alias_is_a_default/input.k:17:1
|
17 | import koru/definitely-not-a-real-module-xyz
| ^
hint: check the import path, the aliases declared by std/compiler:paths, and KORU_STDLIB/KORU_PATH environment variablesMust fail at frontend compile:
Parsing or type-checking must reject the program.
Error output must contain
module not found: 'koru/definitely-not-a-real-module-xyz'Test Configuration
MUST_ERROR