compiler1.py / compiler38.py appear to be dead code that has drifted from compiler.py (including missing bugfixes) — should be removed or clarified
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start by reviewing transcrypt/modules/org/transcrypt/compiler.py alongside compiler1.py and compiler38.py, then verify the references in transcrypt/main.py, setup.py, and MANIFEST.in. Confirm with maintainers whether the two files support an older Python version or another workflow; done means either removing the unused files or documenting their purpose and keeping them intentionally.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
While reviewing transcrypt/modules/org/transcrypt/, I noticed two files that closely mirror the main compiler but don't appear to be referenced anywhere in the codebase: compiler1.py and compiler38.py (each ~164KB, ~4,000 lines).
Investigation
Only compiler.py is imported at runtime:
$ grep -n "^from|^import" transcrypt/main.py | grep -i compil
from org.transcrypt import compiler
And a repo-wide search turns up no references to the other two:
$ grep -rln "compiler1|compiler38" --include=.py --include=.cfg --include=.in --include=.txt .
(no results)
Neither file appears in setup.py or MANIFEST.in as a distinct entry point either.
Evidence they've drifted from the maintained file
Because they're never exercised, compiler1.py and compiler38.py have fallen out of sync with compiler.py. One concrete example — compiler.py (line 96) has a guard the other two lack:
compiler.py
self.optionsChanged = project and utils.commandArgs.projectOptions != project.get('options')
compiler1.py / compiler38.py (identical in both)
self.optionsChanged = utils.commandArgs.projectOptions != project.get('options')
There are also larger structural differences in visit_Assign, around handling ast.Index / ast.ExtSlice (older Python AST shapes) vs. ast.Slice in compiler.py — this suggests compiler1.py/compiler38.py may be legacy per-Python-version forks that predate a later consolidation into compiler.py.
Why this seemed worth flagging
If these files are intentionally kept — e.g. for reference, rollback, or supporting an older Python version — that's completely reasonable. But as they stand, they're visually indistinguishable from live code to a new contributor, and a fix landed in compiler.py (like the guard above) gives no signal about whether the same fix is still needed, or already irrelevant, in the other two.
Questions
- Are compiler1.py / compiler38.py still needed for something (e.g. older Python version support), or are they safe to delete?
- If they're intentionally kept, would a short comment at the top of each file (or a note in CONTRIBUTING) explaining their purpose be welcome?
Happy to submit a small PR for either outcome — deletion or documentation — once I know which direction is preferred.
- Lingua principale
- Python
- Stelle
- 2.9k
- Fork
- 218
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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 TranscryptOrg/Transcrypt
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
TranscryptOrg/Transcrypt#913 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
TranscryptOrg/Transcrypt#911 · 2 commenti ·
-
IS: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
TranscryptOrg/Transcrypt#908 ·
-
SUB: documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
TranscryptOrg/Transcrypt#656 · 7 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
TranscryptOrg/Transcrypt#914 ·
Tutte le issue di TranscryptOrg/Transcrypt
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
zostera/django-bootstrap4#894 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
use-agent-os/agent-os#3276 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
NousResearch/hermes-agent#117848 ·