Skip to content

fix/remove-anno-code-from-compiler#2772

Open
jurgenvinju wants to merge 25 commits into
mainfrom
fix/double-src-resolutions
Open

fix/remove-anno-code-from-compiler#2772
jurgenvinju wants to merge 25 commits into
mainfrom
fix/double-src-resolutions

Conversation

@jurgenvinju
Copy link
Copy Markdown
Member

@jurgenvinju jurgenvinju commented May 15, 2026

NOTE1: the underlying cause of the errors mentioned below has been solved and was unrelated to the removal of annotations. The replacement of e.lhs@\loc by e.lhs.src (with e of type Expression in the Rascal grammar) exposed missing cases in the handling of field selection).

However, this pull request removes annotion-related code from the compiler that we want to preserve.

NOTE 2: name of PR has been changed to better reflect the situation. The branch name is still a misnomer


The final bootstrap of removing Tree@\loc led to these errors while checking the final compilation of the compiler:

These errors are from the log https://github.com/usethesource/rascal-core-big-tests/actions/runs/25805901058 and not consecutively:

[ERROR] src/org/rascalmpl/library/lang/rascal/tests/basic/Functions.rsc:0304:017: Argument 0 should have type `&S(&U)(int(int,int),&T)`, found `&S(&U)(&S(&T,&U),&T)`
[ERROR] src/org/rascalmpl/compiler/lang/rascalcore/compile/Rascal2muRascal/RascalExpression.rsc:0142:056: Base expression of field selection is ambiguous and should be resolved
[ERROR] src/org/rascalmpl/compiler/lang/rascalcore/compile/Rascal2muRascal/RascalExpression.rsc:0147:056: Base expression of field selection is ambiguous and should be resolved
[ERROR] src/org/rascalmpl/compiler/lang/rascalcore/compile/Rascal2muRascal/RascalExpression.rsc:1160:118: Base expression of field selection is ambiguous and should be resolved

We focus first on the last three issues where:

  • we see that someBase.someField.src is now leading to the "Base expression of field selection is ambiguous and should be resolved" error,
  • where before the <base>.someField@\loc did not.
  • We don't know yet if someBase.someField is the base we are talking about in this error message, or just someBase.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 46%. Comparing base (8a081c7) to head (f2322c6).

Files with missing lines Patch % Lines
...rc/org/rascalmpl/semantics/dynamic/Expression.java 0% 2 Missing ⚠️
...rg/rascalmpl/interpreter/result/ElementResult.java 0% 1 Missing ⚠️
...c/org/rascalmpl/semantics/dynamic/Declaration.java 0% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##              main   #2772   +/-   ##
=======================================
  Coverage       46%     46%           
  Complexity    6719    6719           
=======================================
  Files          794     794           
  Lines        65937   65932    -5     
  Branches      9889    9888    -1     
=======================================
+ Hits         30759   30766    +7     
+ Misses       32798   32782   -16     
- Partials      2380    2384    +4     

☔ 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
Copy link
Copy Markdown
Member Author

Running this PR with causes for the double declarations, since a small test did not reproduce the issue: https://github.com/usethesource/rascal-core-big-tests/actions/runs/25914305318

Comment thread src/org/rascalmpl/compiler/lang/rascalcore/check/RascalConfig.rsc
@PaulKlint PaulKlint changed the title fix/double src resolutions fix/remove-anno-code-from-compiler May 22, 2026
@sonarqubecloud
Copy link
Copy Markdown

@PaulKlint PaulKlint marked this pull request as ready for review May 23, 2026 09:02
Copy link
Copy Markdown
Member

@PaulKlint PaulKlint left a comment

Choose a reason for hiding this comment

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

I polished the code a bit and merged with main.

Integration tests are all green.

This is ready to merge!

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