diff --git a/subs/pantry/src/Pantry/Types.hs b/subs/pantry/src/Pantry/Types.hs index d1442cd5e9..28ea89640b 100644 --- a/subs/pantry/src/Pantry/Types.hs +++ b/subs/pantry/src/Pantry/Types.hs @@ -822,6 +822,7 @@ instance FromJSON (WithJSONWarnings UnresolvedPackageLocationImmutable) where -- if subdirs exists, it needs to be valid case HM.lookup "subdirs" o of Just v' -> do + tellJSONField "subdirs" subdirs <- lift $ parseJSON v' case subdirs of [] -> fail "Invalid empty subdirs" diff --git a/subs/pantry/test/Pantry/BuildPlanSpec.hs b/subs/pantry/test/Pantry/BuildPlanSpec.hs index 2fcf18c13c..dda78bcb76 100644 --- a/subs/pantry/test/Pantry/BuildPlanSpec.hs +++ b/subs/pantry/test/Pantry/BuildPlanSpec.hs @@ -16,10 +16,10 @@ spec = describe "PackageLocation" $ do describe "Archive" $ do describe "github" $ do - let decode' :: MonadThrow m => ByteString -> m (WithJSONWarnings UnresolvedPackageLocationImmutable) + let decode' :: (HasCallStack, MonadThrow m) => ByteString -> m (WithJSONWarnings UnresolvedPackageLocationImmutable) decode' = decodeThrow - decode'' :: ByteString -> IO [PackageLocationImmutable] + decode'' :: HasCallStack => ByteString -> IO [PackageLocationImmutable] decode'' bs = do WithJSONWarnings unresolved warnings <- decode' bs unless (null warnings) $ error $ show warnings