]> gitweb.factorcode.org Git - factor.git/commitdiff
mason.test: change mason to load roots in order.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 3 Apr 2020 16:44:45 +0000 (09:44 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 3 Apr 2020 16:44:45 +0000 (09:44 -0700)
This will allow us to know when core depends on basis, or basis on
extra, because they should get load errors.

extra/mason/test/test.factor

index 5ce5a48d0cd1976b0e7c37388e9432e02bdc75f8..43b2ccf5582e4f86a5d0dc54ddf0de1cc87e7dec 100644 (file)
@@ -3,7 +3,7 @@
 USING: accessors assocs benchmark bootstrap.stage2 calendar
 command-line compiler.errors continuations debugger fry generic
 help.html help.lint io io.directories io.encodings.utf8 io.files
-io.styles kernel locals mason.common memory namespaces
+io.styles kernel locals mason.common math memory namespaces
 parser.notes sequences sets sorting source-files.errors system
 threads tools.errors tools.test tools.time vocabs
 vocabs.hierarchy.private vocabs.loader vocabs.refresh words ;
@@ -34,8 +34,11 @@ IN: mason.test
     vocabs-to-load require-all-no-restarts ;
 
 : load-no-restarts ( prefix -- failures )
-    [ vocab-roots get ] dip
-    '[ _ load-from-root-no-restarts ] map concat ;
+    [ vocab-roots get dup ] dip '[
+        _ swap 1 + head vocab-roots [
+            _ load-from-root-no-restarts
+        ] with-variable
+    ] map-index concat ;
 
 : do-load ( -- )
     "" load-no-restarts