Commit d18a4fd
Fix JSONDecodeError in remove-incompatible-packages workflow (#195)
* Add mojo-toml v0.3.0 - Native TOML parser for Mojo
Package: mojo-toml v0.3.0
A native TOML 1.0 parser for Mojo with zero Python dependencies.
Features:
- Complete TOML 1.0 syntax support
- 96 comprehensive tests ensuring reliability
- Nested tables, dotted keys, duplicate detection
- Clear error messages with line/column context
- Performance: 26μs for simple parses, 2ms for real files
Repository:
- GitHub: https://github.com/DataBooth/mojo-toml
- Release: https://github.com/DataBooth/mojo-toml/releases/tag/v0.3.0
- License: MIT
Testing:
Package includes test_package.mojo which validates:
- Simple key-value parsing
- Integer and array parsing
- Nested table structures
- Dotted key functionality
All 96 tests pass in the source repository.
Sponsored by DataBooth (https://www.databooth.com.au/posts/mojo)
* Update failed-compatibility-macos-latest.json
* Fix JSONDecodeError when loading empty failed-compatibility files
Add defensive error handling to load_failed_compatibility() to gracefully
handle empty or corrupted JSON files instead of crashing with JSONDecodeError.
This prevents the remove-incompatible-packages workflow from failing when
encountering edge cases with the failed-compatibility JSON files.
Changes:
- Check for empty file content before parsing JSON
- Wrap json.loads() in try-except to catch JSONDecodeError
- Log warnings/errors when encountering problematic files
- Return empty dict as fallback in all error cases
Co-Authored-By: Warp <agent@warp.dev>
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Warp <agent@warp.dev>
Co-authored-by: Caroline Frasca <42614552+carolinefrasca@users.noreply.github.com>1 parent a414389 commit d18a4fd
2 files changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
18 | 26 | | |
19 | 27 | | |
20 | 28 | | |
| |||
0 commit comments