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

Invalid sketch.json is silently ignored #1220

Closed
matthijskooijman opened this issue Mar 11, 2021 · 3 comments
Closed

Invalid sketch.json is silently ignored #1220

matthijskooijman opened this issue Mar 11, 2021 · 3 comments
Assignees
Labels
conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@matthijskooijman
Copy link
Collaborator

Bug Report

Current behavior

matthijs@grubby:~/test$ tree
.
├── sketch.json
└── test.ino

0 directories, 2 files
matthijs@grubby:~/test$ cat sketch.json 
{ foo
matthijs@grubby:~/test$ arduino-cli compile -v

Error during build: no FQBN provided

When an invalid sketch.json is present, it is silently ignored.

Expected behavior

I would expect an error about sketch.json containing invalid JSON and no other messages.

Environment

  • CLI version (output of arduino-cli version): arduino-cli alpha Version: 0.0.0-git Commit: Date:
  • Not sure why arduino-cli version says nothing useful, but this is a locally compiled, slightly modified version based on bf364db from Feb 26.
  • OS and platform: Linux / Ubuntu Focal / amd64
@per1234
Copy link
Contributor

per1234 commented Mar 11, 2021

Not sure why arduino-cli version says nothing useful

This happens when you use go build instead of task build. Task build generates the data used by arduino-cli version:

arduino-cli/Taskfile.yml

Lines 217 to 223 in 436277f

LDFLAGS: >
-ldflags
'
-X github.com/arduino/arduino-cli/version.versionString={{.VERSION}}
-X github.com/arduino/arduino-cli/version.commit={{ .COMMIT }}
-X github.com/arduino/arduino-cli/version.date={{.TIMESTAMP}}
'

@matthijskooijman
Copy link
Collaborator Author

This happens when you use go build instead of task build. Task build generates the data used by arduino-cli version:

Makes sense, thanks!

@per1234 per1234 reopened this Mar 30, 2021
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Mar 31, 2022
@umbynos
Copy link
Contributor

umbynos commented Nov 30, 2022

We dropped support for sketch.json in favor of sketch.yaml in #1930

@umbynos umbynos closed this as completed Nov 30, 2022
@umbynos umbynos self-assigned this Nov 30, 2022
@umbynos umbynos added the conclusion: invalid Issue/PR not valid label Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

3 participants