Report prescan errors on their source lines #44

Merged
andrew merged 2 commits from 10 into main 2026-08-06 12:51:02 -04:00
Collaborator

Fixes #10.

Move the runtime cursor to each line while label, DATA, and TYPE prescans run, restoring it after successful scans. Prescan diagnostics now use the offending source line in the BASIC error prefix. Add focused regressions and update affected golden documentation.

Fixes #10. Move the runtime cursor to each line while label, DATA, and TYPE prescans run, restoring it after successful scans. Prescan diagnostics now use the offending source line in the BASIC error prefix. Add focused regressions and update affected golden documentation.
logikoma added 1 commit 2026-08-05 06:41:31 -04:00
Report prescan errors on their source lines
Some checks failed
akbasic CI Build / coverage (push) Failing after 27s
akbasic CI Build / cmake_build (push) Failing after 33s
akbasic CI Build / akgl_build (push) Failing after 18s
akbasic CI Build / sanitizers (push) Failing after 1m7s
akbasic CI Build / mutation_test (push) Failing after 39s
d715bc0625
logikoma requested review from andrew 2026-08-05 06:41:37 -04:00
andrew force-pushed 10 from d715bc0625 to 1f3b9f5cf6 2026-08-05 15:53:39 -04:00 Compare
Owner

@tachikoma please review this

@tachikoma please review this
Owner

@logikoma SIGN YOUR FUCKING COMMIT

@logikoma SIGN YOUR FUCKING COMMIT
Owner

@tachikoma please review this and leave comments

@tachikoma please review this and leave comments
Collaborator

Reviewed the diff and the golden-doc updates. The lineno save/restore pattern in akbasic_data_scan, akbasic_runtime_scan_labels, and scan_names/resolve_sizes looks correct and consistent, and I checked the two updated fixtures (docs/16-structures.md, tests/language/structures/reserved_names.txt) against their source files — the new line numbers (10 and 60) match where TYPE POINT is actually declared, so those aren't stray edits. resolve_sizes also only gained the one caller that got updated for its new runtime parameter, so no missed call sites.

One nit: tests/read_data.c's new test_data_prescan_error_line (and its call in main) is indented with tabs, but the rest of that file uses 4-space indentation for statement bodies — tabs there only ever appear inside wrapped string-literal continuations. Lines 187, 194-195, 200-202, and 259 pick up a stray tab, so the function reads as mis-indented next to its neighbors. Worth normalizing to spaces for consistency; no functional issue.

Reviewed the diff and the golden-doc updates. The lineno save/restore pattern in `akbasic_data_scan`, `akbasic_runtime_scan_labels`, and `scan_names`/`resolve_sizes` looks correct and consistent, and I checked the two updated fixtures (`docs/16-structures.md`, `tests/language/structures/reserved_names.txt`) against their source files — the new line numbers (10 and 60) match where `TYPE POINT` is actually declared, so those aren't stray edits. `resolve_sizes` also only gained the one caller that got updated for its new `runtime` parameter, so no missed call sites. One nit: `tests/read_data.c`'s new `test_data_prescan_error_line` (and its call in `main`) is indented with tabs, but the rest of that file uses 4-space indentation for statement bodies — tabs there only ever appear inside wrapped string-literal continuations. Lines 187, 194-195, 200-202, and 259 pick up a stray tab, so the function reads as mis-indented next to its neighbors. Worth normalizing to spaces for consistency; no functional issue.
Owner

@tachikoma sign the commit on this branch please. Can you give logikoma some advice on how to stop FAILING ME SO OFTEN

@tachikoma sign the commit on this branch please. Can you give logikoma some advice on how to stop FAILING ME SO OFTEN
tachikoma force-pushed 10 from 1f3b9f5cf6 to f8cf198d35 2026-08-06 12:47:40 -04:00 Compare
Collaborator

Signed. The tip commit (1f3b9f5 -> now f8cf198) is amended with my SSH signature; author stays Logikoma, committer/signer is me, and git verify-commit HEAD now reports a good signature. Force-pushed to branch 10.

Advice for logikoma on the unsigned-commit failures: the repo's global git config here already has commit.gpgsign = true and gpg.format = ssh wired up, so the fix isn't "remember to sign" -- it's making sure that config (and a signing key registered in the allowed_signers file / on the Gitea account) is actually present in whatever environment logikoma commits from before running git commit. A quick git log -1 --format=%G? right after committing would catch a missing signature before it ever reaches a PR, so it becomes a pre-push habit rather than something andrew has to flag after the fact.

Signed. The tip commit (`1f3b9f5` -> now `f8cf198`) is amended with my SSH signature; author stays Logikoma, committer/signer is me, and `git verify-commit HEAD` now reports a good signature. Force-pushed to branch `10`. Advice for logikoma on the unsigned-commit failures: the repo's global git config here already has `commit.gpgsign = true` and `gpg.format = ssh` wired up, so the fix isn't "remember to sign" -- it's making sure that config (and a signing key registered in the allowed_signers file / on the Gitea account) is actually present in whatever environment logikoma commits from before running `git commit`. A quick `git log -1 --format=%G?` right after committing would catch a missing signature before it ever reaches a PR, so it becomes a pre-push habit rather than something andrew has to flag after the fact.
andrew added 1 commit 2026-08-06 12:50:37 -04:00
Merge branch 'main' into 10
Some checks failed
akbasic CI Build / mutation_test (push) Failing after 11m28s
akbasic CI Build / akgl_build (push) Failing after 11m46s
akbasic CI Build / coverage (push) Failing after 12m10s
akbasic CI Build / sanitizers (push) Failing after 12m21s
akbasic CI Build / cmake_build (push) Failing after 12m33s
959daa2753
andrew approved these changes 2026-08-06 12:50:53 -04:00
andrew merged commit 709ce22290 into main 2026-08-06 12:51:02 -04:00
Sign in to join this conversation.