]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.scaffold: quick fix for scaffold-vocab bug.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 15 Jun 2018 22:51:02 +0000 (15:51 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 15 Jun 2018 22:51:45 +0000 (15:51 -0700)
root-cache was getting added to with ``f`` and then subsequent check fails.

basis/tools/scaffold/scaffold.factor

index db602ce4e57fc62ddf39b89d0102ad25ec103683..d4da9a78ae525eb055fed9337db8a6d2705ccc6f 100644 (file)
@@ -22,7 +22,7 @@ ERROR: vocab-must-not-exist string ;
     trim-tail-separators vocab-roots get member? ;
 
 : ensure-vocab-exists ( string -- string )
-    dup loaded-vocab-names member? [ no-vocab ] unless ;
+    dup lookup-vocab [ no-vocab ] unless ;
 
 : check-root ( string -- string )
     dup vocab-root? [ not-a-vocab-root ] unless ;
@@ -31,10 +31,11 @@ ERROR: vocab-must-not-exist string ;
     [ check-root ] [ check-vocab-name ] bi* ;
 
 : check-vocab-exists ( string -- string )
-    dup vocab-exists? [ vocab-must-not-exist ] when ;
+    dup vocab-exists? [ vocab-must-not-exist ] when
+    dup root-cache get delete-at ;
 
 : replace-vocab-separators ( vocab -- path )
-    path-separator first CHAR: . associate substitute ; inline
+    path-separator first CHAR: . associate substitute ;
 
 : vocab-root/vocab>path ( vocab-root vocab -- path )
     check-vocab-root/vocab