mason.test: check if boot image is out of date, and refuse to build if so

db4
Slava Pestov 2009-04-04 20:34:09 -05:00
parent d707292d84
commit f44c67e5c3
1 changed files with 11 additions and 1 deletions

View File

@ -4,7 +4,7 @@ USING: accessors assocs benchmark bootstrap.stage2
compiler.errors generic help.html help.lint io.directories
io.encodings.utf8 io.files kernel mason.common math namespaces
prettyprint sequences sets sorting tools.test tools.time
tools.vocabs words ;
tools.vocabs words system io ;
IN: mason.test
: do-load ( -- )
@ -44,9 +44,19 @@ M: method-body word-vocabulary "method-generic" word-prop word-vocabulary ;
: benchmark-ms ( quot -- ms )
benchmark 1000 /i ; inline
: check-boot-image ( -- )
"" to-refresh drop 2dup [ empty? not ] either?
[
"Boot image is out of date. Changed vocabs:" print
append prune [ print ] each
flush
1 exit
] [ 2drop ] if ;
: do-all ( -- )
".." [
bootstrap-time get boot-time-file to-file
check-boot-image
[ do-load do-compile-errors ] benchmark-ms load-time-file to-file
[ generate-help ] benchmark-ms html-help-time-file to-file
[ do-tests ] benchmark-ms test-time-file to-file