.
D 2019-01-18T01:14:04.524
L v2.0-modularization-SOTU
N text/x-markdown
P e01efa3b59f47f9f5355b71cce3ecd0b417dea65
U bjbarcla
W 2802
# megatest branch: v2.01-local-mtfiles
# opensrc branch: modularize-debug
# goals:
## enable development of eggs without altering megatest install area
## decouple argument processing, debug messages, config file loading
## modularity
- compiler checks missing bindings (like perl -w)
- not all modules loaded at start
- reuse
# architecture notes:
## installation different.
- was:
- make install -> /bin
- now:
- make install -> /tmpinstall/{bin,eggs,share},
## how?
- link tree /tmpinstall/eggs
- during build, setenv CHICKEN\_REPOSITORY /tmpinstall/eggs/…
- at runtime, (repository-path /tmpinstall/eggs/…)
- mtconfigf.scm
- common.scm
## decoupling notes
- mtdebug
;; configure mtdebug ;; TODO: move to megatest.scm with other command line arg processing
(if (args:get-arg "-v") (debug:set-verbose-mode))
(if (args:get-arg "-q") (debug:set-quiet-mode))
(if (args:get-arg "-color")
(case (string->symbol (args:get-arg "-color"))
((y Y yes YES t T) (debug:force-color))
((n N no NO f F) (debug:suppress-color))))
debug 0,9 does not work
- mtconfigf
(define *default-log-port* (current-error-port))
(let* ((normal-fn debug:print)
(info-fn debug:print-info)
(error-fn debug:print-error)
(default-port *default-log-port*))
(configf:set-debug-printers normal-fn info-fn error-fn default-port))
(configf:add-eval-string "(import (prefix mtargs args:))
(import mtdebug)
(import (prefix mtconfigf configf:))")
## already: common\_records.scm included by many megatest scm's
## new:
- include modules.scm from common\_records.scm
- include modules.scm from scm's and utils that do not include common\_records.scm
## modules.scm:
- use's new eggs
- sets up new eggs (to be moved to megatest.scm and other toplevels (sauth, dashboard.scm, etc..)
## modules.scm
# completed:
## get thru ext-tests (almost all green except runconfig-tests)
## moved following from megatest source tree into opensrc/mtutils eggs:
- margs.scm -> mtargs
- debug: functions in common -> mtdebug
- configf.scm -> mtconfigf
## color mode for debug:print-error, debug:print-info
# in progress:
# not started & loose threads:
## common.scm -> mtcommon
## -show-config -debug 9
## Makefile dependency weirdness
## and the rest… in phase 2
## csi broken for (use mtdebug)
## move egg config from modules.scm to real toplevels (megatest.scm, sauthorize.scm, etc…)
Z 4f5e5618d9e71bf73a9b03fab2f05f9a