-
-
Notifications
You must be signed in to change notification settings - Fork 422
Store all temporary files under a single folder #2031
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
Store all temporary files under a single folder #2031
Conversation
...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>
pzygielo
commented
Jan 7, 2023
Will it work in multi-user environment for the second and next users, once the first temporary arduino
directory is created?
Codecov ReportBase: 36.43% // Head: 36.43% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@ ## master #2031 +/- ## ======================================= Coverage 36.43% 36.43% ======================================= Files 228 228 Lines 19316 19316 ======================================= Hits 7038 7038 Misses 11444 11444 Partials 834 834
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Will it work in multi-user environment for the second and next users, once the first temporary
arduino
directory is created?
The second user (and next ones) will not be allowed to compile the same sketch the first user built. But only if they can access the exact same sketch folder: the name of the tmp dir of a sketch ends with an MD5 hash value generated from the path of such dir.
This happens also with the current version of the cli (doesn't it?), anyway.
This PR just deals with grouping the two main dirs containing tmp files as requested in the referenced issue. You should open a new issue, I guess, if you think that this kind of collisions can really happen (I don't know, to be honest).
pzygielo
commented
Jan 7, 2023
This happens also with the current version of the cli (doesn't it?), anyway.
Now that you shown it I can see that arduino-core-cache
locks other users already indeed.
...rip 'arduino' from cache and sketch tmp folders' name
Aligned CLI build path calculation (arduino/arduino-cli#2031) Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Aligned CLI build path calculation (arduino/arduino-cli#2031) Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Uh oh!
There was an error while loading. Please reload this page.
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.:
This change is meant to make easier maintenance operations for both end-users and operating-systems.
Please check if the PR fulfills these requirements
See how to contribute
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)What kind of change does this PR introduce?
All code lines which reference the default tmp dir to store temporary files were changed to prefix "arduino-core-cache" and "arduino-sketch-[MD5]" dirs with "arduino/" as their parent.
What is the current behavior?
See issue #2028.
What is the new behavior?
All the temporary files will be put inside a new "arduino" folder in the default temporary directory of the OS.
Does this PR introduce a breaking change, and is titled accordingly?
Not sure if this is a braking change with respect to older versions of the cli.