„Optimize away” `parseFileContentsWithExts`?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Refactoring
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Ambito
- tooling
Direzione di ricerca
Start with the parseFileContentsWithExts call sites in src/Haskell/Template/Task.hs (around lines 746-760) and the file-based parsing in raw/embedded/src/TestHarness.hs (around lines 208-227), and compare them with the in-memory parse usages. Check the transitive callers and whether #83 and #68 already remove some of them. Done means the issue's questions are answered for each call site, with redundant parsing removed and the test suite still passing.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
At least after #83 and #68, some parsing work will probably be redundant.
Some (transitive) uses of parseFileContentsWithExts will likely have disappeared.
Others might be considered double work, since certain modules are already parsed with haskell-src-exts for other purposes than the nameModules-function.
Indeed, it is not very clear why parseFileContentsWithExts is currently used, parsing files, instead of parsing strings in memory as the parse function is doing for a lot of purposes: https://github.com/fmidue/haskell-template-task/blob/e4c0868c4ed8bd2606824ba7732a727d7ca3940a/src/Haskell/Template/Task.hs#L746-L760
Maybe it has to do with intricacies of dealing with extensions (in the package’s string parsing functions vs. its file parsing functions), given the comments at https://hackage-content.haskell.org/package/haskell-src-exts-1.24.0/docs/Language-Haskell-Exts-Parser.html#t:ParseMode.
Separately, the usages in https://github.com/fmidue/haskell-template-task/blob/e4c0868c4ed8bd2606824ba7732a727d7ca3940a/raw/embedded/src/TestHarness.hs#L208-L227 should be revisited. Do we really need to do file IO there, parsing the submission on disk? Haven’t we, at that point, already parsed the submission in memory anyway, for the TemplateMatch check at the very least?
- Lingua principale
- Haskell
- Stelle
- 0
- Fork
- 1
- Merge medio
- 2g 19h
- PR unite (30g)
- 7
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna 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 fmidue/haskell-template-task
-
Add more integration testsAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
-
Separate task config and task instanceForse già presa @nimec01 l’ha presa 89 giorni fa. Apertabefore-next-semester
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
fmidue/haskell-template-task#56 · 4 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
Tutte le issue di fmidue/haskell-template-task
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
haskell/bytestring#730 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
seal-harness/seal-harness#399 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
fmidue/codeworld-tasks#124 ·
-
allow haskell-src-exts-1.24Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
reflex-frp/reflex#563 ·