Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses warnings in the MoonBit codebase by updating deprecated API usages and migrating to newer syntax patterns. The changes ensure compatibility with current MoonBit language and standard library versions.
Changes:
- Migrated package configuration from moon.pkg.json to moon.pkg format
- Updated error handling from
(try? ...).unwrap()totry!operator - Updated iterator creation from
Iterator::new()toIter::new() - Updated BigInt hexadecimal conversion from
to_hex()toto_string(radix=16) - Updated suberror declaration to use explicit constructor syntax and removed Default from derive clause
- Bumped package version to 0.2.3 and dependency version to 0.2.2
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/moon.pkg.json | Removed old JSON-based package configuration |
| src/moon.pkg | Added new package configuration with explicit imports for hashset, strconv, cirru-parser, and test imports |
| src/main/moon.pkg.json | Removed old JSON-based main package configuration |
| src/main/moon.pkg | Added new main package configuration with is-main option |
| src/main/main.mbt | Updated error handling from (try? ...).unwrap() to try! operator in three locations |
| src/list.mbt | Updated iterator creation from Iterator::new().iter() to Iter::new() |
| src/lib.mbt | Updated suberror syntax, error handling pattern, and BigInt hex conversion method |
| moon.mod.json | Bumped package version and dependency version |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.