Opened 16 years ago

Last modified 11 months ago

#618 new task (None)

Dependency caching in ghc --make

Reported by: simonmar Owned by:
Priority: normal Milestone:
Component: Compiler Version: None
Keywords: Cc: rodlogic, ezyang
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: N/A
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by igloo)

ghc --make should cache dependencies between runs, somehow.

Change History (10)

comment:1 Changed 12 years ago by simonmar

Architecture: Unknown
Description: modified (diff)
difficulty: Moderate (1 day)
Operating System: Unknown

comment:2 Changed 11 years ago by igloo

Description: modified (diff)
Milestone: 6.6.1
Test Case: N/A

comment:3 Changed 11 years ago by simonmar

Milestone: 6.6.1_|_

comment:4 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:5 Changed 9 years ago by simonmar

Operating System: UnknownUnknown/Multiple

comment:6 Changed 8 years ago by simonmar

difficulty: Moderate (1 day)Moderate (less than a day)

comment:7 Changed 3 years ago by rodlogic

Cc: rodlogic added
Type of failure: None/Unknown

comment:8 Changed 22 months ago by ezyang

Cc: ezyang added

ghc-shake is a compiler plugin which is comparable to ghc --make, but caches dependencies (through Shake). Here's an implementation that works with 7.10 (with frontend plugins; that patch hasn't been backported to 7.10)

(The approach here is not so useful for ghc --make, probably, because shake maintains a separate file cache for information like dependencies.)

Last edited 22 months ago by ezyang (previous) (diff)

comment:9 Changed 11 months ago by dobenour

Could SQLite be used as the storage backend for the cache?

comment:10 Changed 11 months ago by ezyang

dobenour: SQLite, or really any single file database, could be used, but this would change GHC's compilation model to output some extra files besides the files it normally outputs. I'm a little loathe to do this when we ought to be able to just read out the cached dependencies from the interface files we generate.

Note: See TracTickets for help on using tickets.