IDE 2 doesn't handle some file name changes well #2680
Labels
conclusion: duplicate
Has already been submitted
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Describe the problem
My sketch had 3 files: stepClass.h, stepClass.cpp and T4DualStep.ino. It was compiling okay. Changed the class file names to stepperClass.h and stepperClass.cpp, and also changed the #include in the .cpp file to the new name stepperClass.h
The IDE started reporting errors that were in the old file name stepClass.cpp which is still in the temp folder, even though there is no reference to that file anywhere in the scketch.
Details of this error and the sketch can be found here: https://forum.arduino.cc/t/code-compiles-in-old-ide-but-not-the-new-one/1286767
It is 100% repeatable
To reproduce
Use a PC, Tensy 4.0, IDE 2.3.2, and the sketch supplied in the origibl post. . Compile it and make certain the .cpp file has an error somewhere. Now rename the .cpp, .h, and the #include names. Correct the error in the new .cpp file and compile. This will reproduce the error. rename the temp file with the old name to .cpp.old. Compilation will once again succeed.
Expected behavior
Do not expect to see an error.
Arduino IDE version
2.3.2
Operating system
Windows
Operating system version
win 11
Additional context
no additional details
Issue checklist
The text was updated successfully, but these errors were encountered: