Skip to content

Sketchbook folder not created on startup #1445

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 Sep 16, 2022 · 0 comments · Fixed by #1448
Closed
3 tasks done

Sketchbook folder not created on startup #1445

per1234 opened this issue Sep 16, 2022 · 0 comments · Fixed by #1448
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Sep 16, 2022

Describe the problem

The "sketchbook" folder is a storage location for several types of resources used by the Arduino IDE and the user. In addition to its use for global library installations, it is the preferred location for saving sketches due to the integration of this folder with the "Sketchbook" view and File > Sketchbook menu.

Currently, the Arduino IDE does not create the sketchbook folder at the default location if it does not already exist (which it won't for first time users).

🐛 The user is prevented from changing preferences until they have selected a sketchbook folder location that exists (#1444).
🐛 The Save As... dialog will not encourage saving sketches to the preferred location.

To reproduce

  1. Rename or delete your sketchbook folder (you can find the location by checking the "Sketchbook location" preference in the IDE).
  2. Start the Arduino IDE.
  3. Select "File > Preferences" from the Arduino IDE menus.
  4. Modify the "Editor font size" value.
  5. Click the OK button.
    🐛 The preference can not be changed because the button is disabled.
  6. Click the CANCEL button.
  7. Select File > Save as from the Arduino IDE menus.
  8. A path without any enhanced treatment is selected in the "Save sketch folder as..." dialog.

Expected behavior

Sketchbook folder is created on IDE startup if it does not exist.

If it is not possible to create the sketchbook folder (e.g., it is on a removable or cloud drive that is not currently connected), the IDE should clearly communicate the problem to the user.

Arduino IDE version

2.0.0-snapshot-4e590ab

Operating system

Windows

Operating system version

10

Additional context

Prior to #1370, the sketchbook folder was generated on first run as a side effect of the "Arduino_Builtin" library installation.


As an alternative to automatically creating the sketchbook on startup, the current behavior of the "Preferences" dialog could be changed.

Currently, the "OK" button is disabled if the path set via the "Sketchbook location" preference does not exist. This is the most significant impact of the sketchbook folder not being created.

So if that check for a valid sketchbook path was removed, the remaining impact would be that saving a sketch to a sketchbook that doesn't exist is very complicated for the beginners who are most likely to experience this bug.

I looked for any other impacts of a missing sketchbook folder and didn't find one. Arduino CLI automatically creates the folder on any operation that requires it (Library Manager installation, "Add ZIP Library").


The combination of this bug with #1259 results in an especially poor user experience.


Arduino IDE 1.x creates the sketchbook folder on startup.

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Sep 16, 2022
@kittaakos kittaakos self-assigned this Sep 16, 2022
kittaakos pushed a commit that referenced this issue Sep 16, 2022
Closes #1445

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Sep 21, 2022
Closes #1445

Signed-off-by: Akos Kitta <[email protected]>
@per1234 per1234 added the conclusion: resolved Issue was resolved label Sep 21, 2022
kittaakos pushed a commit that referenced this issue Dec 15, 2022
Signed-off-by: Akos Kitta <[email protected]>
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: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants