Skip to content
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

CONSIDER a central (per-user) cache of large items #61

Open
egnor opened this issue Jul 6, 2021 · 3 comments
Open

CONSIDER a central (per-user) cache of large items #61

egnor opened this issue Jul 6, 2021 · 3 comments
Labels
investigate Requires some investigation

Comments

@egnor
Copy link

egnor commented Jul 6, 2021

The .ardi directory in a project is typically quite large, e.g. 295M for a very simple project I just set up. In some cases (such as mine) I may end up with a number of different projects set up on the same machine. It would be nice if common large items could be linked to a central cache directory. (Clearly we'd want to make sure this is only done if they are exactly the same item.)

There are tradeoffs here to be sure (who cleans the cache?), but it is a popular approach taken by some other dependency managers (but not all of them).

I'm feeling the extra pain because I happen to be using this on a Raspberry Pi (among other places)... so I'm having to blow away .ardi directories occasionally to keep the disk from filling.

@robgonnella
Copy link
Owner

This is a bit tricky, and possibly impossible at the moment, as I believe the underlying tool arduino-cli only supports using one data directory at a time. So your build can only utilize either a global data directory or a local project data directory but not both simultaneously. I'll do some digging around in arduino-cli to see if they've added support for multiple data directories recently or see if I can maybe submit a patch upstream if it's not too difficult, or even just open an issue.

@robgonnella robgonnella added the investigate Requires some investigation label Jul 10, 2021
@egnor
Copy link
Author

egnor commented Jul 10, 2021 via email

@robgonnella
Copy link
Owner

A bit more investigation into this one shows that arduino-cli doesn't support having multiple versions of platforms installed simultaneously :-/

ardi add platform arduino:avr
# results in .ardi/packages/arduino/hardware/avr/1.8.3
ardi add platform arduino:[email protected]
# results in replacement of 1.8.3 directory with 1.8.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigate Requires some investigation
Projects
None yet
Development

No branches or pull requests

2 participants