Wolfgang Jeltsch pushed to branch wip/jeltsch/more-efficient-home-unit-imports-finding at Glasgow Haskell Compiler / GHC
Commits:
-
e2ffbc50
by Wolfgang Jeltsch at 2026-05-12T16:27:24+03:00
1 changed file:
Changes:
| ... | ... | @@ -296,7 +296,18 @@ rankedHomeUnitDeps _ _ home_unit_deps | Set.null home_unit_deps |
| 296 | 296 | = []
|
| 297 | 297 | -- The special handling of the situation where the dependency set is empty does
|
| 298 | 298 | -- not change the result, but it avoids triggering evaluation of the module
|
| 299 | --- graph.
|
|
| 299 | +-- graph. This is particularly important in one-shot mode, where the module
|
|
| 300 | +-- graph is not needed. Computing it nevertheless would result in a, possibly
|
|
| 301 | +-- dramatic, increase of memory usage. Worse, GHC would erroneously look for the
|
|
| 302 | +-- sources of modules, which would, for example, cause test `boot1` to fail with
|
|
| 303 | +-- the following error message:
|
|
| 304 | +--
|
|
| 305 | +-- B.hs:3:1: error: [GHC-87110]
|
|
| 306 | +-- Could not find module ‘A’.
|
|
| 307 | +-- Use -v to see a list of the files searched for.
|
|
| 308 | +-- |
|
|
| 309 | +-- 3 | import {-# source #-} A
|
|
| 310 | +-- | ^^^^^^^^^^^^^^^^^^^^^^^
|
|
| 300 | 311 | rankedHomeUnitDeps home_module_name_providers_map mod_name home_unit_deps
|
| 301 | 312 | = Set.toList cached_deps ++ Set.toList uncached_deps
|
| 302 | 313 | where
|