Avoid redundant recompilation on Reset/Play in C++ exercises

Open
#282 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
cpp, python

Research direction

Trace the Reset and Play handlers and the build invocation described in the issue. Verify that unchanged C++ source reuses the existing executable while edited source still recompiles; done when Reset followed by Play skips compilation without source changes and recompiles after changes.

Written by the indexing model from the issue text.

Description

enhancement

Description:
Currently, in the C++ exercises, hitting "Reset" followed by "Play" always triggers a full recompilation of the code. While the recent fix for the pause/resume functionality is great, this recompilation worsens the user experience.

The Problem:
We frequently use the "Reset" button just to restore the robot's initial position and reset the simulation world. Having to wait ~30 seconds for the code to recompile - even when no changes have been made to the source files - significantly slows down the testing workflow and degrades the user experience.

Expected Behavior:
The system should launch the existing executable without recompiling if the user's code hasn't been modified since the last build.

Proposed Solutions:

  • Smart Compilation: Implement a check (e.g., file modification timestamps or hashes) to see if the user's code has changed. Only trigger the build process if changes are detected; otherwise, just run the existing executable.

  • Dedicated Compile Button: Decouple the actions by adding a specific "Compile" button, leaving the "Play" button strictly for execution.

Dominant language
Python
Stars
13
Forks
36
Avg merge
22h 32m
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JdeRobot/RoboticsApplicationManager

All issues in JdeRobot/RoboticsApplicationManager

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.