JetCore engine (Tag.cpp/.h, Global.cpp/.h, __*.cpp tag classes): - Numerous __mysql.cpp connection-pooling correctness fixes (stale result sets, double-indirection sessionid bugs, field caching, pool keying) and a session-registration-before-connection-confirmed ordering fix (dangling pointer on a failed connect) - Tag.cpp: large body of fixes to the tag-dispatch/container-scanning logic (bare-name fallback, database aliasing, single-quote handling, @-prefix session variable resolution, TAGDEF caching, nested split-tag scanning for if/while/until/ifrow so an inner one doesn't corrupt an outer one's own boundary scan) plus the process-first rendering order fix (a <process> now runs before <checksession>/page resolution, fixing a real "blank page after successful login" bug) - Global.h/.cpp: added imapSessions (parallel to the existing __mysql* session map) for the new <imap> tag family - __whiledir.cpp/__include.cpp: caching and directory-name-aliasing fixes - __call.cpp/.h: fixed a dangling-pointer bug - __write.cpp: fixed an O_WRONLY-only open that couldn't create a new file - __ifrow.cpp/__sql.cpp: fixed the same sessionid double-indirection bug __mysql.cpp had (resolveKeyword's result was being used as a map key lookup instead of the resolved value itself) jetc compiler (jetc/JetParser.cpp/.h, JetCodegen.cpp/.h, JetAST.h, jetc.cpp, build-shared.sh, build-compiled.sh): - Parser fixes: inline <include>, nested-quote handling, void-tag recognition - Codegen fixes and expanded AST support - build-shared.sh: atomic rename into place for a freshly-built .jtc (a live server dlopen()ing the same path mid-rebuild was corrupting its own already-mapped view of the old file) and a staleness check so a cached JetCore .o doesn't silently keep serving yesterday's fixes forever - Added -lssl to both build scripts' link lines (needed once the new <imap> tag's client-side TLS code existed - previously nothing in this codebase used OpenSSL's SSL/TLS client API, only libcrypto) Site content (jetc/barant-site/): SPA (fetch-and-swap navigation) rollout across essentially every .page/.jet/.section/.tag/.proc/.method file - dynamic-content fixes, fragment-mode stripping, native $[@name] session variables replacing older mechanisms, and this session's own checkout.page redesign, login start-param redirect fix, and per-page side-menu (menu.bar/$[PAGE].menu) refresh support. Completed the earlier main.css/control.css move from assets/ to assets/images/ (git still showed the old paths as tracked-but-deleted until now). Deliberately left out of this commit: dozens of .pre-<description>- <date> manual backup files (this session's and earlier ones' own before/after snapshots, not meant for permanent history), compiled .jtc build outputs, ad hoc test binaries and scripts under jetc/ (login_asan, wcwc_test, optest2_bin, etc.), and jetc/__pycache__/ - none of these are meant to be tracked; a .gitignore covering them would be worth adding separately.
50 lines
1.6 KiB
Bash
Executable File
50 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
# Builds jetc itself (if needed), compiles a .jet file to C++, and links the
|
|
# result into a standalone executable against CoreUtils + the JetCore
|
|
# runtime (everything jet-2.0 itself links against, minus jet-2.0.cpp's own
|
|
# main() - the compiled program brings its own).
|
|
#
|
|
# Usage: ./build-compiled.sh <input.jet> <output-binary-name>
|
|
|
|
set -e
|
|
JC="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
CU="$JC/../CoreUtils"
|
|
HERE="$JC/jetc"
|
|
|
|
if [ $# -ne 2 ]; then
|
|
echo "usage: $0 <input.jet> <output-binary-name>"
|
|
exit 1
|
|
fi
|
|
|
|
INPUT="$1"
|
|
OUTNAME="$2"
|
|
|
|
if [ ! -x "$HERE/jetc" ]; then
|
|
echo "Building jetc..."
|
|
g++ -g -std=c++23 -o "$HERE/jetc" "$HERE/jetc.cpp" "$HERE/JetParser.cpp" "$HERE/JetCodegen.cpp"
|
|
fi
|
|
|
|
echo "Compiling $INPUT -> $OUTNAME.compiled.cpp"
|
|
"$HERE/jetc" "$INPUT" "$HERE/$OUTNAME.compiled.cpp"
|
|
|
|
echo "Building JetCore runtime objects (everything Tag::interpretSpan's fallback path may need)..."
|
|
# Rebuild whenever the source is newer than the cached object, not just
|
|
# when the object is missing - same stale-cache bug found and fixed in
|
|
# build-shared.sh (see its comment for the full story).
|
|
list=""
|
|
for f in "$JC"/*.cpp; do
|
|
base=$(basename "$f")
|
|
if [ "$base" = "jet-2.0.cpp" ]; then continue; fi
|
|
obj="$HERE/${base%.cpp}.o"
|
|
if [ ! -f "$obj" ] || [ "$f" -nt "$obj" ]; then
|
|
g++ -g -c -std=c++23 -I"$CU" -I"$JC" "$f" -o "$obj" &
|
|
fi
|
|
list="$list $obj"
|
|
done
|
|
wait
|
|
|
|
g++ -g -c -std=c++23 -I"$CU" -I"$JC" "$HERE/$OUTNAME.compiled.cpp" -o "$HERE/$OUTNAME.compiled.o"
|
|
g++ -g -o "$HERE/$OUTNAME" "$HERE/$OUTNAME.compiled.o" $list -std=c++23 -L"$CU" -lCoreUtils -lmysqlclient -lssl -lcrypto
|
|
|
|
echo "Built $HERE/$OUTNAME"
|