Skip to content

[mojo][core] Update the codebase to Mojo v1.0.0b1#56

Merged
forfudan merged 2 commits into
mainfrom
dev
May 7, 2026
Merged

[mojo][core] Update the codebase to Mojo v1.0.0b1#56
forfudan merged 2 commits into
mainfrom
dev

Conversation

@forfudan

@forfudan forfudan commented May 7, 2026

Copy link
Copy Markdown
Owner

This PR updates ArgMojo’s core code and tooling configuration to be compatible with Mojo v1.0.0b1.

Changes:

  • Bump Pixi environment (project version + Mojo dependency) to Mojo 1.0.0b1 and refresh the lockfile.
  • Migrate string-length usage from len(String) to String.byte_length() across core parsing/help code.
  • Update reflection and type constraints for Mojo 1.0 (reflect[T]() API, ImplicitlyDestructible bounds, and thin function pointers for stored handlers).

Copilot AI left a comment

Copy link
Copy Markdown

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 updates ArgMojo’s core code and tooling configuration to be compatible with Mojo v1.0.0b1.

Changes:

  • Bump Pixi environment (project version + Mojo dependency) to Mojo 1.0.0b1 and refresh the lockfile.
  • Migrate string-length usage from len(String) to String.byte_length() across core parsing/help code.
  • Update reflection and type constraints for Mojo 1.0 (reflect[T]() API, ImplicitlyDestructible bounds, and thin function pointers for stored handlers).

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_help.mojo Updates help-output parsing logic to use byte_length() for Mojo 1.0 string APIs.
src/argmojo/utils.mojo Migrates string length checks to byte_length() and updates numeric/similarity helpers accordingly.
src/argmojo/parse_result.mojo Switches alignment/emptiness checks to byte_length() for Mojo 1.0 compatibility.
src/argmojo/parsable.mojo Updates trait bounds and replaces deprecated struct_field_* reflection with reflect[Self]() API.
src/argmojo/command.mojo Updates response-file parsing length checks and changes auto-dispatch handler storage/signature to thin function pointers.
src/argmojo/argument.mojo Updates compile-time validation to use byte_length() for Mojo 1.0 string semantics.
src/argmojo/argument_wrappers.mojo Adds ImplicitlyDestructible bounds and switches type-name reflection to reflect[T]().name().
pixi.toml Bumps project version and pins Mojo to ==1.0.0b1.
pixi.lock Updates locked artifacts to Mojo 1.0.0b1 (+ related package updates).
docs/changelog.md Adds an unreleased note documenting Mojo 1.0.0b1 compatibility changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/argmojo/command.mojo
Comment thread docs/changelog.md Outdated
@forfudan forfudan merged commit fc06e17 into main May 7, 2026
5 checks passed
@forfudan forfudan deleted the dev branch May 7, 2026 20:05
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