Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[breaking] Refactor errors handling in
packagemanager.Load* golang …
…API (#1682) * Removed `error` return from `discovery.New(...)` The `New` function never fails. * Replaced *status.Status with errors in packagamanager * Apply suggestions from code review
- Loading branch information
Showing
with
159 additions
and 129 deletions.
- +69 −92 arduino/cores/packagemanager/loader.go
- +16 −16 arduino/cores/packagemanager/loader_test.go
- +2 −3 arduino/discovery/discovery.go
- +1 −5 arduino/discovery/discovery_client/main.go
- +1 −2 arduino/discovery/discovery_test.go
- +18 −0 arduino/errors.go
- +6 −3 commands/instances.go
- +40 −0 docs/UPGRADING.md
- +4 −6 legacy/builder/hardware_loader.go
- +2 −2 test/test_core.py
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -759,7 +759,7 @@ def test_core_with_wrong_custom_board_options_is_loaded(run_command, data_dir): | ||
| assert "arduino-beta-dev:platform_with_wrong_custom_board_options:altra" in boards | ||
| # Verify warning is shown to user | ||
| assert ( | ||
| "Error initializing instance: Error loading hardware platform: " | ||
| + "loading platform release arduino-beta-dev:[email protected]: " | ||
| + "loading boards: " | ||
| + "skipping loading of boards arduino-beta-dev:platform_with_wrong_custom_board_options:nessuno: " | ||
| @@ -797,7 +797,7 @@ def test_core_with_missing_custom_board_options_is_loaded(run_command, data_dir) | ||
| assert "arduino-beta-dev:platform_with_missing_custom_board_options:altra" in boards | ||
| # Verify warning is shown to user | ||
| assert ( | ||
| "Error initializing instance: Error loading hardware platform: " | ||
| + "loading platform release arduino-beta-dev:[email protected]: " | ||
| + "loading boards: " | ||
| + "skipping loading of boards arduino-beta-dev:platform_with_missing_custom_board_options:nessuno: " | ||

