Skip to content

handle warnings#11

Open
tiye wants to merge 1 commit intomainfrom
warning
Open

handle warnings#11
tiye wants to merge 1 commit intomainfrom
warning

Conversation

@tiye
Copy link
Member

@tiye tiye commented Feb 18, 2026

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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() to try! operator
  • Updated iterator creation from Iterator::new() to Iter::new()
  • Updated BigInt hexadecimal conversion from to_hex() to to_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.

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 this pull request may close these issues.

2 participants