[GHC] #16253: Offer a shorthand for `--skip=_build/stage$n/compiler/.dependencies.mk`
GHC
ghc-devs at haskell.org
Tue Jan 29 11:23:18 UTC 2019
#16253: Offer a shorthand for `--skip=_build/stage$n/compiler/.dependencies.mk`
-------------------------------------+-------------------------------------
Reporter: sgraf | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone:
Component: Build System | Version: 8.6.3
(Hadrian) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by snowleopard):
Looking at the documentation of `ghc -M`, it looks like the current per-
package approach is due to a limitation of GHC's dependency analysis.
Quoting from
https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/separate_compilation.html
#makefile-dependencies
> In general, `ghc -M Foo` does the following. For each module `M` in the
set `Foo` plus all its imports (transitively), it adds to the Makefile
[...]
That is, GHC always does **transitive** dependency analysis, which means
invoking it separately on each file would be rather inefficient (each time
it will likely traverse almost the whole dependency graph). This is why
Make and Hadrian choose to perform the analysis just once but for the
whole package.
Perhaps, it's not too difficult to add a more fine-grain dependency
analysis to GHC, i.e. produce only the list of immediate dependencies of a
specified module.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16253#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list