Skip to content

finished the implementation of ShellCommands, upto printing the history and deleting ADTs #2311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jurgenvinju
Copy link
Member

@jurgenvinju jurgenvinju commented Jun 25, 2025

Because the syntax of these ShellCommands existed but they were not implemented, documented features would throw weird exceptions.

This PR:

  • adds optional semicolons to the end of all : commands because I kept typing them accidentally
  • implements the missing features :undeclare, :unset, :unimport, :unextend, :declarations, :clean
  • prints a NYI message for :history which needs a little more wiring (@DavyLandman your advice on this pls)
  • parametrizes :test with an optional module name (to run only the tests in that module)
  • adds "undeclaration" features to the internal data-structures Environment and ModuleEnvironment of the interpreter. These work only well for the toplevel REPL structure, since normal modules can have complex states due to transitive extend and watch/reloading effects.

Copy link

codecov bot commented Jun 25, 2025

Codecov Report

Attention: Patch coverage is 11.73815% with 391 lines in your changes missing coverage. Please review.

Project coverage is 47%. Comparing base (0ca1613) to head (a8bf390).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/org/rascalmpl/ast/ShellCommand.java 0% 210 Missing ⚠️
.../org/rascalmpl/semantics/dynamic/ShellCommand.java 0% 81 Missing ⚠️
src/org/rascalmpl/ast/Sym.java 0% 25 Missing ⚠️
src/org/rascalmpl/ast/OptionalTerminator.java 0% 14 Missing ⚠️
src/org/rascalmpl/interpreter/env/Environment.java 0% 10 Missing ⚠️
src/org/rascalmpl/ast/Statement.java 66% 9 Missing ⚠️
src/org/rascalmpl/ast/Strategy.java 0% 6 Missing ⚠️
src/org/rascalmpl/ast/NullASTVisitor.java 0% 4 Missing ⚠️
src/org/rascalmpl/ast/StringTemplate.java 20% 4 Missing ⚠️
src/org/rascalmpl/ast/SyntaxDefinition.java 0% 4 Missing ⚠️
... and 15 more
Additional details and impacted files
@@           Coverage Diff            @@
##              main   #2311    +/-   ##
========================================
- Coverage       47%     47%    -1%     
+ Complexity    6347    6344     -3     
========================================
  Files          764     765     +1     
  Lines        63176   63557   +381     
  Branches      9428    9489    +61     
========================================
+ Hits         29957   29974    +17     
- Misses       31000   31357   +357     
- Partials      2219    2226     +7     

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

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.

1 participant