Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,359
    • Issues 5,359
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 565
    • Merge requests 565
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #12567
Closed
Open
Issue created Sep 03, 2016 by Gabor Greif@ggreif💬Developer

`ghc --make` recompiles unchanged files when using `-fplugin` OPTIONS

Consider this bare-bones module

{-# OPTIONS -fplugin GHC.TypeLits.Normalise #-}

module A where

compiling it will always say

$ ghc --make A.hs
[1 of 1] Compiling A                ( A.hs, A.o ) [GHC.TypeLits.Normalise changed]

even when the module was compiled before.

$ ghc A.hs -c -ddump-if-trace -ddump-hi-diffs

will give the reason:

imported module ‘GHC.TypeLits.Normalise’ is from package ‘ghc-typelits-natnormalise-0.5’, which is not among previous dependencies

Which is the probable cause: when writing the .hi file, the used plugins' package dependencies should be also written out. AFAICS they are extracted fron the DynFlags but for this comparison in

checkDependencies :: HscEnv -> ModSummary -> ModIface -> IfG RecompileRequired

but not found in the ModSummary that was originally written to disk.

This is pretty nasty for clash compilations and the suspected bug is documented here: https://github.com/clash-lang/ghc-typelits-natnormalise/issues/2

Trac metadata
Trac field Value
Version 7.10.3
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking