Skip to content

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

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

Closed
3 tasks done
per1234 opened this issue Jan 5, 2023 · 0 comments · Fixed by #2031
Closed
3 tasks done

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

per1234 opened this issue Jan 5, 2023 · 0 comments · Fixed by #2031
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@per1234
Copy link
Contributor

per1234 commented Jan 5, 2023

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
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jan 5, 2023
giulianopz added a commit to giulianopz/arduino-cli that referenced this issue Jan 7, 2023
…p dir.

Fix arduino#2028

Any temporary file will be persisted in a new dedicated folder named as "arduino" located in the OS-specific temporary directory, e.g.:
/tmp/
├── arduino
│   ├── arduino-core-cache
│   │   └── core_arduino_avr_uno_640aa5b4d646262327bbea65c3462b39.a
│   └── arduino-sketch-89E1544CF5F196B29E530BA6940B661F
│       ├── 06.ino.elf
│       ├── 06.ino.with_bootloader.bin
│       ├── build.options.json
│       ├── compile_commands.json
│       ├── core
│       │   ├── abi.cpp.d
[...]

This change is meant to make easier maintenance operations for both end-users and operating-systems.

Signed-off-by: giuliano <panzironi.giuliano@gmail.com>
Bikappa pushed a commit that referenced this issue Jan 10, 2023
Fix #2028

Any temporary file will be persisted in a new dedicated folder named as "arduino" located in the OS-specific temporary directory, e.g.:
/tmp/
├── arduino
│   ├── arduino-core-cache
│   │   └── core_arduino_avr_uno_640aa5b4d646262327bbea65c3462b39.a
│   └── arduino-sketch-89E1544CF5F196B29E530BA6940B661F
│       ├── 06.ino.elf
│       ├── 06.ino.with_bootloader.bin
│       ├── build.options.json
│       ├── compile_commands.json
│       ├── core
│       │   ├── abi.cpp.d
[...]

This change is meant to make easier maintenance operations for both end-users and operating-systems.

Signed-off-by: giuliano <panzironi.giuliano@gmail.com>
@per1234 per1234 added conclusion: resolved Issue was resolved and removed conclusion: resolved Issue was resolved labels Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant