• Edward Z. Yang's avatar
    Refactor setupMessage use in Cabal library. · bc9d5ada
    Edward Z. Yang authored
    I noticed that I was repeatedly writing the same code
    to print out more elaborate information when we do builds,
    so I refactored it all into one place.  In the process,
    I think that I have made the build output more generally
    The key changes:
        - There is a new function setupMessage' which takes in
          more information than the conventional setupMessage
          does, and prints a more informative message: whereas
          setupMessage will only tell you about the package
          it is being run in, setupMessage' will also tell
          you about the component and instantiation.
        - I applied this function to applicable sites, in some
          cases moving around messages to be closer to the place
          where an actual operation takes place.  For example,
          the 'Building' message previously only was triggered
          at the beginning of the build process; now it is
          emitted immediately before we call out to GHC.  This
          is a lot more informative, and avoids people thinking
          that we are slow because of preprocessing (we're not.)
          Something similar happened for Haddock as well.
    Preprocessing library 'spider' for reflex-backpack-0.5.0..
    [1 of 1] Compiling Reflex.Spider.Backpack ( src/Reflex/Spider/Backpack.hs, /srv/code/reflex-backpack/dist-newstyle/build/x86_64-linux/ghc-8.1.20170123/reflex-backpack-0.5.0/c/spider/build/spider/Reflex/Spider/Backpack.o )
    Preprocessing library 'host' for reflex-backpack-0.5.0..
    Building library 'host' instantiated with
      Reflex.Host.Sig = reflex-backpack-0.5.0-inplace-spider:Reflex.Spider.Backpack
      Reflex.Sig = reflex-backpack-0.5.0-inplace-spider:Reflex.Spider.Backpack
    for reflex-backpack-0.5.0..
    [1 of 8] Compiling Reflex.Host.Sig[sig] ( host/Reflex/Host/Sig.hsig, /srv/code/reflex-backpack/dist-newstyle/build/x86_64-linux/ghc-8.1.20170123/reflex-backpack-0.5.0/c/host/reflex-backpack-0.5.0-inplace-host+FDoWUmUc0MMBtBRwItgjj9/build/reflex-backpack-0.5.0-inplace-host+FDoWUmUc0MMBtBRwItgjj9/Reflex/Host/Sig.o ) [Reflex.Basics changed]
    Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
ComponentLocalBuildInfo.hs 5.14 KB