I don't know if this is the correct place to ask, but I was doing hayleigh's bug bounty and I was fixing this TODO https://github.com/gleam-lang/gleam/blob/176334cd31dffd07c857db7a7066b6a032d5086f/compiler-core/src/build/package_compiler.rs#L85-L89. What is the difference between Module and ModuleInterface?
#In the compiler core, what is ModuleInterface?
1 messages · Page 1 of 1 (latest)
module probably contains everything, module interface probably only contains the stuff thats public
For now, the only way I find to convert from one to the other would be to re-analyse the cached modules
Which I think is wrong
That todo comment might be burying the lead on what the underlying issue here is. The ModuleInterface is essentially everything that is cached on compilation while the Module is the raw ast + the ModuleInterface. So the Module is the raw output of a fresh compile whereas a cache load will only have enough to create a ModuleInterface. The issue that hayleigh was asking about should theoretically be solved by changing how the package interface is created to use ModuleInterface information only instead of raw Module information plus whatever wiring you need to make sure you have all the ModuleInterfaces at the right time/spot
I'm basically making this
Also, why are there so many different types with the same names 
The main problem I ran into is type aliases
Tbf I have basically no idea what I'm doing lol
Since those aren't really recorded anywhere in the ModuleInterface
Which of the ModuleInterfaces? 🙂
I thought I had it done, then I saw they were from different modules
The type_ one I think then
yeah
Basically you need to convert type_::ModuleInterface to package_interface::ModuleInterface, instead of type_::Module to package_interface::ModuleInterface
Or that's how I would do it anyway
But yeah, type aliases are annoying since the compiler mostly forgets about those after analysis
Exciting! I was really hoping this issue would get fixed soon as it affects one of my projects as well
yeah i noticed
I believe it automatically cleans outdated cache now
Well, I tried running it without cleaning the cache and it gave an error lol
Also, I need to remove a println!, it's spamming my console
It doesn't work 
Bincode does not support the serde::Deserializer::deserialize_any method```
So close
I wonder which type requires the deserialize_any
Found it, it's TypeInterface, as it's a enum