Skip to content
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

Bug fix and changes to REPL module #263

Merged

Conversation

larrywang0701
Copy link
Contributor

@larrywang0701 larrywang0701 commented Oct 31, 2023

  • Removed "Program exited with return value" message as Professor Martin instructed
  • Fix a bug that causes a runtime error to be shown in the browser's console when student provide an evaluator entry function with incorrect parameter count
    • For example: set_evaluator(()=>undefined); or set_evaluator((param1,param2)=>undefined);
    • Now the REPL will display the error message Error: Unable to use your evaluator to run the code. Does your evaluator entry function contains and only contains exactly one parameter? to students if they make this mistake in their code.
  • Other minor changes:
    • Removed "metacircular" in documentation since the module is not only limited to metacircular evaluator, but also possibly on CSE machine and any evaluators that use a function with one parameter to accept raw code as entry.
    • In the error message: the function name invoke_repl should be set_evaluator

Fix the bug that the actual code area in AceEditor in REPL tab not resizes with the displayed editor area. Now AceEditor will automatically resize the code area when user drag the resize bar.
@larrywang0701 larrywang0701 changed the title Fix a minor mistake in REPL module's error message Minor changes to REPL module Oct 31, 2023
 - Removed "Program exited with return value" message as Professor Martin instructed
 - Bug fixes:
  - Fix a bug that causes a runtime error to be shown in the browser's console when student provide an evaluator entry function with incorrect parameter count
  - Fix a bug that dose not show execution result when `null` is the execution result.
@larrywang0701 larrywang0701 changed the title Minor changes to REPL module Bug fix and changes to REPL module Nov 1, 2023
Copy link
Member

@martin-henz martin-henz left a comment

Choose a reason for hiding this comment

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

All looking good! Nice job @larrywang0701
The REPL module will be very useful in future versions of CS1101S and CS4215.

@martin-henz martin-henz merged commit 198fc2c into source-academy:master Nov 4, 2023
1 check passed
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