fix path issues

This commit is contained in:
Alexander Bentkamp
2022-11-24 14:38:35 +01:00
parent 7ae299870b
commit 77a8c4750e
3 changed files with 11 additions and 8 deletions
+3 -2
View File
@@ -84,14 +84,15 @@ def compileProof (inputCtx : Parser.InputContext) (snap : Snapshot) (hasWidgets
fileMap := inputCtx.fileMap
tacticCache? := some tacticCacheNew
}
IO.FS.writeFile "test.txt" s!"{tacticStx}"
let (output, _) ← IO.FS.withIsolatedStreams (isolateStderr := server.stderrAsMessages.get scope.opts) <| liftM (m := BaseIO) do
Elab.Command.catchExceptions
(getResetInfoTrees *> do
let level := `level1
-- let level := `level1
let done := Syntax.node (.synthetic cmdParserState.pos cmdParserState.pos) ``Lean.Parser.Tactic.done #[]
let tacticStx := (tacticStx.getArgs.push done).map (⟨.⟩)
let tacticStx := ← `(Lean.Parser.Tactic.tacticSeq| $[$(tacticStx)]*)
let cmdStx ← `(command| example : $(mkIdent level) := by {unfold $(mkIdent level); $(⟨tacticStx⟩)} )
let cmdStx ← `(command| example : 0 = 0 := by {$(⟨tacticStx⟩)} )
Elab.Command.elabCommandTopLevel cmdStx)
cmdCtx cmdStateRef
let postNew := (← tacticCacheNew.get).post
+2 -2
View File
@@ -107,7 +107,7 @@ def initAndRunWatchdogAux : GameServerM Unit := do
| throwServerError "Got `shutdown` request, expected an `exit` notification"
def createEnv : IO Environment := do
let gameDir := "testgame"
let gameDir := "../testgame"
-- Determine search paths of the game project by running `lake env printenv LEAN_PATH`.
let out ← IO.Process.output
@@ -128,8 +128,8 @@ def createEnv : IO Environment := do
return env
def initAndRunWatchdog (args : List String) (i o e : FS.Stream) : IO Unit := do
let workerPath := "./build/bin/gameserver"
-- TODO: Do the following commands slow us down?
let workerPath ← findWorkerPath
let srcSearchPath ← initSrcSearchPath (← getBuildDir)
let references ← IO.mkRef (← loadReferences)
let fileWorkersRef ← IO.mkRef (RBMap.empty : FileWorkerMap)