on master help sign in
asset-manifest: Fix ob run issue caused by generated module importing generating package
commit6573d48a990ee295fbc3229cc2526e45d0bba68c authorAli Abrar <aliabrar@gmail.com> dateFri 18 Dec 2020, 01:01 (6 years ago) parentdb3e008
1 file changed+6−1
lib/command/src/Obelisk/Command/Run.hs+6−1
lib/command/src/Obelisk/Command/Run.hs+6−1
@@ -223,7 +223,12 @@ getLocalPkgs root interpretPaths = do
223223 let rootsAndExclusions = calcIntepretFinds "" interpretPaths
224224
225225 fmap fold $ for (MMap.toAscList rootsAndExclusions) $ \(interpretPathRoot, exclusions) ->
226− let allExclusions = obeliskPackageExclusions <> exclusions <> Set.singleton ("*" </> attrCacheFileName)
226+ let allExclusions = obeliskPackageExclusions
227+ <> exclusions
228+ <> Set.singleton ("*" </> attrCacheFileName)
229+ <> Set.singleton ("*" </> "lib/asset/manifest") -- NB: obelisk-asset-manifest is excluded because it generates
230+ -- a module that in turn imports it. This will cause ob run to
231+ -- fail in its current implementation.
227232 in fmap (Set.fromList . map normalise) $ runFind $
228233 ["-L", interpretPathRoot, "(", "-name", "*.cabal", "-o", "-name", Hpack.packageConfig, ")", "-a", "-type", "f"]
229234 <> concat [["-not", "-path", p </> "*"] | p <- toList allExclusions]