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

.pde file extension not supported by compile when only folder specified #386

Closed
per1234 opened this issue Sep 2, 2019 · 0 comments · Fixed by #490
Closed

.pde file extension not supported by compile when only folder specified #386

per1234 opened this issue Sep 2, 2019 · 0 comments · Fixed by #490
Labels
type: enhancement Proposed improvement

Comments

@per1234
Copy link
Contributor

per1234 commented Sep 2, 2019

Bug Report

Current behavior

In the early days of Arduino, the .pde file extension of Processing sketches was used for Arduino sketches. Later, support for the dedicated .ino file extension was added, but support for .pde was retained. For this reason, some popular libraries still use the .pde extensions for their example sketches and the authors see no reason to bother changing that (reference).

I have a sketch:

Foo
|_Foo.pde

If I run the command:

arduino-cli compile --fqbn arduino:avr:uno Foo

It has the error:

Error during build: build failed: unable to find the main sketch file: open E:\Foo\Foo.ino: The system cannot find the file specified.

I can successfully run the command:

arduino-cli compile --fqbn arduino:avr:uno Foo/Foo.pde

but that will generate a default output filename that breaks the basic upload command (as reported in #355):

arduino-cli upload --fqbn arduino:avr:uno --port /dev/ttyACM0 Foo

Expected behavior

arduino-cli compile should work with sketches that use the .pde extension when only specifying the sketch folder as the path argument (as is recommended by the inline help).

Environment

  • CLI version (output of arduino-cli version): nightly Commit: 3e0b555
  • OS and platform: Windows 10 64 bit
@cmaglie cmaglie added kind/bug type: enhancement Proposed improvement labels Sep 12, 2019
lluiscampos added a commit to lluiscampos/arduino-cli that referenced this issue Nov 20, 2019
…#386)

When only specifying folder, the logic will try both <DirName>.ino and
<DirName>.pde as the main sketch file. If both are found, and error is
also thrown (it would break on compile later on).

Added couple of unit tests also.

Signed-off-by: Lluis Campos <[email protected]>
lluiscampos added a commit to lluiscampos/arduino-cli that referenced this issue Nov 28, 2019
…#386)

When only specifying folder, the logic will try both <DirName>.ino and
<DirName>.pde as the main sketch file. If both are found, and error is
also thrown (it would break on compile later on).

Added couple of unit tests also.

Signed-off-by: Lluis Campos <[email protected]>
lluiscampos added a commit to lluiscampos/arduino-cli that referenced this issue Nov 28, 2019
…#386)

When only specifying folder, the logic will try both <DirName>.ino and
<DirName>.pde as the main sketch file. If both are found, and error is
also thrown (it would break on compile later on).

Added couple of unit tests also.

Signed-off-by: Lluis Campos <[email protected]>
rsora pushed a commit that referenced this issue Nov 28, 2019
…490)

When only specifying folder, the logic will try both <DirName>.ino and
<DirName>.pde as the main sketch file. If both are found, and error is
also thrown (it would break on compile later on).

Added couple of unit tests also.

Signed-off-by: Lluis Campos <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants