8000 fix: restore useful parse error messages in REPL (issue #78) by adityamukho · Pull Request #87 · project-minigraf/minigraf · GitHub
[go: up one dir, main page]

Skip to content

fix: restore useful parse error messages in REPL (issue #78) - #87

Merged
adityamukho merged 2 commits into
mainfrom
fix/issue-78-repl-parse-errors
Apr 4, 2026
Merged

adityamukho merged 2 commits into
mainfrom
fix/issue-78-repl-parse-errors

Conversation

@adityamukho
Copy link
Copy Markdown
Collaborator

Summary

  • Restore parse error message in REPL from "Parse error" to Parse error: {error}
  • Error messages now show structural info (e.g., "Unexpected token: RightParen", "Pattern must have exactly 3 elements") without exposing user-supplied data

Changes

  • src/repl.rs:103: Changed eprintln!("Parse error") to eprintln!("Parse error: {}", e)

Test

Verified locally:

  • (query [) → Parse error: Unexpected token: RightParen
  • (query [:find ?x :where [?e :a ?b c d]]) → Parse error: Pattern must have exactly 3 elements (E A V), got 5

Comment thread src/repl.rs Fixed
@codecov
codecov Bot commented Apr 3, 2026 •
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.55%. Comparing base (7b0f512) to head (a165cfe).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/repl.rs 0.00% 4 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #87      +/-   ##
==========================================
- Coverage   84.59%   84.55%   -0.04%     
==========================================
  Files          25       25              
  Lines        4549     4551       +2     
==========================================
  Hits         3848     3848              
- Misses        701      703       +2     
Files with missing lines Coverage Δ
src/repl.rs 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adityamukho
adityamukho force-pushed the fix/issue-78-repl-parse-errors branch 2 times, most recently from 66278cc to 426667d Compare Apri 8000 l 4, 2026 04:10
Comment thread src/repl.rs Fixed
@adityamukho
adityamukho force-pushed the fix/issue-78-repl-parse-errors branch from 426667d to a165cfe Compare April 4, 2026 04:15
@adityamukho
adityamukho merged commit f4e9eb7 into main Apr 4, 2026
14 of 15 checks passed
@adityamukho
adityamukho deleted the fix/issue-78-repl-parse-errors branch April 4, 2026 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0