Skip to content

Store all files added to temporary folder below a single dedicated folder #2028

Closed

Description

Describe the request

Arduino CLI stores the objects produced by compiling a sketch program under the temporary folder:

  • arduino-core-cache/ - Core objects
  • arduino-sketch-<hash>/ - Objects from sketch source files and library dependencies

These folders are intentionally left behind in the temporary folder after an Arduino CLI process exits so that they can be reused for subsequent compilations as applicable.

The proposal is for all Arduino tools to place any temporary files below a single dedicated folder. For example:

tmp/
└── arduino/
    ├── arduino-core-cache/
    ├── arduino-sketch-33B7FB84F6F419C9D38C7A6D903E8E74/
    ├── arduino-sketch-8D027A8744130666283210C8D45F468C/
    ├── arduino-sketch-BE89418D95A99EBE12879C9FE4080CB4/
    ...

🙂 User maintenance operations related to the files Arduino CLI adds to the temporary folder will be facilitated by finding them all under a single standardized location.

Describe the current behavior

Arduino CLI places files in multiple folders under the temporary folder. For example:

tmp/
├── arduino-core-cache/
├── arduino-sketch-33B7FB84F6F419C9D38C7A6D903E8E74/
├── arduino-sketch-8D027A8744130666283210C8D45F468C/
├── arduino-sketch-BE89418D95A99EBE12879C9FE4080CB4/
...

Since a separate folder is created for each sketch, this might be a significant number of folders.

🙁 It is more difficult for the user to configure exceptions in antivirus programs to not interfere with the compilation process.
🙁 It is more difficult for the user to do periodic manual clean ups of the temporary folder.

Arduino CLI version

38a0dfd

Operating system

All

Operating system version

Any

Additional context

Originally requested by @sterretjeToo at arduino/arduino-ide#1779

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest nightly build
  • My request contains all necessary details

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions