Skip to content

Commit

Permalink
Clean Cabal cache before calling it
Browse files Browse the repository at this point in the history
Cabal/GHC doesn't know about files produced by cargo, and will therefore
fail to invalidate caches. While there are ways to tell Cabal/GHC to
depend on these files, they are known to be broken in our tool versions.

See: haskell/cabal#4746

Note that we don't use `cabal clean`, as it will also remove any sources
it downloaded (specified in `cabal.project`).
  • Loading branch information
martijnbastiaan committed Aug 18, 2023
1 parent 8eb8b1b commit d4d8fae
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bittide-shake/bin/Shake.hs
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,15 @@ main = do
-- build bittide-instance because we have instances that includes a binaries.
command_ [Cwd "firmware-binaries"] "cargo" ["build", "--release"]

-- XXX: Cabal/GHC doesn't know about files produced by cargo, and
-- will therefore fail to invalidate caches. While there are
-- ways to tell Cabal/GHC to depend on these files, they are
-- known to be broken in our tool versions.
--
-- See: https://github.com/haskell/cabal/issues/4746
command_ [] "rm" ["-rf", "dist-newstyle/build"]

-- Generate RTL
let
(buildTool, buildToolArgs) =
defaultClashCmd clashBuildDir targetName
Expand Down

0 comments on commit d4d8fae

Please sign in to comment.