Hi -
Experimenting with Slava's ``gml'' (Generative Modeling Language)
3D graphics vocabs in ``resource:extra'', I ran into a glitch involving
unit tests.
Some vocabs in the gml directory don't get loaded via ``load-child-vocabs'':
gml.coremath, gml.geometry, & gml.modeling -- thus unit-tests fail.
I'm running
Factor 0.99 x86.64 (2166, heads/master-96743eeca4, May 28 2022 23:43:06)
[Clang (GCC Apple LLVM 13.1.6 (clang-1316.0.21.2.5))] on macosx

IN: scratchpad USE: gml "gml" test ! tests fail

-Crafted a workaround using ``find-vocab-root'' to
fix gml vocabs loading issue:

IN: scratchpad auto-use
"gml" [ find-vocab-root ] keep ! ( -- "resource:extra" "gml" )
append-path                    ! ( -- path ) get gml vocab parent directory
directory-entries [ directory? ] filter
[ name>> "gml." prepend ] map
[ file-extension "examples" = ] reject ! skip gml code examples directory
[ require ] each  ! load all relevant vocabs
"gml" test  ! now all tests succeed

-Is there a better, more direct solution?
Thanks for any advice,
~ CW Alston
-- 
*~ Memento Amori*
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to