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

Not using same compile defaults as arduino-cli #344

Open
3 tasks done
MallocArray opened this issue Jan 24, 2025 · 0 comments
Open
3 tasks done

Not using same compile defaults as arduino-cli #344

MallocArray opened this issue Jan 24, 2025 · 0 comments
Labels
type: imperfection Perceived defect in any part of project

Comments

@MallocArray
Copy link

Describe the problem

With several sketches I can compile them using Arduino IDE or arduino-cli successfully with no errors, but when using compile-sketches with the same settings as far as I can tell, I get messages about unused functions and variables. Of course, I could/should have those cleaned up, but wasn't even aware they were there since other methods of compiling don't show it by default.

Looking at the help for arduino-cli compile --help it shows that --warnings is optional and defaults to none, but compile-sketches seems to default to default which does show these unused messages. I didn't see this documented in the readme file anywhere and it took a decent amount of time to figure out how to even get the same messages locally so I could figure out how to suppress the messages in compile-sketches

Ultimately, I can suppress it by adding:

          cli-compile-flags: |
            - --warnings
            - none

But I would have expected compile-sketches to use the same defaults as arduino-cli does, which does not appear to be the case currently, unless there is another setting in my particular config that is changing the behavior

To reproduce

Workflow file without overriding default behavior for warnings:
https://github.com/MallocArray/arduino/blob/bdf3466f04b5eb6cac9be5bf64f7a84b05e99cf2/.github/workflows/check2.yml

This results in a failure of the workflow action:
https://github.com/MallocArray/arduino/actions/runs/12951761541/job/36127521057

Explicitly setting the cli-compile-flags to set warnings to none suppresses the message and results in the workflow action completing successfully as it does with Arduino IDE and arduino-cli
https://github.com/MallocArray/arduino/blob/be9d95051fae0004a7708fbbebb85a861a3fc617/.github/workflows/check2.yml
https://github.com/MallocArray/arduino/actions/runs/12941225109/job/36096919090

Expected behavior

No warning messages about unused variables or functions which is the same as the defaults for Arduino IDE and arduino-cli

'arduino/compile-sketches' version

1.1.2

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details
@MallocArray MallocArray added the type: imperfection Perceived defect in any part of project label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

1 participant