diff --git a/.gitignore b/.gitignore index 23e0a889..73449d15 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ local # Common test files I use. temp.janet +temp*.janet scratch.janet # Emscripten diff --git a/src/boot/boot.janet b/src/boot/boot.janet index 4182686c..ff08d833 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -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)