mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 20:28:02 +00:00
Fix missing shorthands when importing packages
This commit is contained in:
parent
c925686443
commit
1e0f5c2b28
1 changed files with 7 additions and 1 deletions
|
@ -4549,17 +4549,23 @@ fn build_header<'a>(
|
|||
if let HeaderType::Platform {
|
||||
exposes,
|
||||
exposes_ids,
|
||||
config_shorthand,
|
||||
..
|
||||
}
|
||||
| HeaderType::Package {
|
||||
exposes,
|
||||
exposes_ids,
|
||||
config_shorthand,
|
||||
..
|
||||
} = header_type
|
||||
{
|
||||
for (loc_module_name, module_id) in exposes.iter().zip(exposes_ids.iter().copied()) {
|
||||
let module_name_str = loc_module_name.value.as_str();
|
||||
let pq_module_name = PackageQualified::Unqualified(module_name_str.into());
|
||||
let pq_module_name = if info.is_root_module {
|
||||
PackageQualified::Unqualified(module_name_str.into())
|
||||
} else {
|
||||
PackageQualified::Qualified(config_shorthand, module_name_str.into())
|
||||
};
|
||||
|
||||
debug_assert!(!deps_by_name.contains_key(&pq_module_name));
|
||||
deps_by_name.insert(pq_module_name, module_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue