Act nowcan affect a running systemThe raw payload lists no superseded_by records. Upgrade sequencing therefore follows the actual same-day diffs and build progression embedded in the payload; build 2.4.18067 is its head revision.
Proxy and command-line APIs move while process and preprocessor fixes settle
THttpProxyServer moves from mormot.net.async to mormot.net.proxy, and ParseCommandArgs replaces its Boolean mode with TParseCommandOptions. ParamUtf8 standardizes startup arguments across Delphi and FPC, while later commits repair Windows compatibility and intermediate mistakes. Proxy shutdown, POSIX child cleanup, PDF/A-1 output and the JOP preprocessor also receive correctness fixes.
TL;DR
- Applications using THttpProxyServer must add mormot.net.proxy to their uses clause.
- Calls that pass the old Boolean mode to ParseCommandArgs or its wrappers must migrate to TParseCommandOptions.
- Take the ParamUtf8 and TExternalProcess sequences through builds 18038 and 18043 respectively, not their intermediate revisions.
- Build 18067 closes the day's remaining JOP preprocessor errors, including invalid JSON and unterminated verbatim input.
Upgrade advice
Land on build 2.4.18067. Do not cherry-pick the initial ParamUtf8, TExternalProcess or JOP commits without their same-day repairs. Update uses clauses for THttpProxyServer and replace Boolean ParseCommandArgs modes before rebuilding Delphi or FPC applications.
30 of 30 entries · 39 commits upstream
1
High
THttpProxyServer moves into mormot.net.proxy
The complete proxy and cache implementation is removed from mormot.net.async and placed in the new mormot.net.proxy unit. Lazarus packages, tests, examples and documentation add that unit; THttpAsyncServer.IdleEverySecond becomes public.
Breaking changes
mormot.net.async+1
f5b3e8cc+1660-1593
net: new mormot.net.proxy unit extracted from mormot.net.async - see #392
Impact
Delphi and FPC applications that instantiate THttpProxyServer from mormot.net.async will fail to compile until mormot.net.proxy is added to uses. Runtime behavior is intended to be a pure move.
Migration required
Search uses clauses for mormot.net.async where THttpProxyServer or its cache types are referenced and add mormot.net.proxy.
Public API
mormot.net.async.THttpProxyServerremoved — The type now lives in mormot.net.proxy.mormot.net.proxy.THttpProxyServeradded — The existing proxy API is exposed from the new unit.THttpAsyncServer.IdleEverySecondbehaviour-changed — Its visibility changes to public for proxy integration.
2
High
Command parsing replaces its Boolean mode with an option set
mormot.core.os adds TParseCommandOptions with pcoPosix and pcoNoCaretEscape. ParseCommandArgs, ExtractExecutableName and ExtractCommandArgs replace their final Boolean parameter with this set.
Breaking changes
mormot.core.os
4ba4120e+35-33
core: introducing TParseCommandOptions argument
Impact
Calls relying on defaults keep platform behavior, but Delphi or FPC code passing true or false explicitly no longer matches the signature and must use [pcoPosix] or [].
Migration required
Search for ParseCommandArgs, ExtractExecutableName and ExtractCommandArgs calls with a final Boolean argument; replace true with [pcoPosix] and false with [].
Public API
TParseCommandOptionsadded — Adds pcoPosix and pcoNoCaretEscape.ParseCommandArgssignature-changed — The posix Boolean becomes TParseCommandOptions.ExtractExecutableNamesignature-changed — The posix Boolean becomes TParseCommandOptions.ExtractCommandArgssignature-changed — The posix Boolean becomes TParseCommandOptions.
Units
3
High
TExternalProcess state flags become lock-protected
TExternalProcess replaces direct cross-thread flag access with SetFlag and IsSet under fSafe, corrects retained stderr selection, and synchronizes EOF, termination and zombie state across POSIX and Windows.
Fixes
mormot.core.os+2
5849944c+60-46
core: hardened TExternalProcess thread-safety
Impact
Delphi and FPC services that redirect child output avoid races between worker, wait and destruction paths, including hangs or stale state during shutdown.
Upgrade recommended
Take this locking fix together with build 18043, then test redirected stdout and stderr during termination.
4
High
Proxy shutdown waits for detached cache workers
THttpProxyServer counts detached downloads and cache-clean workers, decrements through completion callbacks, waits in Stop, and only then frees fPartials and URL state.
Fixes
mormot.net.proxy
dbd646e4+54-10
net: fixed THttpProxyServer shutdown after #780
Impact
Delphi and FPC proxy servers avoid random access violations and leaked partial-download objects when stopping or restarting during an active remote download.
Upgrade recommended
Upgrade proxy deployments to build 18037 or later and test stop/restart during a throttled download.
Units
5
High
JOP rejects malformed input and handles empty conditions correctly
mormot.core.fmt makes $ifdef require a non-empty variable, stops unterminated $$$ blocks at end of input, returns an empty result when JsonBufferReformat fails, and simplifies recursive text processing.
Fixes
mormot.core.fmt
b266d8bd+28-17
core: some other TPreprocText fixes
Impact
Backends using JsonPreprocess or TextPreprocess no longer keep invalid partial JSON, loop past unterminated verbatim input, or treat an empty definition as present. Delphi and FPC behavior is aligned.
Upgrade recommended
Take build 2.4.18067 if your application preprocesses JOP, JSON or text templates.
Units
6
High
ParamUtf8 follow-up fixes bounds and console behavior
The ParamUtf8 rollout fixes TCommandLine.CreateAsArray bounds, guards daemon and ECC arguments, copies the full array into TExecutableCommandLine, and corrects the no-prompt console condition.
Fixes
mormot.app.console+3
5c2aea31+18-15
core: some fixes after ParamUtf8[] introduction
Impact
Intermediate builds could skip arguments, index beyond the available array, or invert console pause behavior. Delphi and FPC applications should take this correction with the original rollout.
Upgrade recommended
Use build 18035 or later and rerun command-line tests with zero, one and multiple arguments.
7
High
Linux fpwaitid passes the siginfo buffer correctly
mormot.core.os.posix changes the raw Linux waitid syscall argument from the address of the pointer variable to the siginfo buffer pointer itself.
Fixes
mormot.core.os.posix
215b674f+4-4
core: fixed fpwaitid() syscall definition
Impact
FPC Linux backends using TExternalProcess with roWinJobCloseChildren avoid corrupted or unread exit information in the new no-reap path. Other platforms are unchanged.
Upgrade recommended
Do not stop on builds 18041 or 18042; take build 18043 or later for the corrected syscall.
Units
8
Medium
JOP escaping and include edge cases are corrected
mormot.core.fmt preserves stored value markers during expansion and uses JSON string scanning for quoted definitions. Tests cover escaping, comments, absolute includes and trailing spaces.
Fixes
mormot.core.fmt
aafda09f+136-8
test: cover JOP pre-processor new fixes
Impact
Generated JSON no longer double-escapes stored strings or loses quotes and backslashes in expanded values. No caller signature changes are introduced.
Units
9
Medium
Framework command-line consumers switch to ParamUtf8
Application, service, test and SOA command handlers replace ParamCount and ParamStr with ParamUtf8, and TExecutableCommandLine keeps empty raw arguments instead of dropping them.
Fixes
mormot.app.agl+5
5a52987f+42-47
core: fixed command line parameter usage
Impact
Command-line behavior becomes consistent between Delphi and FPC, including empty arguments. This intermediate commit has follow-up fixes in build 18035 and should not be isolated.
10
Medium
Text preprocessing supports recursive include files
mormot.core.fmt advances the include filename scanner correctly and routes included text back through TPreprocText.ProcessText instead of appending it verbatim.
Fixes
mormot.core.fmt
bee1685e+48-31
core: fixed TPreprocText $include
Impact
Nested includes and variables or conditions inside included text now execute as intended. Existing Delphi and FPC call sites do not change.
Units
11
Medium
JOP emits valid escaped JSON and optional debug comments
mormot.core.fmt escapes raw expanded text, preserves typed markers, fixes comment trimming, and only emits parser diagnostics when jppDebugComment is enabled.
Fixes
mormot.core.fmt
437474c1+58-20
core: several fixes to JOP pre-processor
Impact
Template values containing quotes, control characters or backslashes now remain valid JSON, while normal output is no longer polluted by debug comments. Application APIs are unchanged.
Units
12
Medium
PDF/A-1 always writes a compliant xref table
TPdfDocument.SaveToStreamDirectEnd suppresses xref and object streams for pdfa1A and pdfa1B even when the requested header is PDF 1.5 or later.
Fixes
mormot.ui.pdf
85ced2a7+62-3
ui: pdf - PDF/A-1 gets an xref table, whatever version its features ask for
Impact
PDF/A-1 documents using GeneratePdf15File, print scaling or optional content can pass validators such as veraPDF instead of violating the profile.
Upgrade recommended
Regenerate and validate PDF/A-1 documents that enable PDF 1.5 features or print scaling.
Units
13
Medium
Required positional arguments report the correct error
TExecutableCommandLine.DetectUnknown distinguishes an unexpected supplied argument from a missing required argument and generates argN when no description is available.
Fixes
mormot.core.os
2649f948+53-5
core: fix missing argument detection in TExecutableCommandLine
Impact
Command-line tools now produce accurate validation messages instead of indexing the wrong array or mislabeling missing input. No caller migration is needed.
Upgrade recommended
Upgrade command-line tools that validate required positional arguments and add a regression case for missing input.
Units
14
Medium
JOP definitions preserve HTTP and HTTPS addresses
mormot.core.fmt now treats // or # as a comment only at a token boundary, preserves URLs in plain, quoted and object definitions, and fixes template endpoint and right-trim bounds.
Fixes
mormot.core.fmt
4f3fa4f5+47-9
core: allow https://... URIs in JOP pre-processor
Impact
Configuration templates containing https:// values or fragments are no longer truncated as comments. Existing Delphi and FPC code needs no API change.
Units
15
Medium
Malformed switches no longer disappear silently
TExecutableCommandLine.Parse clears prior unknown errors and records empty switch names or name-less assignments such as -- and --=v in fUnknown.
Fixes
mormot.core.os
3b185959+23-21
core: detect void values with no silent drop
Impact
CLI validation now reports malformed user input instead of accepting it by omission. Existing application code compiles unchanged.
Worth a look
Units
16
Medium
Windows command parsing and legacy Delphi constants are corrected
mormot.core.os.windows declares CommandLineToArgvW as a function variable for delayed loading. DuckDB tests replace High(QWord) with QWord(-1) for Delphi 7 and 2007 compatibility.
Fixes
mormot.core.os.windows
caba2fcd+6-6
core: some Windows fixes
Impact
Windows startup can resolve CommandLineToArgvW through the intended delayed loader, and legacy Delphi test builds avoid an invalid QWord expression.
Upgrade recommended
Use build 18038 or later for Windows ParamUtf8 startup and legacy Delphi test builds.
17
Medium
Local proxy files ignore URL query strings
THttpProxyServer copies only Uri.Path into a terminated RawUtf8 before UrlDecodeVar, so the query component can no longer become part of the local filename.
Fixes
mormot.net.proxy
997f4b77+9-2
net: fixed THttpProxyServer local folder URI with a query string
Impact
Static assets requested with cache-busting queries such as ?v=2 return the underlying file instead of a false 404, while path safety checks remain active.
Upgrade recommended
Upgrade local-folder proxies and test static files with cache-busting query parameters.
Units
18
Medium
ETag-only proxy resources can return 304
THttpProxyUrl.ReturnFile now identifies remote resources by fSource rather than Last-Modified, allowing origin ETags to participate in If-None-Match validation.
Fixes
mormot.net.proxy
a4876b98+8-2
net: fixed THttpProxyServer 304 on a remote resource with only an ETag
Impact
Cached remote content without Last-Modified can produce HTTP 304 instead of resending the full body. Existing proxy configuration needs no change.
Upgrade recommended
Upgrade remote proxies and verify If-None-Match against an origin that omits Last-Modified.
Units
19
Medium
Proxy source paths receive a missing separator
THttpProxyServer.OnGetHeadRemoteUri appends a slash to a non-empty remote Source before joining the requested path when the configured Source lacks a trailing slash.
Fixes
mormot.net.proxy
7e27852d+7-0
net: fixed THttpProxyServer remote Source with no trailing /
Impact
Documented proxy sources such as http://host/folder now request /folder/file rather than /folderfile and avoid origin 404 responses.
Upgrade recommended
Upgrade proxies whose remote Source omits a trailing slash and test a nested origin path.
Units
20
Medium
Command-line value arrays can retain empty entries
Array-returning TExecutableCommandLine.Get overloads gain an includeempty Boolean, defaulting to false, for both TRawUtf8DynArray and TStringDynArray outputs.
New features
mormot.core.os
cfefdb66+68-12
core: new includeempty option to TExecutableCommandLine.Get()
Impact
Default behavior remains unchanged. Backends where an empty option value is meaningful can opt in without losing ordering on Delphi or FPC.
Worth a look
Public API
TExecutableCommandLine.Getsignature-changed — Array overloads add includeempty with a false default.
Units
21
Medium
ParamUtf8 exposes startup arguments consistently
mormot.core.os adds the global ParamUtf8 array. POSIX reads argv directly, while Windows uses CommandLineToArgvW so Delphi and FPC receive the same UTF-8 arguments.
New features
mormot.core.os+2
ca7d9ea9+35-3
core: introducing ParamUtf8[] global variable
Impact
Applications can consume predecoded UTF-8 arguments and avoid ParamStr differences. The initial Windows implementation requires the same-day compatibility fixes before deployment.
Worth a look
Public API
ParamUtf8added — Global TRawUtf8DynArray equivalent to ParamStr, populated at startup.
22
Medium
POSIX process owners can close surviving child groups
On Linux, FreeBSD and macOS, TExternalProcess with roWinJobCloseChildren uses waitid with WNOWAIT to retain an exited parent as a zombie until DoClose kills its process group and reaps it.
Compiler & platform
mormot.core.os+2
32a1058d+133-3
core: TExternalProcess roWinJobCloseChildren also closes the children on POSIX
Impact
POSIX services can now request Windows-like cleanup of children left after the direct process exits. RunRedirect still intentionally ignores this option on POSIX.
Worth a look
Public API
roWinJobCloseChildrenbehaviour-changed — The option now also closes surviving children on supported POSIX systems.
23
Medium
WinPE no longer requires shell32 for startup arguments
mormot.core.os.windows resolves CommandLineToArgvW dynamically and falls back to ParamStr when shell32 is unavailable, while retaining the standard parser on normal Windows.
Compiler & platform
mormot.core.os.windows
b8243fce+29-14
core: restore WinPE compatibility without shell32.dll
Impact
WinPE and similarly reduced Windows images can initialize ParamUtf8 instead of failing to load the executable because shell32.dll is absent.
Upgrade recommended
Upgrade WinPE targets to build 18036 or later and verify startup without shell32.dll.
24
Low
A public helper appends JSON-escaped UTF-8 text
mormot.core.json adds AdderJsonEscape, which appends a pointer range into TSynTempAdder while escaping JSON control characters and embedded #0 bytes.
New features
mormot.core.json
042a0243+41-3
core: new AdderJsonEscape() wrapper function
Impact
Existing backends are unaffected. Delphi and FPC code that builds JSON into TSynTempAdder can use the new helper instead of implementing its own escaping loop.
Public API
AdderJsonEscapeadded — Appends JSON-escaped UTF-8 from P through PEnd to TSynTempAdder.
Units
25
Low
TExternalProcess consolidates internal state flags
mormot.core.os packs TExternalProcess booleans into an internal flag set and normalizes POSIX handle initialization and waitid wrappers across compiler branches.
Under the hood
mormot.core.os+2
79a8e409+61-64
core: refactored TExternalProcess
Impact
No public API changes. This intermediate refactor is superseded in practice by the following locking and fpwaitid fixes and should not be taken alone.
26
Low
Internal command-line code adopts the UTF-8 argument array
mormot.app, mormot.core and mormot.soa code read ParamUtf8 instead of repeatedly converting ParamStr, including Windows service command matching.
Under the hood
mormot.app.agl+5
8b172724+15-22
all: use the new ParamUtf8[] whenever possible
Impact
No direct caller change. Framework tools gain consistent Unicode argument handling across Delphi and FPC, subject to the later fixes in the sequence.
27
Low
JOP behavior moves into a dedicated regression test
test.core.data adds TTestCoreProcess.TestJopProcess and moves text, JSON, conditional, include and insert preprocessing checks into that standalone method.
Tests
fefbbbe9+316-203
test: new clean stand-alone TTestCoreProcess.TestJopProcess method
Impact
There is no runtime or public API change. The dedicated test makes later JOP fixes easier to verify on Delphi and FPC.
28
Low
Malformed command switches receive regression tests
test.core.base covers empty positional arguments, empty parameter values, malformed switches and parser reset behavior, and runs TExternalProcess tests through the command-line suite.
Tests
645eae24+81-6
test: cover command line parsing as reported by #761
Impact
There is no independent production change. The tests document that malformed switches must remain visible to DetectUnknown rather than disappear silently.
29
Low
Caret parsing modes gain regression coverage
test.core.base covers legacy Windows caret escaping, pcoNoCaretEscape, POSIX parsing and ExtractExecutableName forwarding; mormot.core.os adds explanatory comments only.
Tests
mormot.core.os
672d88a8+24-2
test: cover regression for #764
Impact
There is no additional application-code change in this commit. It verifies the TParseCommandOptions behavior for Delphi and FPC builds.
Units
30
Low
PDF/A-1 cross-reference behavior is documented
mormot.ui.pdf documents that GeneratePdf15File changes the header under PDF/A-1 but still writes a classic xref table because that profile forbids xref streams.
Docs
mormot.ui.pdf
3073fd90+2-0
ui: pdf - GeneratePdf15File documented for PDF/A-1
Impact
There is no runtime change. The documentation clarifies the behavior introduced by the preceding PDF/A-1 fix for Delphi and FPC callers.