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

arduino-cli throws invalid number literal on core update index #61

Open
duglah opened this issue Mar 30, 2021 · 1 comment · May be fixed by #62
Open

arduino-cli throws invalid number literal on core update index #61

duglah opened this issue Mar 30, 2021 · 1 comment · May be fixed by #62

Comments

@duglah
Copy link

duglah commented Mar 30, 2021

Hello everybody,

currently the package_azureboard_index.json is broken, because it has a whitespace in the size literal, so the arduino-cli will throw a

Error updating index: invalid package index in https://raw.githubusercontent.com/VSChina/azureiotdevkit_tools/master/package_azureboard_index.json: json: invalid number literal, trying to unmarshal ""3788484 "" into Number

when you try to update the index of cores on MacOS with arduino-cli 0.17.0.

Steps to reproduce:

  1. Install arduino-cli, see the offical arduino-cli installation guide
  2. Create a configuration file: `arduino-cli config init``
  3. Open config file and add https://github.com/VSChina/azureiotdevkit_tools/blob/master/package_azureboard_index.json as additional url:
    Example:
board_manager:
  additional_urls: [https://raw.githubusercontent.com/duglah/azureiotdevkit_tools/master/package_azureboard_index.json]
  1. Run arduino-cli core update-index
@silvanocerza
Copy link

This kind of issues with custom indexes will be mitigated with the next release of the Arduino CLI, the bad index won't be loaded but it won't break the rest of the Arduino CLI so it remains usable. Obviously it won't be possible to install cores/platforms from the bad index since it's not loaded at all.
That mitigation is already available in the nightlies if you want to try it.

To avoid this kind of issues in the future I suggest using Arduino Lint, it checks for irregularities and errors in several types of Arduino projects including indexes. We also made a Github Action arduino/arduino-lint-action to automatically run it on all PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants