Fix restart behavior with circular vocabs, and add a test for this

db4
Slava Pestov 2008-12-09 04:50:33 -06:00
parent 9ab4d53213
commit ccab34e7c4
6 changed files with 15 additions and 0 deletions

View File

@ -171,3 +171,11 @@ forget-junk
] with-compilation-unit ] with-compilation-unit
[ ] [ "vocabs.loader.test.h" require ] unit-test [ ] [ "vocabs.loader.test.h" require ] unit-test
[
"vocabs.loader.test.j" forget-vocab
"vocabs.loader.test.k" forget-vocab
] with-compilation-unit
[ ] [ [ "vocabs.loader.test.j" require ] [ drop :1 ] recover ] unit-test

View File

@ -65,6 +65,7 @@ ERROR: circular-dependency name ;
[ [
+parsing+ >>source-loaded? +parsing+ >>source-loaded?
dup vocab-source-path [ parse-file ] [ [ ] ] if* dup vocab-source-path [ parse-file ] [ [ ] ] if*
[ +parsing+ >>source-loaded? ] dip
[ % ] [ assert-depth ] if-bootstrapping [ % ] [ assert-depth ] if-bootstrapping
+done+ >>source-loaded? drop +done+ >>source-loaded? drop
] [ ] [ f >>source-loaded? ] cleanup ; ] [ ] [ f >>source-loaded? ] cleanup ;

View File

@ -0,0 +1,2 @@
IN: vocabs.loader.test.j
"vocabs.loader.test.k" require

View File

@ -0,0 +1 @@
unportable

View File

@ -0,0 +1,2 @@
IN: vocabs.loader.test.k
USE: vocabs.loader.test.j

View File

@ -0,0 +1 @@
unportable