Closed per1234 closed 5 years ago
Just running git clone https://github.com/gillham/logic_analyzer.git
already just places everything in a folder called logic_analyzer
, this feels like it's a fix for a non-standard workflow.
Not everyone has git installed.
Not everyone is familiar with using git.
Not everyone wants to clone repositories (larger and slower).
By far, the most common method for Arduino users to get code from GitHub is the Download ZIP feature.
I use Git every day but I still rarely clone repositories just for the sake of a download.
It may be arguable whether it's worth changing the repository folder structure for an easier installation but I strongly disagree with your assertion that Download ZIP is a "non-standard workflow" for someone who just wants to grab an Arduino sketch and flash it to their board.
... or just add a note to the readme?
git clone is pretty dang common. If you're not doing that in this case, you could just as easily copy/paste the contents of logic_analyzer.ino into the Arduino IDE...
David
On Tue, May 29, 2018 at 4:15 PM, ildar notifications@github.com wrote:
... or just add a note to the readme?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gillham/logic_analyzer/pull/44#issuecomment-392964709, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGyxGjkC8sf3x2_zFdTqNLFVwl_W7iJks5t3ciXgaJpZM4UQwU3 .
... or just add a note to the readme?
copy/paste the contents of logic_analyzer.ino into the Arduino IDE...
...or just structure the project so it works no matter what you do and none of that is necessary.
By far, the most common method for Arduino users to get code from GitHub is the Download ZIP feature.
I would like some proof of that to be honest. This is not an Arduino library. It's code that gets flashed onto the board without modification.
I use Git every day but I still rarely clone repositories just for the sake of a download.
For starters, this repository isn't that large; but even if you argue that downloads are slow you can just use --depth
and --single-branch
like this git clone https://github.com/gillham/logic_analyzer.git --depth=1 --single-branch
to only download the latest commit from the master
branch.
...or just structure the project so it works no matter what you do and none of that is necessary.
This pull request would complicate cli based workflows by making paths look like /path/to/workspace/logic_analyzer/logic_analyzer
(which makes it difficult to keep track of the root folder due to the name being the same), it's hardly "works no matter what you do".
The most common CLI workflow (across opensource projects in general) AFAIK goes something like the following.
$ git clone <url>
$ cd <git_name>
$ make
Also, it is pretty easy to use the equivalent of an extract to folder
in whatever archive program you are using to get the changes in this pull request. Feels like a README update with usage instructions is what is really needed.
I don't know that this really solves a problem for everyone. With the new directory inside the repository, people will do what? Copy the logic_analyzer directory to the sketchbook? Or are you saying people should just unzip this downloaded file some random location and just launch the sketch from there? I never use the download zip feature, I use 'git clone' or the github desktop. I don't see this patch being universally useful. It would be easier to just rename the folder properly to 'logic_analyzer' after you unzip it. I don't think people should be just unzipping the thing in their downloads directory or inside of temp and then launching it with the Arduino IDE.
I can add something to the README about making sure the sketch's directory is named properly. Also I need to add something about making sure the three files are in the same directory already as people keep trying to compile the other included files instead of the sketch. Apparently people like to double-click on stuff instead of doing a File -> Sketchbook -> logic_analyzer.
Copy the logic_analyzer directory to the sketchbook? Or are you saying people should just unzip this downloaded file some random location and just launch the sketch from there?
They can do whatever they like with it. It's up to them where they store the sketch. If you put it in the sketchbook folder then you can access it via the Arduino IDE's File > Sketchbook menu, but that's only a minor convenience.
I never use the download zip feature, I use 'git clone' or the github desktop.
Good for you. Many other people do use Download ZIP.
I don't see this patch being universally useful.
No, but it is very useful to some and does no harm to the rest.
It would be easier to just rename the folder properly to 'logic_analyzer' after you unzip it.
How is that easier than having it just work with no confusing extra step.
I don't think people should be just unzipping the thing in their downloads directory or inside of temp and then launching it with the Arduino IDE.
Why not?
I can add something to the README about making sure the sketch's directory is named properly.
I prefer making the project just work without needing unnecessary documentation. If you're not going to merge this, then certainly that is a good idea.
people keep trying to compile the other included files instead of the sketch
Probably because they did a Download ZIP, resulting in the sketch folder not matching the .ino file, and then the Arduino IDE moving the .ino file they opened to its own appropriately named folder, leaving the other files behind.
Apparently people like to double-click on stuff instead of doing a File -> Sketchbook -> logic_analyzer
You can double click any .ino file you like and the Arduino IDE will open the complete sketch, no problem.
At this point I’m not going to merge it as it isn’t a general solution.
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 the contents of a repository the branch/tag/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:
After clicking "OK" the Arduino IDE currently moves only the file logic_analyzer.ino to the new folder, leaving behind the other source files. This causes compilation of the sketch to fail:
Resolves https://github.com/gillham/logic_analyzer/issues/43