Skip to content

Commit

Permalink
Merge pull request #2788 from input-output-hk/rvl/2785/fix-weeder-hie…
Browse files Browse the repository at this point in the history
…-cache

Buildkite: Clean up .hie files before stack build
  • Loading branch information
rvl authored Jul 30, 2021
2 parents 8cd4dfd + 82644ae commit ada8e3b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .buildkite/rebuild.hs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ setupBuildDirectory dryRun buildDir = do
-- Remove certain files which get cached but could cause problems for subsequent
-- builds.
cleanBuildDirectory :: FilePath -> IO ()
cleanBuildDirectory buildDir = findTix buildDir >>= mapM_ rm
cleanBuildDirectory buildDir = mapM_ rm =<< findTix buildDir <> findHie buildDir

-- | Check for the presence of new or modified test data files which someone
-- forgot to check in.
Expand Down Expand Up @@ -324,11 +324,14 @@ titled heading action = do
pure res

----------------------------------------------------------------------------
-- Weeder - uses contents of .stack-work to determine unused dependencies
-- Weeder - uses .hie files in .stack-work to determine unused dependencies

weederStep :: DryRun -> IO ExitCode
weederStep dryRun = titled "Weeder" $ run dryRun "weeder" []

findHie :: FilePath -> IO [FilePath]
findHie dir = fold (find (suffix ".hie") dir) Fold.list

----------------------------------------------------------------------------
-- Stack Haskell Program Coverage and upload to Coveralls

Expand Down
10 changes: 6 additions & 4 deletions nix/haskell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,14 @@ let
'';
}

({ lib, pkgs, ... }: {
# Use our forked libsodium from iohk-nix crypto overlay.
packages.cardano-crypto-praos.components.library.pkgconfig = lib.mkForce [ [ pkgs.libsodium-vrf ] ];
packages.cardano-crypto-class.components.library.pkgconfig = lib.mkForce [ [ pkgs.libsodium-vrf ] ];
})

# Build fixes for library dependencies
{
# Use our forked libsodium
packages.cardano-crypto-praos.components.library.pkgconfig = [ [ pkgs.libsodium-vrf ] ];
packages.cardano-crypto-class.components.library.pkgconfig = [ [ pkgs.libsodium-vrf ] ];

# Packages we wish to ignore version bounds of.
# This is similar to jailbreakCabal, however it
# does not require any messing with cabal files.
Expand Down

0 comments on commit ada8e3b

Please sign in to comment.