mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -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 empty_mod_instance = test_empty_mod{};
|
||||||
|
|
||||||
let test_simple_mod = module {
|
let test_simple_mod = module {
|
||||||
|
@ -545,6 +545,10 @@ impl ModuleDef {
|
|||||||
}
|
}
|
||||||
if let Expression::Import(ref mut def) = e {
|
if let Expression::Import(ref mut def) = e {
|
||||||
let path = PathBuf::from(&def.path.fragment);
|
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() {
|
if path.is_relative() {
|
||||||
def.path.fragment = base
|
def.path.fragment = base
|
||||||
.join(path)
|
.join(path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user