-
-
Notifications
You must be signed in to change notification settings - Fork 403
build_cache.path not honored for "sketches" #2668
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
@egnor this is intended. The Do you think it makes sense? Do you think we should explain it better in the doc? |
@alessio-perugini hmm, the documentation and/or terminology could probably be improved? These are the various temp directories I can find
For me, something like this would be way less surprising:
...and in any case it should be clarified; the "Configuration" page just lists Use cases:
|
The temp folder inside The other sundry temp files in I like also the proposed changes for The setting var And now thinking about this, I'm wondering if we should ignore the build cache altogether when the user specifies a |
Yeah, on reflection I feel like there's a difference between "true temporary" and "cache" files?
True temporary files can be made with Cache files are the issue here. They shouldn't be in I hear what you're saying about how it doesn't make sense to have an environment variable/config key for a sketch-specific cache path (as opposed to the overall cache root). Honestly I think just relocating the overall cache root seems fine. I can't think of a use case where you want to use the global core cache but move around the sketch build cache (though I'm sure someone could think of one)? |
We may use
Ok, I've drafted a proposal here #2673. Let's continue the discussion there so we have something to work on. |
Describe the problem
Per the documentation the config key
build_cache.path
(or environment$ARDUINO_BUILD_CACHE_PATH
, etc) should cause temp files to go in the designated directory instead of$TMP/arduino
which is actually global on the system.However, while setting that config does redirect the
cores/
directory, it does NOT redirectsketches/
To reproduce
rm -rf /tmp/arduino /tmp/test_dir
# clean up to avoid confusionexport ARDUINO_BUILD_CACHE_PATH=/tmp/test_dir
arduino-cli compile
# with any flags needed for the sketch/tmp/test_dir
and/tmp/arduino
Expected behavior
/tmp/test_dir
/tmp/arduino
INSTEAD, I see something like this
So,
cores/
got moved butsketches/
did not.Arduino CLI version
arduino-cli Version: 1.0.0 Commit: 05c9852 Date: 2024-06-12T14:13:32Z
Operating system
Linux
Operating system version
Ubuntu 24.04 LTS, kernel 6.8.0-36-generic
Additional context
Code that might be relevant
arduino-cli/commands/service_compile.go
Line 434 in b4f8849
arduino-cli/internal/arduino/sketch/sketch.go
Line 285 in b4f8849
I think the latter one is probably the important one (the first one is just for purging, but it should be made consistent). Both should really be using the common build cache dir.
Issue checklist
The text was updated successfully, but these errors were encountered: