Skip to content

Fix MoonBit 0.1.3 compatibility and warnings#5

Open
tiye wants to merge 1 commit into
mainfrom
fix/moonbit-0.1.3-compat
Open

Fix MoonBit 0.1.3 compatibility and warnings#5
tiye wants to merge 1 commit into
mainfrom
fix/moonbit-0.1.3-compat

Conversation

@tiye
Copy link
Copy Markdown
Contributor

@tiye tiye commented May 9, 2026

Summary

  • update quaternion operator trait impls to the current MoonBit API
  • keep op_* compatibility helpers for downstream packages
  • clean remaining MoonBit warnings and bump package version to 0.1.3

Validation

  • moon check --target js
  • moon test
  • moon fmt
  • moon info
  • moon publish --dry-run

Copilot AI review requested due to automatic review settings May 9, 2026 16:41
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 9, 2026

Warning

Rate limit exceeded

@tiye has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 1 minute and 40 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 32a7cfc4-7e13-4a15-b9ca-d96743b43eb4

📥 Commits

Reviewing files that changed from the base of the PR and between c4ce0b5 and 40114fd.

📒 Files selected for processing (6)
  • moon.mod.json
  • src/lib/euler.mbt
  • src/lib/moon.pkg
  • src/lib/moon.pkg.json
  • src/lib/quaternion.mbt
  • src/lib/quaternion_test.mbt
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/moonbit-0.1.3-compat

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tiye tiye requested a review from a team May 9, 2026 16:41
Copy link
Copy Markdown

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

Updates the quaternion library to be compatible with MoonBit 0.1.3 by aligning operator trait implementations with the updated API, keeping op_* helper methods for downstream compatibility, and addressing warnings / packaging metadata.

Changes:

  • Migrate operator trait impls to the newer method names (add/sub/mul/div) while retaining op_add/op_sub/op_mul/op_div helper methods.
  • Replace deprecated numeric conversions / bit reinterpret helpers with the current Float::from_* / Float::reinterpret_from_int APIs and adjust tests accordingly.
  • Switch package config to moon.pkg import form (and bump module version to 0.1.3).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/lib/quaternion.mbt Updates Float conversion APIs, operator trait method names, retains op_* compatibility helpers, and updates docs code fences to nocheck.
src/lib/quaternion_test.mbt Adjusts tests to new Float helpers and updated Result/try patterns.
src/lib/moon.pkg.json Removes the empty legacy package config file.
src/lib/moon.pkg Adds package-level import for moonbitlang/core/math used by euler.mbt.
src/lib/euler.mbt Updates cos/sin conversions to the new Float::from_double API.
moon.mod.json Bumps package version from 0.1.2 to 0.1.3.

💡 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