Revert "idea (rejected): only generate work up to constraint gen, then look at what modules are actually used and generate Solve.. work based on that"

This reverts commit 2cbe5f5231.
This commit is contained in:
Folkert 2022-03-19 16:26:46 +01:00
parent 2cbe5f5231
commit e914272bf5
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
5 changed files with 23 additions and 156 deletions

View file

@ -32,21 +32,13 @@ impl ExposedByModule {
///
/// Useful when we know what modules a particular module imports, and want just
/// the exposed types for those exposed modules.
pub fn retain_modules<'a>(
&self,
home: ModuleId,
it: impl Iterator<Item = &'a ModuleId>,
) -> Self {
pub fn retain_modules<'a>(&self, it: impl Iterator<Item = &'a ModuleId>) -> Self {
let mut output = Self::default();
for module_id in it {
match self.exposed.get(module_id) {
None => {
internal_error!(
"Module {:?} did not register its exposed values for {:?}",
module_id,
home,
)
internal_error!("Module {:?} did not register its exposed values", module_id)
}
Some(exposed_types) => {
output.exposed.insert(*module_id, exposed_types.clone());