Skip to content

Unexpected output filenames when local sketch file is used as compile argument #691

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

Closed
per1234 opened this issue May 8, 2020 · 1 comment
Labels
conclusion: resolved Issue was resolved type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented May 8, 2020

Bug Report

Current behavior

If I run arduino-cli compile from the sketch folder and pass the sketch file name as the argument:

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

or

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

the component of the output file name that is expected to be the sketch name (Foo) is instead .:

Foo
|_ ..arduino.avr.uno.elf
|_ ..arduino.avr.uno.hex
|_ ..arduino.avr.uno.with_bootloader.hex
|_ Foo.ino

I haven't found this to actually cause a problem; it's just not the behavior I expect. Not a big deal, but I thought I should report it anyway.

The issue does not occur if I use the absolute path to the file, or the relative path to the file when the command is run from outside the sketch folder.

The issue does not occur at b62c339 so it was introduced by 6718cf4. I notice the same thing occurs even with previous versions of Arduino CLI when you ran arduino-cli compile --fqbn arduino:avr:uno ./.

Of course, it's not necessary to provide the sketch argument when the command is run from the sketch folder, but I do think users will be likely to do this. I encountered this issue while testing to see if #355 (comment) had been resolved by #690, which is a report of this usage. #51 (comment) is another.

Examples of the same use pattern with arduino-cli upload (which turns out to actually cause an error):

Expected behavior

arduino-cli compile --fqbn arduino:avr:uno Foo.ino should result in output file names that start with Foo.arduino.avr.uno.

Environment

  • CLI version (output of arduino-cli version): 0.10.0-rc1 Commit: 6718cf4
  • OS and platform: Windows, Linux 64 bit
@per1234
Copy link
Contributor Author

per1234 commented Feb 22, 2021

I'm pleased to report this is now fixed!

@per1234 per1234 closed this as completed Feb 22, 2021
@per1234 per1234 added the conclusion: resolved Issue was resolved label Aug 31, 2021
@rsora rsora added the type: imperfection Perceived defect in any part of project label Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants