-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Deleted header files remain includable #2072
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
Comments
Hello @fredrikeldh, |
Closing the IDE does not remove any temporary files, but reopening it does create a new temp-build dir. Interestingly, if you delete the temporary header file, it gets recreated when you verify, with the same contents as before, even if you've deleted or modified the original. If you don't touch any temporary files, and modify the source header file, that modification does not get copied to the temporary directory. This means that if you modify the header, you must reload the IDE for that modification to take effect. I've been trying to share code between sketches in a less roundabout way than Libraries, but that can't happen before this bug is fixed. |
I find that if I use the Arduino IDE 1.8.3 to delete the tab via the tab menu it works correctly. This may not have been the case at the time of the issue report as indicated by #4233 and #1161). It is only if you delete the tab from outside the IDE that this issue occurs now and that's not really unexpected behavior since the tab is still shown in the Arduino IDE even though the file was deleted from the disk. Where I find more problematic behavior is this issue as it occurs when an included file is deleted from a subfolder of the sketch folder (e.g. `#include "src/foo/foo.h"). In this case there is no mechanism to delete the file from within the IDE so there is no alternative to deleting files from outside the IDE. I suppose that is more appropriate to discuss in the arduino-builder repository now. |
Closing as resolved. I can still reproduce the fault via the modified procedure described in my previous reply when using Arduino IDE 1.8.3, but I cannot reproduce it via that procedure when using Arduino IDE 1.8.19 or Arduino IDE 2.x. I didn't bisect the resolution so I don't know exactly where the bug was fixed. |
Tested with 1.0.5 on Windows.
To reproduce:
#include "foo.h"
to the sketch.This happens because the Arduino IDE copies all source files to a temporary directory, reuses that directory and does not clear it of files that shouldn't be there.
On Windows 7, the temporary directory may be called something like "c:\Users\AppData\Local\Temp\build4632717550972951918.tmp".
The text was updated successfully, but these errors were encountered: