mason.test: check if boot image is out of date, and refuse to build if so
parent
d707292d84
commit
f44c67e5c3
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue