Skip to content

fix/parser storage stability#2759

Open
jurgenvinju wants to merge 6 commits intomainfrom
fix/parser-storage-stability
Open

fix/parser storage stability#2759
jurgenvinju wants to merge 6 commits intomainfrom
fix/parser-storage-stability

Conversation

@jurgenvinju
Copy link
Copy Markdown
Member

@jurgenvinju jurgenvinju commented Apr 17, 2026

This PR is to help diagnostics of issues during parser storage (and the implicit parser generation process below it).

One of the main issues we encounter when using the parser storage features is incompleteness of the specification as a whole (missing modules which are imported or extended but not represented). A bit of incompleteness improves efficiency (a lot), so users filter their lists of modules. This may lead to missing syntax rules eventually. The current PR makes filtering a builtin feature, and reports missing modules as warnings so things do not go south implicitly anymore, and finally makes underlying filesystem API fail faster in the presence of non-existing folders.

  • adds exclude filters to all file system crawl and find functions, this helps adding the ignore feature to the parser generator
  • links pcfg.ignores to the file system crawl excludes for Rascal modules during (stored) parser generation; now people can use this feature without having to filter themselves (filtering modules has big efficiency benefits).
  • improved reporting on missing modules during parser generation by adding localized warnings.. If a filter was too strong, now we can see that happening. Before we only saw empty grammars.
  • makes util::FileSystem functions throw PathNotFound if the provided folders do not exist This fails a lot faster and a lot clearer than the dozens of missing modules you get from that. This helps when using the lib scheme which is not implemented anymore.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46%. Comparing base (f6d6bbe) to head (8ae5d13).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##              main   #2759   +/-   ##
=======================================
  Coverage       46%     46%           
- Complexity    6725    6733    +8     
=======================================
  Files          794     794           
  Lines        65923   65923           
  Branches      9888    9888           
=======================================
+ Hits         30837   30838    +1     
+ Misses       32696   32695    -1     
  Partials      2390    2390           

☔ 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 self-assigned this Apr 20, 2026
… such that the directory provided at the top-level of the recursion must at least exist, and lower levels do not check existence because .ls already guarantees existence modulo races on disk
@jurgenvinju jurgenvinju requested a review from DavyLandman April 20, 2026 09:38
Copy link
Copy Markdown
Member

@DavyLandman DavyLandman left a comment

Choose a reason for hiding this comment

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

Looks good, but I found 1 case where the param wasn't set for down-stream calls.

Comment thread src/org/rascalmpl/library/util/FileSystem.rsc Outdated
@sonarqubecloud
Copy link
Copy Markdown

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