-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
Opening invalid sketch via file association/command line fails silently #964
Comments
Closes #964 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Closes #964 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Closes #964 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
Closes #964 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
For the record, it does not work with valid sketches either. I am using IDE2 2.0.0 version:
My workspace:
Opening the sketch does not work with any of these:
IDE2 forcefully tries to restore the opened sketches from the previous session. |
Try it with the absolute sketch path @kittaakos. I get the same results from a relative path, but it works fine with the absolute sketch path. |
Thank you for verifying it on Windows. It does not work with absolute path either on macOS. I tried these:
Electron requires different file-association implementations for macOS and other OSs. I bet that is causing the problem in IDE2, but I do not understand why relative workspace files are broken on Windows. It should work. See here. This is just a guess, but I think a good one. The
|
I checked on Linux and got the same result as on Windows: the sketch opens when I pass the absolute path via a command line argument, but it does not open when I pass the relative path. Even with absolute path, it only works when I pass the path to the |
I will fix this too as part of #1563 |
Describe the problem
An Arduino sketch is a folder. This folder must contain an
.ino
file matching the folder name:Users who have only worked with the single file sketches common in introductory tutorials and examples may have the impression that the file is the sketch. Sketch authors may distribute sketches as a file or inline code for convenience. Some distribution methods (e.g., GitHub's automatically generated ZIP files) may alter the name of the sketch folder. Any of these things may result in an invalid sketch due to the lack of alignment between folder and
.ino
file name.For example:
If I start the Arduino IDE by opening a sketch that does not contain a
.ino
file matching the folder name (which is required for it to be considered valid), the IDE opens with the same behavior as it would without a sketch argument (last loaded sketches are opened).To reproduce
For example:
.ino
file association configured, or by running the IDE from the command line with the sketch path as an argument.🐛 The IDE does not communicate the problem to the user. The user is more likely to think something is wrong with the IDE than with the sketch.
🐛 The IDE does not offer to move the sketch file to an appropriately named folder
Expected behavior
The same behavior as when opening the file via File > Open in the Arduino IDE, as it works in Arduino IDE 1.x.
Arduino IDE version
Original report
2.0.0-rc6-nightly-20220422
Last verified with
2.0.1-snapshot-8380c82
Operating system
Windows
Operating system version
10.0.19044
Issue checklist
The text was updated successfully, but these errors were encountered: