Reverse compiler.errors => tools.errrs dependency to reduce deploy image size
parent
7417a8741e
commit
e811dd6192
|
@ -2,33 +2,4 @@ IN: compiler.errors
|
||||||
USING: help.markup help.syntax vocabs.loader words io
|
USING: help.markup help.syntax vocabs.loader words io
|
||||||
quotations words.symbol ;
|
quotations words.symbol ;
|
||||||
|
|
||||||
ARTICLE: "compiler-errors" "Compiler warnings and errors"
|
|
||||||
"After loading a vocabulary, you might see messages like:"
|
|
||||||
{ $code
|
|
||||||
":errors - print 2 compiler errors"
|
|
||||||
":warnings - print 50 compiler warnings"
|
|
||||||
}
|
|
||||||
"These messages arise from the compiler's stack effect checker. Production code should not have any warnings and errors in it. Warning and error conditions are documented in " { $link "inference-errors" } "."
|
|
||||||
$nl
|
|
||||||
"Words to view warnings and errors:"
|
|
||||||
{ $subsection :warnings }
|
|
||||||
{ $subsection :errors }
|
|
||||||
{ $subsection :linkage }
|
|
||||||
"Compiler warnings and errors are reported using the " { $link "tools.errors" } " mechanism and are shown in the " { $link "ui.tools.error-list" } "." ;
|
|
||||||
|
|
||||||
HELP: compiler-error
|
|
||||||
{ $values { "error" "an error" } { "word" word } }
|
|
||||||
{ $description "Saves the error for future persual via " { $link :errors } ", " { $link :warnings } " and " { $link :linkage } "." } ;
|
|
||||||
|
|
||||||
HELP: :errors
|
|
||||||
{ $description "Prints all serious compiler errors from the most recent compile to " { $link output-stream } "." } ;
|
|
||||||
|
|
||||||
HELP: :warnings
|
|
||||||
{ $description "Prints all ignorable compiler warnings from the most recent compile to " { $link output-stream } "." } ;
|
|
||||||
|
|
||||||
HELP: :linkage
|
|
||||||
{ $description "Prints all C library interface linkage errors from the most recent compile to " { $link output-stream } "." } ;
|
|
||||||
|
|
||||||
{ :errors :warnings } related-words
|
|
||||||
|
|
||||||
ABOUT: "compiler-errors"
|
ABOUT: "compiler-errors"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
! Copyright (C) 2007, 2009 Slava Pestov.
|
! Copyright (C) 2007, 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors source-files.errors kernel namespaces assocs
|
USING: accessors source-files.errors kernel namespaces assocs ;
|
||||||
tools.errors ;
|
|
||||||
IN: compiler.errors
|
IN: compiler.errors
|
||||||
|
|
||||||
TUPLE: compiler-error < source-file-error ;
|
TUPLE: compiler-error < source-file-error ;
|
||||||
|
@ -53,12 +52,3 @@ T{ error-type
|
||||||
: compiler-error ( error word -- )
|
: compiler-error ( error word -- )
|
||||||
compiler-errors get-global pick
|
compiler-errors get-global pick
|
||||||
[ [ [ <compiler-error> ] keep ] dip set-at ] [ delete-at drop ] if ;
|
[ [ [ <compiler-error> ] keep ] dip set-at ] [ delete-at drop ] if ;
|
||||||
|
|
||||||
: compiler-errors. ( type -- )
|
|
||||||
errors-of-type values errors. ;
|
|
||||||
|
|
||||||
: :errors ( -- ) +compiler-error+ compiler-errors. ;
|
|
||||||
|
|
||||||
: :warnings ( -- ) +compiler-warning+ compiler-errors. ;
|
|
||||||
|
|
||||||
: :linkage ( -- ) +linkage-error+ compiler-errors. ;
|
|
||||||
|
|
|
@ -1,5 +1,35 @@
|
||||||
IN: tools.errors
|
IN: tools.errors
|
||||||
USING: help.markup help.syntax source-files.errors ;
|
USING: help.markup help.syntax source-files.errors words io
|
||||||
|
compiler.errors ;
|
||||||
|
|
||||||
|
ARTICLE: "compiler-errors" "Compiler warnings and errors"
|
||||||
|
"After loading a vocabulary, you might see messages like:"
|
||||||
|
{ $code
|
||||||
|
":errors - print 2 compiler errors"
|
||||||
|
":warnings - print 50 compiler warnings"
|
||||||
|
}
|
||||||
|
"These messages arise from the compiler's stack effect checker. Production code should not have any warnings and errors in it. Warning and error conditions are documented in " { $link "inference-errors" } "."
|
||||||
|
$nl
|
||||||
|
"Words to view warnings and errors:"
|
||||||
|
{ $subsection :warnings }
|
||||||
|
{ $subsection :errors }
|
||||||
|
{ $subsection :linkage }
|
||||||
|
"Compiler warnings and errors are reported using the " { $link "tools.errors" } " mechanism and are shown in the " { $link "ui.tools.error-list" } "." ;
|
||||||
|
|
||||||
|
HELP: compiler-error
|
||||||
|
{ $values { "error" "an error" } { "word" word } }
|
||||||
|
{ $description "Saves the error for future persual via " { $link :errors } ", " { $link :warnings } " and " { $link :linkage } "." } ;
|
||||||
|
|
||||||
|
HELP: :errors
|
||||||
|
{ $description "Prints all serious compiler errors from the most recent compile to " { $link output-stream } "." } ;
|
||||||
|
|
||||||
|
HELP: :warnings
|
||||||
|
{ $description "Prints all ignorable compiler warnings from the most recent compile to " { $link output-stream } "." } ;
|
||||||
|
|
||||||
|
HELP: :linkage
|
||||||
|
{ $description "Prints all C library interface linkage errors from the most recent compile to " { $link output-stream } "." } ;
|
||||||
|
|
||||||
|
{ :errors :warnings :linkage } related-words
|
||||||
|
|
||||||
HELP: errors.
|
HELP: errors.
|
||||||
{ $values { "errors" "a sequence of " { $link source-file-error } " instances" } }
|
{ $values { "errors" "a sequence of " { $link source-file-error } " instances" } }
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
! Copyright (C) 2009 Slava Pestov.
|
! Copyright (C) 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: assocs debugger io kernel sequences source-files.errors
|
USING: assocs debugger io kernel sequences source-files.errors
|
||||||
summary accessors continuations make math.parser io.styles namespaces ;
|
summary accessors continuations make math.parser io.styles namespaces
|
||||||
|
compiler.errors ;
|
||||||
IN: tools.errors
|
IN: tools.errors
|
||||||
|
|
||||||
#! Tools for source-files.errors. Used by tools.tests and others
|
#! Tools for source-files.errors. Used by tools.tests and others
|
||||||
|
@ -30,3 +31,12 @@ M: source-file-error error.
|
||||||
[ [ nl ] [ error. ] interleave ]
|
[ [ nl ] [ error. ] interleave ]
|
||||||
bi*
|
bi*
|
||||||
] assoc-each ;
|
] assoc-each ;
|
||||||
|
|
||||||
|
: compiler-errors. ( type -- )
|
||||||
|
errors-of-type values errors. ;
|
||||||
|
|
||||||
|
: :errors ( -- ) +compiler-error+ compiler-errors. ;
|
||||||
|
|
||||||
|
: :warnings ( -- ) +compiler-warning+ compiler-errors. ;
|
||||||
|
|
||||||
|
: :linkage ( -- ) +linkage-error+ compiler-errors. ;
|
|
@ -180,6 +180,7 @@ SYMBOL: interactive-vocabs
|
||||||
"math.order"
|
"math.order"
|
||||||
"memory"
|
"memory"
|
||||||
"namespaces"
|
"namespaces"
|
||||||
|
"parser"
|
||||||
"prettyprint"
|
"prettyprint"
|
||||||
"see"
|
"see"
|
||||||
"sequences"
|
"sequences"
|
||||||
|
@ -191,6 +192,7 @@ SYMBOL: interactive-vocabs
|
||||||
"tools.annotations"
|
"tools.annotations"
|
||||||
"tools.crossref"
|
"tools.crossref"
|
||||||
"tools.disassembler"
|
"tools.disassembler"
|
||||||
|
"tools.errors"
|
||||||
"tools.memory"
|
"tools.memory"
|
||||||
"tools.profiler"
|
"tools.profiler"
|
||||||
"tools.test"
|
"tools.test"
|
||||||
|
|
Loading…
Reference in New Issue