Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion book/FPLean/Examples/Commands.lean
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@ def ensureContainer (container : Ident) : m Container := do
let c : Container := ⟨tmp, {}⟩
let projectRoot : System.FilePath := ".."
let copyErrors : IO.Ref (Array String) ← IO.mkRef #[]
Verso.FS.copyRecursively (fun s => copyErrors.modify (·.push s)) projectRoot tmp
Verso.FS.copyRecursively (fun s => copyErrors.modify (·.push s)) projectRoot tmp shouldCopy
let errs ← (copyErrors.get : IO _)
unless errs.isEmpty do
throwErrorAt container "Errors copying project to container {name}: {indentD <| MessageData.joinSep (errs.toList.map toMessageData) Format.line}"
modifyEnv (containersExt.modifyState · (·.insert name c))
return c
where
shouldCopy (path : System.FilePath) : IO Bool := do
let some x := path.fileName
| return true
return !(x.startsWith ".") && !(x == "site-packages") && !(x == "_out") && !(x == "static")

def requireContainer (container : Ident) : m Container := do
let name := container.getId
Expand Down
2 changes: 1 addition & 1 deletion book/lake-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "git",
"subDir": null,
"scope": "",
"rev": "38b11d9518e544b08b5b27e91197dfdb2b86690a",
"rev": "c68870b3fd3ae8e99ea242bf17197db3b0d39b0f",
"name": "verso",
"manifestFile": "lake-manifest.json",
"inputRev": "main",
Expand Down
Loading