Skip to content

Fix module reload in the presence of file delete or rename#2660

Merged
DavyLandman merged 1 commit intomainfrom
fix/renamed-or-deleted-module-reload
Feb 18, 2026
Merged

Fix module reload in the presence of file delete or rename#2660
DavyLandman merged 1 commit intomainfrom
fix/renamed-or-deleted-module-reload

Conversation

@jurgenvinju
Copy link
Member

@jurgenvinju jurgenvinju commented Feb 18, 2026

  • don't crash without proper error message during reload if a file has dissappeared
  • solve confusing getLocation method name on Environment
  • check for other broken uses of getLocation
  • clarify error messages for missing modules who were imported or extended before the reloader started.
  • manually test happy flow for module reload, directly and indirectly
  • manually test reload with missing imports directly from the top level shell (via file rename)
  • manually test reload with missing imports indirectly via imports via imports (via file rename)

… clarity. Used heap.getModuleURI to check if a module file still exists or not
@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Feb 18, 2026

Codecov Report

❌ Patch coverage is 30.00000% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 46%. Comparing base (98c58e4) to head (b04f485).
⚠️ Report is 31 commits behind head on main.

Files with missing lines Patch % Lines
src/org/rascalmpl/interpreter/Evaluator.java 16% 9 Missing and 1 partial ⚠️
src/org/rascalmpl/interpreter/utils/Profiler.java 0% 3 Missing ⚠️
src/org/rascalmpl/semantics/dynamic/Import.java 0% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##              main   #2660   +/-   ##
=======================================
- Coverage       46%     46%   -1%     
+ Complexity    6682    6678    -4     
=======================================
  Files          795     795           
  Lines        65892   65895    +3     
  Branches      9877    9879    +2     
=======================================
- Hits         30710   30699   -11     
- Misses       32810   32821   +11     
- Partials      2372    2375    +3     

☔ 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

@toinehartman toinehartman left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this properly! Tested successful reloading and 'reloading' a removed module. The warnings now nicely indicate the cause of the warning as well. LGTM.

@DavyLandman DavyLandman merged commit bd53ba0 into main Feb 18, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments