From 47fc91e94833bede7cceffbd60f4baaa57a5a520 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Wed, 7 Dec 2011 10:52:58 -0800 Subject: [PATCH] command-line: don't pull in tools.errors tools.errors brings the debugger with it, which bloats deploy image size --- basis/command-line/command-line.factor | 15 +-------------- basis/compiler/errors/errors.factor | 12 +++++++++++- basis/tools/errors/errors.factor | 5 ++++- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/basis/command-line/command-line.factor b/basis/command-line/command-line.factor index bbabed7b53..20d1390a98 100644 --- a/basis/command-line/command-line.factor +++ b/basis/command-line/command-line.factor @@ -3,25 +3,12 @@ USING: accessors alien.strings assocs continuations fry init io.encodings.utf8 io.files io.pathnames kernel kernel.private namespaces parser parser.notes sequences source-files -source-files.errors splitting system tools.errors -vocabs.loader ; +source-files.errors splitting system vocabs.loader ; IN: command-line SYMBOL: user-init-errors SYMBOL: +user-init-error+ -T{ error-type - { type +user-init-error+ } - { word ":user-init-errors" } - { plural "rc file errors" } - { icon "vocab:ui/tools/error-list/icons/user-init-error.tiff" } - { quot [ user-init-errors get-global values ] } - { forget-quot [ user-init-errors get-global delete-at ] } -} define-error-type - -: :user-init-errors ( -- ) - user-init-errors get-global values errors. ; - TUPLE: user-init-error error file line# asset ; : ( error -- error' ) diff --git a/basis/compiler/errors/errors.factor b/basis/compiler/errors/errors.factor index 3c00c5173e..04d7958db8 100644 --- a/basis/compiler/errors/errors.factor +++ b/basis/compiler/errors/errors.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2007, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors source-files.errors kernel namespaces assocs fry -summary ; +summary command-line ; IN: compiler.errors SYMBOL: +compiler-error+ @@ -70,3 +70,13 @@ M: no-such-symbol summary drop "Symbol not found" ; : no-such-symbol ( name message word -- ) \ no-such-symbol linkage-error ; ERROR: not-compiled word error ; + +T{ error-type + { type +user-init-error+ } + { word ":user-init-errors" } + { plural "rc file errors" } + { icon "vocab:ui/tools/error-list/icons/user-init-error.tiff" } + { quot [ user-init-errors get-global values ] } + { forget-quot [ user-init-errors get-global delete-at ] } +} define-error-type + diff --git a/basis/tools/errors/errors.factor b/basis/tools/errors/errors.factor index e83f553f63..c51e756f73 100644 --- a/basis/tools/errors/errors.factor +++ b/basis/tools/errors/errors.factor @@ -2,7 +2,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: assocs debugger io kernel sequences source-files.errors summary accessors continuations make math.parser io.styles namespaces -compiler.errors prettyprint source-files.errors.debugger ; +compiler.errors prettyprint source-files.errors.debugger command-line ; IN: tools.errors #! Tools for source-files.errors. Used by tools.tests and others @@ -20,6 +20,9 @@ IN: tools.errors : :linkage ( -- ) linkage-errors get values errors. ; +: :user-init-errors ( -- ) + user-init-errors get-global values errors. ; + M: not-compiled summary word>> name>> "The word " " cannot be executed because it failed to compile" surround ;