theoretically allow dependencies in platform modules

This commit is contained in:
Folkert 2020-11-07 23:27:47 +01:00
parent cb1895a989
commit ae2246c122

View file

@ -138,8 +138,7 @@ impl Dependencies {
pub fn add_platform_module( pub fn add_platform_module(
&mut self, &mut self,
module_id: ModuleId, module_id: ModuleId,
// NOTE we assume for now a platform module has no imports dependencies: &MutSet<ModuleId>,
_dependencies: &MutSet<ModuleId>,
goal_phase: Phase, goal_phase: Phase,
) -> MutSet<(ModuleId, Phase)> { ) -> MutSet<(ModuleId, Phase)> {
// add dependencies for self // add dependencies for self
@ -155,12 +154,14 @@ impl Dependencies {
} }
} }
// // all the dependencies can be loaded let mut output = MutSet::default();
// for dep in dependencies {
// output.insert((*dep, LoadHeader));
// }
MutSet::default() // all the dependencies can be loaded
for dep in dependencies {
output.insert((*dep, Phase::LoadHeader));
}
output
} }
/// Propagate a notification, return (module, phase) pairs that can make progress /// Propagate a notification, return (module, phase) pairs that can make progress