mirror of
https://github.com/janet-lang/janet
synced 2024-11-28 11:09:54 +00:00
Address #804 - save and restore module cache when flychecking.
Calling flychecking cannot change the module cache.
This commit is contained in:
parent
de542a81c0
commit
4e31d85349
1
.gitignore
vendored
1
.gitignore
vendored
@ -34,6 +34,7 @@ local
|
||||
|
||||
# Common test files I use.
|
||||
temp.janet
|
||||
temp*.janet
|
||||
scratch.janet
|
||||
|
||||
# Emscripten
|
||||
|
@ -3588,10 +3588,14 @@
|
||||
arbitrary execution is possible. Other arguments are the same as dofile. `path` can also be
|
||||
a file value such as stdin. Returns nil.``
|
||||
[path &keys kwargs]
|
||||
(def old-modcache (table/clone module/cache))
|
||||
(table/clear module/cache)
|
||||
(try
|
||||
(dofile path :evaluator flycheck-evaluator ;(kvs kwargs))
|
||||
([e f]
|
||||
(debug/stacktrace f e "")))
|
||||
(table/clear module/cache)
|
||||
(merge-into module/cache old-modcache)
|
||||
nil)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user