Muta cache-urile text VFP in afara clonei foxbin2prg

ReCreate_FoxBin2Prg.prg face Prg2Bin recursiv pe tot folderul tool-ului (get_FilesFromDirectory intra in orice subfolder), deci _textcache_* aflate sub foxbin2prg erau scanate si .??2-urile din alte proiecte reconvertite in binare parazitare.

Cache-urile stau acum in D:\ROA\_vfp_textcache\{roacnpro,roagest,roaimob}, in afara clonei, unde ReCreate nu le mai poate atinge. Actualizat default CacheRoot in vcx2txt.ps1, exemplele din CLAUDE.md / PROMPT_cautare_vfp.md / git_svn_parallel_init_prompt.md si comentariul din .git/info/exclude.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-09 12:45:49 +03:00
parent ffdaa88d74
commit b449e0aa2f
4 changed files with 19 additions and 13 deletions

View File

@@ -11,7 +11,7 @@ This directory is a git clone with two remotes:
- **`origin`** = `https://github.com/fdbozzo/foxbin2prg.git` (upstream, read-only). `master` tracks `origin/master` and stays a pristine mirror.
- **`romfast`** = `git@gitea.romfast.ro:romfast/foxbin2prg.git` (our fork on Gitea, SSH). Working branch **`romfast`** (default on Gitea) = upstream `master` + the ROA additions committed (`vcx2txt.ps1`, `PROMPT_cautare_vfp.md`, `CLAUDE.md`, `git_svn_parallel_init_prompt.md`). The pre-git local state is kept on branch `local-snapshot-v1.21.04`.
Update flow (sync fork from upstream): `git fetch origin``git checkout master && git merge --ff-only origin/master``git checkout romfast && git merge master``git push romfast romfast master`. After any update, regenerate binaries/EXE in VFP9 with `DO ReCreate_FoxBin2Prg.prg` (an error about `TESTS\FXUResults.db2` is expected). `_textcache_*` caches and compiled binaries are kept out of git via the upstream `.gitignore` plus `.git/info/exclude`.
Update flow (sync fork from upstream): `git fetch origin``git checkout master && git merge --ff-only origin/master``git checkout romfast && git merge master``git push romfast romfast master`. After any update, regenerate binaries/EXE in VFP9 with `DO ReCreate_FoxBin2Prg.prg` (an error about `TESTS\FXUResults.db2` is expected). Text caches live outside this folder (`D:\ROA\_vfp_textcache\`, see below) so `ReCreate` never touches them; compiled binaries are kept out of git via the upstream `.gitignore` plus `.git/info/exclude` (which also still ignores any stray local `_textcache*`).
It serves two purposes:
@@ -21,14 +21,14 @@ It serves two purposes:
## Local additions (ROA-specific, not part of upstream)
- **`vcx2txt.ps1`** — PowerShell script that converts the VFP binaries of a project (read from its `.pjx`) into text under a cache folder, so the code inside `.vcx/.scx/.frx/.mnx/.dbc` binaries becomes greppable. Incremental (skips up-to-date files), does not need the VFP IDE open (uses the compiled `FoxBin2Prg.EXE`).
- **`_textcache_*` folders** (`_textcache`, `_textcache_roagest`, `_textcache_roaimob`) — per-project regenerable text caches. Safe to delete; never version them.
- **Text caches** live **outside this folder**, under `D:\ROA\_vfp_textcache\` (one subfolder per project: `roacnpro`, `roagest`, `roaimob`) — per-project regenerable text caches. Safe to delete; never version them. **They must stay outside `foxbin2prg`**: `ReCreate_FoxBin2Prg.prg` does a recursive `Prg2Bin` over the whole tool folder (`get_FilesFromDirectory` recurses into every subfolder, foxbin2prg.prg:6135) and would reconvert any `.??2` under it back into stray binaries.
- **`PROMPT_cautare_vfp.md`** — reusable prompt (Romanian) explaining how to set up this search flow in any VFP project. Read it before working on VFP code search.
**Golden rule:** the generated text cache is **read-only, for searching only**. Code changes to a VFP project are made in the VFP IDE on the binary files (`.vcx/.scx/...`), never by editing the cached text.
```powershell
# Populate/refresh a project's text cache (incremental)
& 'D:\ROA\UTIL\foxbin2prg\vcx2txt.ps1' -Project 'D:\ROA\ROAGEST\roagest.pjx' -ProjectRoot 'D:\ROA\ROAGEST' -CacheRoot 'D:\ROA\UTIL\foxbin2prg\_textcache_roagest'
& 'D:\ROA\UTIL\foxbin2prg\vcx2txt.ps1' -Project 'D:\ROA\ROAGEST\roagest.pjx' -ProjectRoot 'D:\ROA\ROAGEST' -CacheRoot 'D:\ROA\_vfp_textcache\roagest'
# Include reports/menus too: -Types vcx,scx,frx,mnx
# One-off conversion of a file/folder not in the project: -Source 'path\to\lib.vcx'