Skip to content

fix core list --all sometimes crashing #1519

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

Merged
merged 6 commits into from
Oct 25, 2021
Merged

Conversation

umbynos
Copy link
Contributor

@umbynos umbynos commented Oct 19, 2021

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • What kind of change does this PR introduce?

bug fix

  • What is the current behavior?

I discovered that sometimes some residue can be left behind, after a core uninstall, for example:

tree ~/.arduino15/packages/
/home/umberto/.arduino15/packages/
├── attiny
│   └── hardware
│       └── avr

The package manager tries to load it as a package and this results in a dirty environment, which causes the cli to crash when running core list --all
further details in #1434

  • What is the new behavior?

a package with empty tools and platform is now not considered by the package manager
closes #1434

nope

  • Other information:

See how to contribute

@umbynos umbynos added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Oct 19, 2021
@umbynos umbynos requested a review from a team October 19, 2021 13:39
@umbynos umbynos self-assigned this Oct 19, 2021
@umbynos
Copy link
Contributor Author

umbynos commented Oct 21, 2021

Apparently the problem is still present when using indexes not perfectly compliant with specs (e.g. https://raw.githubusercontent.com/keyboardio/ArduinoCore-GD32-Keyboardio/main/package_gd32_index.json)
In this index the checksum and the size are missing (see #1468). Also the signature for that index is missing but this is another problem.
Apparently adding this index with config add causes the parsing when calling core list --all to fail because the platform does not has a release

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Umberto!

@umbynos umbynos force-pushed the umbynos/fix-core-list-all branch from 0a47106 to 9c4c0c9 Compare October 25, 2021 13:46
@umbynos umbynos force-pushed the umbynos/fix-core-list-all branch from 9c4c0c9 to 36567b4 Compare October 25, 2021 14:07
@umbynos umbynos merged commit f7b22f7 into master Oct 25, 2021
@umbynos umbynos deleted the umbynos/fix-core-list-all branch October 25, 2021 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when requesting platforms list over gRPC
3 participants