Skip to content

Show error on missing Rascal dependency - #2861

Open
toinehartman wants to merge 1 commit into
mainfrom
feature/error-on-missing-rascal-dependency
Open

Show error on missing Rascal dependency#2861
toinehartman wants to merge 1 commit into
mainfrom
feature/error-on-missing-rascal-dependency

Conversation

@toinehartman

@toinehartman toinehartman commented Aug 18, 2026

Copy link
Copy Markdown
Member

Show errors while requesting a path config for projects Rascal projects without a dependency on Rascal.

Prerequisite for proper functioning of

@toinehartman
toinehartman force-pushed the feature/error-on-missing-rascal-dependency branch from 0b22f22 to 0efba40 Compare August 18, 2026 14:56
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 46%. Comparing base (8fd6b5b) to head (0efba40).

Files with missing lines Patch % Lines
src/org/rascalmpl/library/util/PathConfig.java 16% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##              main   #2861   +/-   ##
=======================================
- Coverage       46%     46%   -1%     
+ Complexity    6766    6756   -10     
=======================================
  Files          841     841           
  Lines        67065   67071    +6     
  Branches     10020   10022    +2     
=======================================
- Hits         30880   30866   -14     
- Misses       33817   33833   +16     
- Partials      2368    2372    +4     

☔ View full report in Codecov by Harness.
📢 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.

@DavyLandman

Copy link
Copy Markdown
Member

I'm a bit on the fence on this change. Since it requires all scenarios to have a pom.xml, which we don't always have, and normally we have a reasonable fallback there.

And what if some this code is used during construction of a REPL, than rascal should flow from the classpath of the REPL. So I'm not sure if we should make this an error at this level?

What are for example the effects of this change for:

  • REPL startup in a project without a pom.xml
  • REPL startup in a directory without a rascal project
  • typechecking a project in VS Code that doesn't have a pom.xml

@toinehartman

Copy link
Copy Markdown
Member Author

REPL startup in a directory without a rascal project

In this case, since path configs are only meant for source projects, I think a path config should not be built at all. So this error should not show.

a project without a pom.xml

Since this will result in an empty class path, it will raise the error. We could of course check if a POM exists and only show it in that case. Or we lower the level of the diagnostic to a warning, since indeed, we have reasonable default values for Rascal and Rascal LSP in case they are missing from the POM.

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.

2 participants