diff --git a/CLAUDE.md b/CLAUDE.md index 2aa3d68..9f92f10 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -23,7 +23,11 @@ user-facing strings, comments, and changelog entries. `.scx/.sct` (forms), `.vcx/.vct` (class libraries), `.frx/.frt` (reports), and `.mnx/.mpr` (menus) are VFP binary/generated artifacts — **edit them in the VFP IDE, not by hand.** `.mpr` is GENMENU-generated from `.mnx`; never hand-edit `.mpr`. -- **Version control is Subversion** (`.svn/`), not git. `COMUN/` is its own SVN working copy. +- **Version control: git runs in parallel with the legacy SVN.** SVN (`.svn/`) stays the source + of truth for the VFP binaries; git tracks their FoxBin2Prg text versions in-tree (see the + search section below). Remote: `git@gitea.romfast.ro:romfast/roaacnpro.git`. `COMUN/` is + git-ignored here and has its own repo, `git@gitea.romfast.ro:romfast/comun.git`, shared by + every ROA app. - **`config.fpw`** sets the runtime environment (CODEPAGE 1252, `EXCLUSIVE=OFF`, `SAFETY=OFF`, `MULTILOCKS=ON`). Don't enable SAFETY — the code relies on silent overwrite. - The compiler error log is `roaacnpro.ERR`; the runtime log is `log.txt`. Many entries in @@ -32,31 +36,40 @@ user-facing strings, comments, and changelog entries. ## Searching code inside `.vcx`/`.scx` (binary) libraries Most class/form code lives **inside binaries** (`.vcx`+`.vct`, `.scx`+`.sct`, …), not in `.prg`, -so plain grep can't read it cleanly. To search method/procedure bodies, convert the binaries to -their TEXT form first and grep the text. **At the start of a session (when work may touch -classes/forms), refresh the text cache** by running the helper, then search in the cache: +so plain grep can't read it cleanly. Git tracks the **FoxBin2Prg text versions** of these binaries +(`.vc2/.sc2/.fr2/.mn2`, …), generated in-tree next to each binary — not the binaries themselves. +Refresh them with `git_sync.ps1` at the start of every session and before any `git commit`: ```powershell -powershell -ExecutionPolicy Bypass -File D:\ROA\UTIL\foxbin2prg\vcx2txt.ps1 # incremental +powershell -ExecutionPolicy Bypass -File D:\ROA\UTIL\foxbin2prg\git_sync.ps1 -ProjectRoot D:\ROA\ROAACNPRO ``` -By default it is **project-driven**: it reads `roaacnpro.PJX` and converts only the `.vcx`/`.scx` -the project actually uses (~78 files), **not** all of `COMUN\` (most of which is unused). It writes -a mirrored text tree to `D:\ROA\_vfp_textcache\roacnpro\` -(e.g. `roacnpro\Clase\oacnpro.vc2`, `roacnpro\comun\clase\_frm_base.vc2`); then `Grep` there. -Useful flags: `-Types vcx,scx,frx,mnx` (also reports/menus), `-Source ` (one-off, -even outside the project), `-Force`, `-Clean`. For `.vcx`/`.scx`, real code changes can now be made -directly on the text and written back with `D:\ROA\UTIL\foxbin2prg\txt2vcx.ps1` (regenerates + -recompiles in staging, fidelity-checks, then copies into the project) instead of the VFP IDE — -`.mnx`/`.frx` remain IDE-only. See `D:\ROA\UTIL\foxbin2prg\CLAUDE.md` for the full write-back flow. +Then search the `.??2` files in-tree with Grep, citing `file:line`. For `.vcx`/`.scx`, real code +changes can now be made directly on the text and written back with +`D:\ROA\UTIL\foxbin2prg\txt2vcx.ps1 -TextFile -ProjectRoot 'D:\ROA\ROAACNPRO'` +(regenerates + recompiles in staging, fidelity-checks, then copies into the project) instead of +the VFP IDE — `.mnx`/`.frx` remain IDE-only. See `D:\ROA\UTIL\foxbin2prg\CLAUDE.md` for the full +write-back flow. 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 -(`-Grep`/`-Where`/`-Find`/`-Class`; its defaults already target this project). +before any `txt2vcx.ps1` edit to get the exact line range of the method you are changing. Its +built-in defaults already point at this project's in-tree text, so bare invocations work here; the +explicit form is: -Full search guide: **`COMUN\docs\cautare_vcx_vct.md`**. +```powershell +$s = 'D:\ROA\UTIL\foxbin2prg\vfp_symbols.ps1' +$c = @('-CacheRoot', 'D:\ROA\ROAACNPRO', '-ProjectRoot', 'D:\ROA\ROAACNPRO', '-IndexFile', 'D:\ROA\_vfp_textcache\roaacnpro\_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`**. ## The COMUN shared framework diff --git a/roaacnpro.pj2 b/roaacnpro.pj2 index 4a53892..6a3b2f7 100644 --- a/roaacnpro.pj2 +++ b/roaacnpro.pj2 @@ -25,7 +25,7 @@ _LegalTrademark = "" _ProductName = " " _MajorVer = "2" _MinorVer = "0" -_Revision = "6" +_Revision = "7" _LanguageID = "" _AutoIncrement = "0" *