mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Fully qualify values exported to host linking
Previously we were only handing off exposed values based on their inner-module ID, but actually the fully-resolved ID is needed, because it's reasonable that two identical names from different modules are exposed to the host. Closes #3483
This commit is contained in:
parent
f9a5113210
commit
7ef03440ef
1 changed files with 14 additions and 2 deletions
|
@ -114,14 +114,26 @@ pub fn build_file<'a>(
|
|||
.exposed_to_host
|
||||
.values
|
||||
.keys()
|
||||
.map(|x| x.as_str(&loaded.interns).to_string())
|
||||
.map(|x| {
|
||||
format!(
|
||||
"{}.{}",
|
||||
x.module_string(&loaded.interns),
|
||||
x.as_str(&loaded.interns)
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
|
||||
let exposed_closure_types = loaded
|
||||
.exposed_to_host
|
||||
.closure_types
|
||||
.iter()
|
||||
.map(|x| x.as_str(&loaded.interns).to_string())
|
||||
.map(|x| {
|
||||
format!(
|
||||
"{}.{}",
|
||||
x.module_string(&loaded.interns),
|
||||
x.as_str(&loaded.interns)
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
|
||||
let preprocessed_host_path = if emit_wasm {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue