Repository navigation
RunFile: build with dcc64 - #620
Merged
Merged
Conversation
Three Delphi-only compile errors in PasClaw.Gateway.RunFile (from #613), none of which FPC sees -- two are in the Windows branch and the third is an FPC-only RTL function: - E2003 PROCESS_QUERY_LIMITED_INFORMATION: dcc64's Winapi.Windows does not declare it. Declared here as RUNFILE_PROCESS_QUERY_LIMITED ($1000) under MSWINDOWS -- our own name, so it cannot collide with a Windows unit that does. - E2003 LocalTimeToUniversal: FPC's DateUtils only. started_at now comes from PasClaw.Utils.NowIsoUtc, which already picks TTimeZone.Local.ToUniversalTime on Delphi (as Agents and MemoryFetch do) and quotes its separators: the old format string left ':' bare, which FormatDateTime replaces with the locale's time separator. DateUtils is no longer used and leaves the uses clause. - E2010 DeleteFile: Winapi.Windows comes after SysUtils in scope on Delphi, so its DeleteFile(PWideChar) won over SysUtils.DeleteFile. Now SysUtils.DeleteFile, by name. A scan of the units #608 through #618 touched found no other unguarded FPC-only identifier and no other Windows-shadowed RTL call. Tested: FPC build, test-runfile (now also checks started_at is ISO 8601 UTC with literal separators). Not run: dcc64 -- there is no Delphi compiler in this environment, and no win64 RTL for FPC either, so the Windows branch is unbuilt here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KYD1zZPD7GuM8pF1btwi2U
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
FMXExpress
pushed a commit
that referenced
this pull request
Oct 26, 2026
dcc64 stopped in PasClaw.Backup with E2003 on GetProcessID (lines 697 and 786, the stage and restore temp dirs), so PasClaw.Maintain and everything above it failed with F2063. GetProcessID is FPC's SysUtils only. PasClaw.Platform gains CurrentPid: GetProcessID on FPC, and on Delphi GetCurrentProcessId / getpid from Winapi.Windows / Posix.Unistd, which Platform already uses. It lives there rather than as a fourth private copy (Cmd.Relay, Tools.RPC and Gateway.RunFile each have one) because the alternative for Backup -- Winapi.Windows in its own uses clause -- would let Windows' DeleteFile and friends shadow SysUtils' in a unit that deletes and copies files, the error #620 fixed in RunFile. Backup lists Platform ahead of its other PasClaw units, and Platform exports no RTL name, so nothing it already resolved changes. The same scan, over all of src this time rather than only the units #608-#618 touched (Backup predates them, which is how #620's scan missed it), found one more: the gateway's permission-ask id called GetTickCount64, which PasClaw.Cmd.Relay records as dcc64 E2003. The id now takes its prefix from DateUtils.MilliSecondOfTheDay, same resolution and same purpose -- a restarted gateway's ids stay apart from ones a stale web UI tab may still answer. Not Random: nothing in the gateway calls Randomize, so its sequence repeats every restart. With these, the scan finds no unguarded FPC-only identifier in src. Tested: FPC build; test-backup, test-maintain, test-permissions. Not run: dcc64 -- no Delphi compiler here. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KYD1zZPD7GuM8pF1btwi2U
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Delphi build stopped in
PasClaw.Gateway.RunFile(from #613), so every unit that uses it, starting withPasClaw.Cmd.Attach, failed with F2063:FPC never saw any of the three: two are in the Windows branch, and the third is an FPC-only RTL function.
Fixes
PROCESS_QUERY_LIMITED_INFORMATION: dcc64'sWinapi.Windowsdoes not declare it. It is now declared in the unit, underMSWINDOWS, asRUNFILE_PROCESS_QUERY_LIMITED = $1000. That is our own name, so it cannot collide with a Windows unit that does declare it.LocalTimeToUniversal: only FPC'sDateUtilshas it.started_atnow comes fromPasClaw.Utils.NowIsoUtc, which already picksTTimeZone.Local.ToUniversalTimeon Delphi (asPasClaw.AgentsandPasClaw.Tools.MemoryFetchdo). It also quotes its separators; the old format string left:bare, whichFormatDateTimereplaces with the locale's time separator.DateUtilsis no longer used and is removed from the uses clause.DeleteFile: on Delphi,Winapi.Windowscomes afterSysUtilsin scope, so itsDeleteFile(PWideChar)won overSysUtils.DeleteFile(string). The call is nowSysUtils.DeleteFile, by name.I also scanned every unit #608 through #618 touched for other unguarded FPC-only identifiers (
LocalTimeToUniversal,fpKill,GetProcessID,cint, …) and for unqualifiedDeleteFile-style calls in units that useWinapi.Windows. Nothing else turned up.Tests
make test-runfilepasses, and now also checks thatstarted_atis ISO 8601 UTC with literal separators.Not run: dcc64. There is no Delphi compiler in this environment, and no win64 RTL for FPC either, so the Windows branch was not built here. Please confirm with the Delphi build.
Generated by Claude Code