Skip to content

Propagate AST errors to the user#4408

Merged
nekevss merged 3 commits intoboa-dev:mainfrom
hansl:propagate-ast-error
Sep 5, 2025
Merged

Propagate AST errors to the user#4408
nekevss merged 3 commits intoboa-dev:mainfrom
hansl:propagate-ast-error

Conversation

@hansl
Copy link
Contributor

@hansl hansl commented Sep 4, 2025

This gives better error messages:

CleanShot 2025-09-04 at 11 44 05@2x

Prior to this PR, the message would simply say "invalid scope analysis" without any further reason.

@hansl hansl added the C-AST Issue surrounding the abstract syntax tree label Sep 4, 2025
@hansl hansl requested a review from a team September 4, 2025 19:01
@codecov
Copy link

codecov bot commented Sep 4, 2025

Codecov Report

❌ Patch coverage is 44.00000% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.69%. Comparing base (6ddc2b4) to head (cef9654).
⚠️ Report is 518 commits behind head on main.

Files with missing lines Patch % Lines
core/ast/src/source.rs 58.33% 5 Missing ⚠️
core/parser/src/parser/mod.rs 0.00% 4 Missing ⚠️
core/ast/src/function/ordinary_function.rs 0.00% 2 Missing ⚠️
core/ast/src/scope_analyzer.rs 66.66% 2 Missing ⚠️
core/engine/src/builtins/function/mod.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4408      +/-   ##
==========================================
+ Coverage   47.24%   50.69%   +3.45%     
==========================================
  Files         476      512      +36     
  Lines       46892    51356    +4464     
==========================================
+ Hits        22154    26035    +3881     
- Misses      24738    25321     +583     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@nekevss nekevss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@nekevss nekevss added this pull request to the merge queue Sep 5, 2025
Merged via the queue into boa-dev:main with commit b3ef88a Sep 5, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-AST Issue surrounding the abstract syntax tree

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants