Add module loader and related tests
Introduce `ModuleLoader` to handle `#use` directives and dependency resolution. This involves adding `tempfile` dependency, modifying `Cargo.toml` and `Cargo.lock`, creating a new `module_loader.rs` file, and updating `environment.rs` to use the new module. Also, add comprehensive tests for `Diagnostics::format_errors`, `CompilationResult`, and the new `ModuleLoader` functionality. These tests cover various scenarios including empty diagnostics, multiple errors, error formatting, compilation success/failure, and complex dependency loading with topological ordering and search path resolution.
This commit is contained in:
@@ -16,3 +16,4 @@ serde = { version = "1", features = ["derive"] }
|
||||
|
||||
[dev-dependencies]
|
||||
insta = { version = "1.39", features = ["yaml"] }
|
||||
tempfile = "3"
|
||||
|
||||
Reference in New Issue
Block a user