Closed as not planned
Description
Describe the problem
When renaming a tab, the old file with its old contents gets still compiled during the build. This leads to unexpected and very confusing compilation results and errors. User has no way to fix the issue apart from locating the build cache directory and clean it up manually.
To reproduce
- Create a new sketch and save it.
- Create a new tab (call it like
foo.c
) and put some non-compiling code in it (likeFoobar foo;
). - Compile the sketch.
- Use the "Rename" command to rename the tab to something else (like
bar.c
). - Replace the content of the tab with some legit code (like
#define FOOBAR
). - Compile the sketch.
You'll see an error related the bad code you actually deleted (Foobar foo;
) located in a file which should not exist anymore (foo.c
).
If you locate the temporary build cache directory, you'll see that the old file was not removed.
Expected behavior
After a rename, the old file should be removed from the build directory and not be taken into account for compilation.
Arduino IDE version
Original report
2.0.0-rc6
Last verified with
Operating system
macOS
Operating system version
10.15.7
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details