mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-21 18:10:42 -04:00
FIX: Modules were attempting to conver std imports into absolute paths.
This commit is contained in:
parent
5b05405618
commit
e838554fff
@ -2,6 +2,11 @@ let test_empty_mod = module {
|
||||
} => {
|
||||
};
|
||||
|
||||
let std_lib_import = module {
|
||||
} => {
|
||||
let tpl = import "std/tuples.ucg";
|
||||
};
|
||||
|
||||
let empty_mod_instance = test_empty_mod{};
|
||||
|
||||
let test_simple_mod = module {
|
||||
|
@ -545,6 +545,10 @@ impl ModuleDef {
|
||||
}
|
||||
if let Expression::Import(ref mut def) = e {
|
||||
let path = PathBuf::from(&def.path.fragment);
|
||||
// std/ paths are special and do not get made into absolute paths.
|
||||
if path.starts_with("std/") {
|
||||
return;
|
||||
}
|
||||
if path.is_relative() {
|
||||
def.path.fragment = base
|
||||
.join(path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user