File tree Expand file tree Collapse file tree 4 files changed +21
-2
lines changed
Expand file tree Collapse file tree 4 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,17 @@ freezeRemoteImportWithSettings settings directory import_ =
223223 Remote {} -> freezeImportWithSettings settings directory import_
224224 _ -> return import_
225225
226+ -- | See 'freezeRemoteImport'.
227+ freezeNonMissingImportWithSettings
228+ :: EvaluateSettings
229+ -> FilePath
230+ -> Import
231+ -> IO Import
232+ freezeNonMissingImportWithSettings settings directory import_ =
233+ case importType (importHashed import_) of
234+ Missing -> return import_
235+ _ -> freezeImportWithSettings settings directory import_
236+
226237-- | See 'freeze'.
227238freezeWithSettings
228239 :: EvaluateSettings
@@ -322,7 +333,7 @@ freezeExpressionWithSettings
322333freezeExpressionWithSettings settings directory scope intent expression = do
323334 let freezeScope =
324335 case scope of
325- AllImports -> freezeImportWithSettings
336+ AllImports -> freezeNonMissingImportWithSettings
326337 OnlyRemoteImports -> freezeRemoteImportWithSettings
327338
328339 let freezeFunction = freezeScope settings directory
Original file line number Diff line number Diff line change @@ -513,7 +513,7 @@ parseMode =
513513 parseAllFlag =
514514 Options.Applicative. switch
515515 ( Options.Applicative. long " all"
516- <> Options.Applicative. help " Add integrity checks to all imports (not just remote imports)"
516+ <> Options.Applicative. help " Add integrity checks to all imports (not just remote imports) except for missing imports "
517517 )
518518
519519 parseCacheFlag =
Original file line number Diff line number Diff line change 1+ -- The purpose of this test is to verify that `dhall freeze --cached` is
2+ -- idempotent and doesn't attempt to resolve the `missing` import
3+ missing
4+ sha256: 27 abdeddfe8503496adeb623466caa47da5f63abd2bc6fa19f6cfcb73ecfed70
5+ ? ./ True. dhall
Original file line number Diff line number Diff line change 1+ missing
2+ sha256: 27 abdeddfe8503496adeb623466caa47da5f63abd2bc6fa19f6cfcb73ecfed70
3+ ? ./ True. dhall
You can’t perform that action at this time.
0 commit comments