Rather than issuing echo "cmd..." then cmd... itself, we enable shell trace
facility via set -x, which is POSIX shell standard command and is compatible
with all UNIX shells.
This effectively cuts build.sh size twice, since we don't need to double stuff
there, also making it human readable.
We are also setting PS4 (trace prefix) to none, instead final echo "SUCCESS",
we issue : SUCCESS command which outputs its contents in trace.
Previously it was not possible to use template arguments in template body as
the symbols were not resolved correctly leading to Error: undeclared
identifier: 'XX', eg.:
template defaultOf[T](t: T): expr = (var d: T; d)
echo defaultOf(1) #<- invalid identifier, but should output 0
The problem comes from the fact that macroOrTmpl[...] is transformed by
semSubscript which is trying to evaluate macroOrTmpl identifier in place. This
is okay for non-generic macros or templates, but wrong for generic ones, that
do not have a chance to receive their generic arguments explicitly specified in
brackets.
Solution:
1. macroOrTmpl[...] where macroOrTmpl is non-generic macro or template, then
macroOrTmpl is evaluated before applying brackets. (as before)
2. macroOrTmpl[...] where macroOrTmpl is generic macro or template, then if:
a. It comes from macroOrTmpl[...](...) call expr (efInCall), then macroOrTmpl
is turned into a symbol (efNoEvaluate) rather than evaluating it in place,
then whole bracket expr is returned to semIndirectOp which transforms it
to proper generic macro or template call with explicit generic arguments.
b. macroOrTmpl[...] does not come from call expr, as above macroOrTmpl is
transformed to symbol, then it is transformed into proper generic macro or
template call with explicit generic arguments and no normal arguments.
I am not sure since which version OS X does include the libiconv library
without the `lib` prefix. But it seems this is the case for some years
now. If there are ways to check for the OS X version at compile time
this may be needed to support older OS X versions. But I guess thats not
needed for most users working with Nim anyway.
adjust doco note: indent by one space
shorten doco example lines, by splitting across multiple lines
shorten doco line widths by splitting long lines into multi-lines
fix to prepare() example in doco "Note:" section
add instantRows() with SqlPrepared parameter
fix setupQuery() for SqlQuery to produce a unique identiying query name
add rows() iterator with SqlPrepared parameter
add execAffectedRows for SqlPrepared