[Git][ghc/ghc][wip/conf-hi-hadrian] Make interface files and object files depend on inplace .conf file

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Mon Apr 29 12:09:26 UTC 2024



Matthew Pickering pushed to branch wip/conf-hi-hadrian at Glasgow Haskell Compiler / GHC


Commits:
0f8886f5 by Matthew Pickering at 2024-04-29T13:09:01+01:00
Make interface files and object files depend on inplace .conf file

A potential fix for #24737

- - - - -


1 changed file:

- hadrian/src/Rules/Compile.hs


Changes:

=====================================
hadrian/src/Rules/Compile.hs
=====================================
@@ -218,6 +218,9 @@ compileHsObjectAndHi rs objpath = do
   ctxPath <- contextPath ctx
   (src, deps) <- lookupDependencies (ctxPath -/- ".dependencies") objpath
   need (src:deps)
+  -- The .conf file is needed when template-haskell is implicitly added as a dependency
+  -- when a module in the template-haskell package is compiled. (See #24737)
+  when  (isLibrary (C.package ctx)) (need . (:[]) =<< pkgConfFile ctx)
 
   -- The .dependencies file lists indicating inputs. ghc will
   -- generally read more *.hi and *.hi-boot files (direct inputs).



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0f8886f5b77f9c17c2f21e77faa45af15a4f840a

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0f8886f5b77f9c17c2f21e77faa45af15a4f840a
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240429/d9493d7e/attachment.html>


More information about the ghc-commits mailing list