[GHC] #15971: Hadrian fails Shake's linter on Windows

GHC ghc-devs at haskell.org
Sun Dec 2 16:08:23 UTC 2018


#15971: Hadrian fails Shake's linter on Windows
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.8.1
       Component:  Build System      |              Version:  8.7
  (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):

 > If you don't know their names, how do they get into a list of .o files?
 Where is that rule?

 We unpack an archive which contains these `.o` files, here is the command
 that does this:

 {{{
             build $ target gmpContext (Ar Unpack Stage1)
                 [top -/- gmpPath -/- gmpLibrary] [gmpPath -/-
 gmpObjectsDir]
 }}}

 https://github.com/ghc/ghc/blob/93e86d6103757b43017535c92bc6970e9e2315a5/hadrian/src/Rules/Gmp.hs#L64-L65

 > Having a point of creation is fine, but what's doing the touch?

 Right now the only place we ever refer to these `.o` files again is here:

 {{{
         gmpPath <- gmpBuildPath
         need [gmpPath -/- gmpLibraryH]
         map unifyPath <$> getDirectoryFiles "" [gmpPath -/- gmpObjectsDir
 -/- "*.o"]
 }}}

 https://github.com/ghc/ghc/blob/93e86d6103757b43017535c92bc6970e9e2315a5/hadrian/src/Rules/Library.hs#L105-L107

 Note that `need [gmpPath -/- gmpLibraryH]` records the dependency on the
 above rule.

 I initially thought that the reason for the lint failure is that we're
 using `getDirectoryFiles` instead of `getDirectoryFilesIO`, but we get the
 same lint error when using the untracked version too.

 As far as I can see, we never touch or refer to these `.o` files anywhere
 else.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15971#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list