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_ =
223
223
Remote {} -> freezeImportWithSettings settings directory import_
224
224
_ -> return import_
225
225
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
+
226
237
-- | See 'freeze'.
227
238
freezeWithSettings
228
239
:: EvaluateSettings
@@ -322,7 +333,7 @@ freezeExpressionWithSettings
322
333
freezeExpressionWithSettings settings directory scope intent expression = do
323
334
let freezeScope =
324
335
case scope of
325
- AllImports -> freezeImportWithSettings
336
+ AllImports -> freezeNonMissingImportWithSettings
326
337
OnlyRemoteImports -> freezeRemoteImportWithSettings
327
338
328
339
let freezeFunction = freezeScope settings directory
Original file line number Diff line number Diff line change @@ -513,7 +513,7 @@ parseMode =
513
513
parseAllFlag =
514
514
Options.Applicative. switch
515
515
( 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 "
517
517
)
518
518
519
519
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