Closed
Description
Describe the problem
If the example for a library has .pde
file extension, Arduino IDE will silently fail to open it.
To reproduce
- Use Library Manager to install version "1.64.0" of the "AccelStepper" library from Library Manager
- Select File > Examples > AccelStepper > AFMotor_ConstantSpeed
🐛 The example doesn't open. There is no communication of a problem.
Expected behavior
Arduino IDE opens all valid example sketches, regardless of whether they use a deprecated file extension.
Arduino IDE version
2.3.2
Operating system
Windows
Operating system version
11
Additional context
I see the following in the logs when I try to open the example:
2024-02-20T12:47:15.376Z root ERROR Request cloneExample failed with error: ENOENT: no such file or directory, rename 'C:\Users\per\AppData\Local\Temp\.arduinoIDE-unsaved2024120-60044-18wn560.m01l\AFMotor_ConstantSpeed\AFMotor_ConstantSpeed.ino' -> 'C:\Users\per\AppData\Local\Temp\.arduinoIDE-unsaved2024120-60044-18wn560.m01l\AFMotor_ConstantSpeed\AFMotor_ConstantSpeed.ino' Error: ENOENT: no such file or directory, rename 'C:\Users\per\AppData\Local\Temp\.arduinoIDE-unsaved2024120-60044-18wn560.m01l\AFMotor_ConstantSpeed\AFMotor_ConstantSpeed.ino' -> 'C:\Users\per\AppData\Local\Temp\.arduinoIDE-unsaved2024120-60044-18wn560.m01l\AFMotor_ConstantSpeed\AFMotor_ConstantSpeed.ino'
I bisected the regression to 074f654 (does not occur with the build for the previous commit 3eef857)
This is a regression of #518
Originally reported by @drf5n at:
https://forum.arduino.cc/t/accelstepper-library-examples-dont-open-with-arduino-ide-2-3-1/1226308/2
Workaround
- Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open. - Take note of the path shown in the "Sketchbook location" field of the dialog.
- Click the "CANCEL" button.
The "Preferences" dialog will close. - Select File > Open... from the Arduino IDE menus.
- Navigate to the
libraries
subfolder of the path you saw in the "Sketchbook location" field during step (2) of these instructions. - You will see a list of the installation folders of each of the libraries you have installed. Scroll through the list until you find the library for which you want to open an example sketch.
- Open the folder of the library and then the
examples
subfolder. - There you will see a list of the folders of each of the example sketches provided by the library. Open the folder of the example you want to open.
- Select the
.pde
file in the folder. - Click the "Open" button.
The example sketch will now open in an Arduino IDE window as usual.
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