Remove Sketchbook concept, introduce User data folder #516
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rationale
After some QA iterations we decided to fade out the Sketchbook concept from the CLI. Please note the Sketchbook will continue existing on the IDEs, just it will be implemented at application level, not at the CLI level.
arduino-cli sketch new
and other commands already stopped relying on the Sketchbook, assuming the current path will be used when no destination path is provided but the "Sketchbook" keyword continued to be present in some places in the CLI, most notably the configuration file, causing confusion among users.Implications
The Sketchbook isn't only used to collect sketch files, it also contains custom libraries and custom hardware under the paths
<sketchbook_path>/libraries
and<sketchbook_path>/hardware
respectively - this functionality will be preserved by introducing a new concept at the CLI level: the User folder.This PR removes the Sketchbook dir from the settings and introduces a new concept, the "User" folder. User folder will have the same layout as the existing "Data" folder and will contain "custom stuff" like libraries and hardware. Users can keep using it to store sketch files, just the CLI won't care nor assume anything about those.
Backward compatibility
In order to keep backward compatibility, the environment var
ARDUINO_SKETCHBOOK_DIR
will keep existing and point to the User folder. The oldsketchbook_path
value will be removed from the settings instead and user will use this new configuration value inarduino-cli.yaml
:gRPC interface
At this moment the gRPC won't be touched and will keep showing references to the Sketchbook. That part will be refactored to improve the way gRPC clients can pass configuration values without having to rely on a config file.