Ticket #1290 (new bug)

Opened 5 years ago

Last modified 3 years ago

ghc runs preprocessor too much

Reported by: guest Owned by:
Priority: normal Milestone: _|_
Component: Driver Version: 6.7
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

When an external preprocessor has been specified with -F -pgmF, and then using ghc --make, ghc runs the preprocessor on every .hs file, even those for which compilation is skipped. This seem unnecessary and it slows down recompilation significantly when you have many files.

-- Lennart

Change History

Changed 5 years ago by simonmar

I don't see how to avoid this easily: we need to parse the imports of every source file in order to construct the dependency tree, and we can't parse the imports without preprocessing the source file first.

Perhaps keeping a cache file containing the imports for each source file with the last-modified date of the source?

Changed 5 years ago by guest

Yes, you're right. It's difficult to fix. It would take a cache to avoid, which is a pain.

Changed 5 years ago by igloo

  • milestone set to _|_

Changed 3 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 3 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.