Skip to content

fixed #2747 and a number of other error scenarios like wrong module names#2749

Merged
DavyLandman merged 6 commits intomainfrom
fix/issue-2747
Apr 7, 2026
Merged

fixed #2747 and a number of other error scenarios like wrong module names#2749
DavyLandman merged 6 commits intomainfrom
fix/issue-2747

Conversation

@jurgenvinju
Copy link
Copy Markdown
Member

@jurgenvinju jurgenvinju commented Apr 6, 2026

  • fix the actual NPE by coupling the URI to the ModuleEnvironment as soon as possible
  • make sure users of theutil::EvalAPI can detect module load errors (it can not anymore due to the lazy reporting of module load errors introduced recently), note that util::Eval does not offer file watching, so we have to simulate reloading by re-importing.
  • write some tests for module loading and reloading using the new util::Eval
    1. import a module with a parse error, fix it, re-load
    2. import a module with a broken module name. fix it, re-load
    3. import a non-existing module, create it, re-try
    4. import a correct module, introduce a parse error, re-load, fix the parse error, re-load
    5. etc.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

❌ Patch coverage is 68.75000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 46%. Comparing base (1a68d99) to head (af23414).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
src/org/rascalmpl/semantics/dynamic/Import.java 40% 2 Missing and 1 partial ⚠️
src/org/rascalmpl/library/util/Eval.java 66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##              main   #2749   +/-   ##
=======================================
  Coverage       46%     46%           
- Complexity    6717    6725    +8     
=======================================
  Files          794     794           
  Lines        65912   65923   +11     
  Branches      9888    9888           
=======================================
+ Hits         30825   30840   +15     
+ Misses       32699   32695    -4     
  Partials      2388    2388           

☔ 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.

@jurgenvinju jurgenvinju marked this pull request as draft April 6, 2026 09:39
@jurgenvinju jurgenvinju self-assigned this Apr 6, 2026
@jurgenvinju jurgenvinju requested a review from DavyLandman April 6, 2026 17:02
@jurgenvinju
Copy link
Copy Markdown
Member Author

I didn't do the "etc." but more tests can be added easily based on this framework.

@jurgenvinju jurgenvinju marked this pull request as ready for review April 6, 2026 18:44
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 6, 2026

@jurgenvinju
Copy link
Copy Markdown
Member Author

@DavyLandman I added more tests after your review. that's it.

@DavyLandman DavyLandman merged commit 53d2faa into main Apr 7, 2026
9 checks passed
@jurgenvinju jurgenvinju deleted the fix/issue-2747 branch April 7, 2026 07:47
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