arduino / arduino-ide

Arduino IDE 2.x
https://www.arduino.cc/en/software
GNU Affero General Public License v3.0
2.21k stars 379 forks source link

Collect all temporary files in a temporary directory #1779

Open sterretjeToo opened 1 year ago

sterretjeToo commented 1 year ago

Describe the request

IDE 2.0 leaves a lot of directories files behind in (Windows system) C:\Users\yourUsername\AppData\Local\Temp. Request to collect them all in one dedicated Arduino directory.

If the cause is a virus scanner that prevents cleanup, it's safer to just exclude on directory instead of the complete directory. If the cause is Windows or the IDE, it's easier to manually clean up at occasion.

Describe the current behavior

Directories and files that can be found in C:\Users\yourUsername\AppData\Local\Temp

Note Above list from IDE 2.0.3; I haven't consistently used the nightly build to be sure if the list has not changed significantly but a number of the above directories and files are certainly there.

Arduino IDE version

arduino-ide_nightly-20221217_Windows_64bit

Operating system

Windows

Operating system version

Win10 Home

Additional context

Additional Requests

Issue checklist

kittaakos commented 1 year ago

This is a great idea. However, besides these, 👇 IDE2 does not create any files, but the CLI, the LS, the debugger, etc., manage them.

  • Files C:\Users\yourUsername\AppData\Local\Temp\.arduinoIDE-unsaved*.
  • Directories C:\Users\yourUsername\AppData\Local\Temp\longNumber\arduino-ide2-longHexNumber; directories are empty
sterretjeToo commented 1 year ago

@kittaakos and @per1234

As I don't know what is all involved, I'll leave it up to you guys to add similar feature requests for all the other applications in the tool chain ;)

wh201906 commented 1 year ago

I guess the .arduinoIDE-unsaved* is created by Arduino IDE? https://github.com/arduino/arduino-ide/blob/76f9f635d8558f399423f64c0c709e3a53bdcd03/arduino-ide-extension/src/node/sketches-service-impl.ts#L515-L537

per1234 commented 1 year ago

In addition to the two classes of folders mentioned above, three others are created by the Arduino IDE application: