Skip to content

Move sketch to appropriately named subfolder #1

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

Merged
merged 1 commit into from
May 20, 2018
Merged

Move sketch to appropriately named subfolder #1

merged 1 commit into from
May 20, 2018

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented May 20, 2018

The Arduino IDE requires that a sketch be located in a folder of the same name. When opening a file that does not meet this sketch/folder name matching requirement the Arduino IDE presents a dialog:

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

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

arduino-midi-sound-module-master\arduino-midi-synth\arduino-midi-synth.ino:82:18: fatal error: main.h: No such file or directory

The alternative solution you might be thinking of is to change the sketch name to match the repository name. This would work for people who clone the repository but when GitHub's popular Clone or download > Download ZIP feature is used to download the contents of a repository the branch/release/commit name is appended to the folder name, resulting in the sketch and folder names still not matching.

The Arduino IDE requires that a sketch be located in a folder of the same name. When opening a file that does not meet this sketch/folder name matching requirement the Arduino IDE presents a dialog:

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

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

arduino-midi-sound-module-master\arduino-midi-synth\arduino-midi-synth.ino:82:18: fatal error: main.h: No such file or directory

The alternative solution you might be thinking of is to change the sketch name to match the repository name. This would work for people who clone the repository but when GitHub's popular Clone or download > Download ZIP feature is used to download the contents of a repository the branch/release/commit name is appended to the folder name, resulting in the sketch and folder names still not matching.
@DLehenbauer
Copy link
Owner

You're absolutely right. I recently renamed the project via GitHub settings w/o thinking about the effect on directory structure. Thanks for reporting the issue and providing a fix!

I'll merge this right away to unbreak the the sketch, and then might follow up w/some tweaks to propagate the new name into the Atmel Studio project, etc.

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