From 5d60d96d501ea42cdbd8d261f994d405b6bb5039 Mon Sep 17 00:00:00 2001 From: Marius Mutu Date: Mon, 3 Aug 2026 08:55:59 +0300 Subject: [PATCH] CLAUDE.md: cautare pe simboluri VFP + corectare flux text in-tree Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01A5okKjUKMM5Xk1egq2w81P --- CLAUDE.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 525a52e..c749454 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -20,13 +20,29 @@ No build scripts, Makefiles, package manifests, CI config, or test suite exist i ## Searching inside compiled VFP binaries (foxbin2prg) -Most method/procedure code lives inside compiled `.vcx/.vct` (classes), `.scx/.sct` (forms), `.frx/.frt` (reports), `.mnx/.mnt` (menus) — grepping these binaries directly is unreliable. Use the shared `foxbin2prg` tool (already built at `D:\ROA\UTIL\foxbin2prg\FoxBin2Prg.EXE`) to decompile to readable text, then grep the text: +Git tracks the **FoxBin2Prg text versions** of the VFP binaries (`.vc2/.sc2/.fr2/.mn2/.lb2/.pj2/.dc2/.db2`), generated in-tree next to each binary — not the binaries themselves, which are git-ignored. Refresh with `git_sync.ps1` (folder-mode, recursive, incremental): ```powershell -& 'D:\ROA\UTIL\foxbin2prg\vcx2txt.ps1' -Project 'D:\ROA\ROAIMOB\roaimob.PJX' -ProjectRoot 'D:\ROA\ROAIMOB' -CacheRoot 'D:\ROA\_vfp_textcache\roaimob' -Types vcx,scx,frx,mnx +powershell -ExecutionPolicy Bypass -File D:\ROA\UTIL\foxbin2prg\git_sync.ps1 -ProjectRoot D:\ROA\ROAIMOB ``` -Reads the file list straight from `roaimob.PJX`, so it only converts files this project actually references (not all of `COMUN\`); incremental, safe to re-run after IDE edits. Output lands in `D:\ROA\_vfp_textcache\roaimob\` as `.vc2/.sc2/.fr2/.mn2` text mirrors — grep those. For `.vcx`/`.scx`, real code changes can now be made directly on the `.vc2`/`.sc2` text and written back with `D:\ROA\UTIL\foxbin2prg\txt2vcx.ps1` (regenerates + recompiles in staging, fidelity-checks, then copies into the project) instead of editing in the IDE — `.mnx`/`.frx` are still IDE-only. See `D:\ROA\UTIL\foxbin2prg\CLAUDE.md` for the full write-back flow and guard rails. +Run it **at the start of every session and before any `git commit`** so the text matches the binaries. It converts in a temp staging area and copies back only the text, continues past per-file failures, and exits nonzero on any failure: **do not commit while `git_sync` reports unexplained failures.** Then search the `.??2` files in-tree with Grep (e.g. `PROCEDURE do_salvare`), citing `file:line`. + +Editing: write-back text→binary via `txt2vcx.ps1` is supported **only for `.vc2/.sc2`** (vcx/scx); `.frx/.mnx/.lbx/.pjx/.dbc/.dbf` are editable **only in the VFP IDE** (no write-back). See `D:\ROA\UTIL\foxbin2prg\CLAUDE.md` and `COMUN\docs\flux-editare-vfp-text.md`. + +Grep can't tell **which class/method** a hit inside a `.vc2` belongs to (the class header may be thousands of lines above it, and ~2/3 of the file is properties/metadata). `vfp_symbols.ps1` indexes the line range of every class/method/procedure and labels hits with their owner — use it before any `txt2vcx.ps1` edit to get the exact line range of the method you are changing. Its built-in defaults target ROAACNPRO, so always pass this project's paths: + +```powershell +$s = 'D:\ROA\UTIL\foxbin2prg\vfp_symbols.ps1' +$c = @('-CacheRoot', 'D:\ROA\ROAIMOB', '-ProjectRoot', 'D:\ROA\ROAIMOB', '-IndexFile', 'D:\ROA\_vfp_textcache\roaimob\_symbols.tsv') + +powershell -ExecutionPolicy Bypass -File $s @c -Grep '' -CodeOnly # hits labeled class.method, code only +powershell -ExecutionPolicy Bypass -File $s @c -Where '.vc2:' # who owns this line +powershell -ExecutionPolicy Bypass -File $s @c -Find '' # where it is DEFINED +powershell -ExecutionPolicy Bypass -File $s @c -Class '' # inheritance chain + methods +``` + +The index (`_symbols.tsv`) rebuilds itself when the text is newer, so refresh the text first — it can't see IDE edits that were never converted. Full search guide: `COMUN\docs\cautare_vcx_vct.md`. ## Architecture