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

Move sketch to appropriately named subfolder #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

per1234
Copy link

@per1234 per1234 commented Apr 6, 2018

The Arduino IDE requires that a sketch be located in a folder of the same name. Although the name of the repository does match the sketch name, when GitHub's popular Clone or download > Download ZIP feature is used to download a repository the branch/release/commit name is appended to the folder name, causing a mismatch.

When opening a file that does not meet this sketch/folder name matching requirement the Arduino IDE presents a dialog:

The file "SerialUploader.ino" needs to be inside a sketch folder named "SerialUploader".
Create this folder, move the file, and continue?

After clicking "OK" the Arduino IDE currently moves only the file SerialUploader.ino to the new folder, leaving behind the other source files. This causes compilation of the sketch to fail:

SerialUploader-master\SerialUploader\SerialUploader.ino:12:28: fatal error: SerialUploader.h: No such file or directory

 #include "SerialUploader.h"

The Arduino IDE requires that a sketch be located in a folder of the same name. Although the name of the repository does match the sketch name, when GitHub's popular Clone or download > Download ZIP feature is used to download a repository the branch/release/commit name is appended to the folder name, causing a mismatch.

When opening a file that does not meet this sketch/folder name matching requirement the Arduino IDE presents a dialog:

The file "SerialUploader.ino" needs to be inside a sketch folder named "SerialUploader".
Create this folder, move the file, and continue?

After clicking "OK" the Arduino IDE currently moves only the file SerialUploader.ino to the new folder, leaving behind the other source files. This causes compilation of the sketch to fail:

SerialUploader-master\SerialUploader\SerialUploader.ino:12:28: fatal error: SerialUploader.h: No such file or directory

 #include "SerialUploader.h"
@franck102
Copy link
Owner

I never noticed your PR until today :)
The idea makes sense, I don’t use the IDE to develop so I hadn’t noticed the issue.

@per1234
Copy link
Author

per1234 commented Mar 10, 2021

The information and proposal I presented here are still just as relevant now as they were back in 2018, so feel free to merge this if you think it is useful @franck102 .

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

Successfully merging this pull request may close these issues.

2 participants