☂️ hrw4u: split visitor.py into three passes (AST → sema → emitter)
I maintainer di solito rispondono entro 2 giorni
@masaori335 ci sta già lavorando.
Dal 15/9/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
tools/hrw4u/src/visitor.py — 1,208 LoC, 20 visit* methods — does all of this in one pass:
- resolves symbols
- checks hook validity and arguments
- applies sandbox policy
- allocates variable slots
- expands procedures by splicing source text
- and renders
.conf
I'd break it into three: an AST, a semantic-analysis pass (sema), and a .conf emitter. It is a refactor — no C++ changes, no grammar changes, no .conf output changes.
What the split buys
| Today | After | |
|---|---|---|
| Where a new check lives | a visit* method inside a 1,208-line file whose other job is text rendering |
a function over the resolved tree |
| When a check can run | only while .conf is being produced |
whenever the tree exists |
| What the language server runs | the whole compiler, .conf emission included, on every keystroke — and reads visitor._proc_registry, a private field |
sema, and stops there |
| Diagnostics | built from CST contexts inside the emitter | built from AST spans in sema — one wording for CLI and editor |
| The typed AST from #13126 | test-only and lossy; nothing consumes it | the production tree |
.conf emission |
the tail of the compiler | one consumer of the tree |
What it makes possible later
Because .conf emission becomes a consumer of the resolved tree rather than the compiler's tail,
another consumer can attach at the same point without touching the first — and any check added to
sema lands for both. That is the reason no .conf text appears in any sema_nodes node: the fork
point has to be format-neutral or it is not a fork point.
Tracking
- #13126
- #13699
- #13665
- semantic-analysis & hrw(.conf) emitter
- switch to new path
Related but independent
- #13656
- Lingua principale
- C++
- Stelle
- 2k
- Fork
- 878
- Merge medio
- 3g 16h
- PR unite (30g)
- 91
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/trafficserver
-
Bug HTTP Support
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
apache/trafficserver#13118 ·
I maintainer di solito rispondono entro 2 giorni
-
header_rewrite: rm-destination after set-destination URL crashes traffic_serverForse già presa @moonchen l’ha presa 6 giorni fa. ApertaBug Crash header_rewrite Plugins
apache/trafficserver#13800 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
apache/trafficserver#13798 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
apache/trafficserver#13784 ·
I maintainer di solito rispondono entro 2 giorni
-
Plugins
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
apache/trafficserver#13774 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di apache/trafficserver
Issue simili
-
c++ good first issue M2: audio plumbing no hardware needed tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
GageLawton/noise-cancellation#23 ·
I maintainer di solito rispondono entro 1 giorno
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
nullmoth/nvidia-macos-driver#126 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
objectionary/eo-graphs#85 ·
-
bug derived types format I/O medium priority semantics
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno