From 64159d142793cd43f9f4db80e0131e032c49892c Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Wed, 6 Mar 2019 14:13:34 +0200 Subject: [PATCH] Avoid a warning for names in snapshots Since we no longer require this field, the previous code would spit out a warning if it was present. This is extremely noisy for a field that used to be required. Instead: just ignore the field if present. --- subs/pantry/src/Pantry/Types.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/subs/pantry/src/Pantry/Types.hs b/subs/pantry/src/Pantry/Types.hs index 989006c099..67d49e7c3d 100644 --- a/subs/pantry/src/Pantry/Types.hs +++ b/subs/pantry/src/Pantry/Types.hs @@ -1954,6 +1954,7 @@ instance ToJSON RawSnapshotLayer where instance FromJSON (WithJSONWarnings (Unresolved RawSnapshotLayer)) where parseJSON = withObjectWarnings "Snapshot" $ \o -> do + _ :: Maybe Text <- o ..:? "name" -- avoid warnings for old snapshot format mcompiler <- o ..:? "compiler" mresolver <- jsonSubWarningsT $ o ...:? ["snapshot", "resolver"] unresolvedSnapshotParent <-