Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare release: v1.2.0 #3015

Merged
merged 2 commits into from
Feb 13, 2025
Merged

Prepare release: v1.2.0 #3015

merged 2 commits into from
Feb 13, 2025

Conversation

tarrencev
Copy link
Contributor

@tarrencev tarrencev commented Feb 13, 2025

Automated changes by create-pull-request GitHub action

Summary by CodeRabbit

  • Chores
    • Updated the project version to 1.2.0 across key modules for consistent release management.
  • New Features
    • Introduced library management features in the contract, including a new method for library registration and an event for library registration notifications.
    • Added new resource handling capabilities to manage library resources.
  • Bug Fixes
    • Removed the test function from the SimpleMath interface, streamlining the library's functionality.

Copy link

coderabbitai bot commented Feb 13, 2025

Walkthrough

Ohayo, sensei! This PR uniformly bumps the version numbers for several Rust package configuration files. The workspace's main Cargo.toml and the various Scarb.toml files in different directories have the version updated from "1.1.2" to "1.2.0". Additionally, modifications were made to the manifest_dev.json files, enhancing library management features and updating existing resource handling. No other modifications or dependency changes were made.

Changes

File(s) Change Summary
Cargo.toml Updated workspace package version from "1.1.2" to "1.2.0" in [workspace.package].
crates/dojo/core/Scarb.toml, crates/torii/types-test/Scarb.toml, examples/spawn-and-move/Scarb.toml Updated package version from "1.1.2" to "1.2.0" in each respective configuration file.
examples/simple/manifest_dev.json Added new entries in entrypoints, events, and libraries; added register_library method and Library enum variant.
examples/spawn-and-move/manifest_dev.json Updated library class_hash and removed test function from SimpleMath interface.
examples/spawn-and-move/src/actions.cairo Added import for simple_math and modified namespace_def to include simple_math library resource.
examples/spawn-and-move/src/lib_math.cairo Removed test method from SimpleMath trait and simplified decrement_saturating method.

Possibly related PRs

  • Prepare release: v1.0.0-alpha.13 #2479: The changes in the main PR and the retrieved PR both involve updates to the version number in the Cargo.toml file, indicating a direct relationship at the code level.
  • Prepare release: v1.0.1 #2693: The changes in the main PR and the retrieved PR both involve updating the version numbers in the Cargo.toml and Scarb.toml files, indicating they are related at the code level.
  • Prepare release: v1.0.0-alpha.15 #2511: The changes in the main PR and the retrieved PR are related as both involve updates to the version number in the Cargo.toml file of a Rust workspace, specifically modifying the version from 1.1.2 to 1.2.0 in the main PR and from 1.0.0-alpha.14 to 1.0.0-alpha.15 in the retrieved PR.

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e8eca79 and e01de71.

⛔ Files ignored due to path filters (6)
  • crates/dojo/core-cairo-test/Scarb.lock is excluded by !**/*.lock
  • crates/torii/types-test/Scarb.lock is excluded by !**/*.lock
  • examples/simple/Scarb.lock is excluded by !**/*.lock
  • examples/spawn-and-move/Scarb.lock is excluded by !**/*.lock
  • spawn-and-move-db.tar.gz is excluded by !**/*.gz
  • types-test-db.tar.gz is excluded by !**/*.gz
📒 Files selected for processing (4)
  • examples/simple/manifest_dev.json (11 hunks)
  • examples/spawn-and-move/manifest_dev.json (1 hunks)
  • examples/spawn-and-move/src/actions.cairo (3 hunks)
  • examples/spawn-and-move/src/lib_math.cairo (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: docs
  • GitHub Check: clippy
  • GitHub Check: ensure-wasm
🔇 Additional comments (10)
examples/spawn-and-move/src/lib_math.cairo (1)

14-16: Ohayo, sensei! Nice optimization!

The simplified implementation is more concise while maintaining the same functionality. The direct return of saturating_sub result eliminates unnecessary variable assignment.

examples/spawn-and-move/src/actions.cairo (3)

249-249: LGTM! Import added for library support.

The import of simple_math aligns with the library registration functionality.


263-263: LGTM! Library resource registration added.

The library resource registration is properly configured with the correct class hash, name, and version.


334-334: LGTM! Test assertion added.

The assertion helps ensure that the initial number of moves is correctly set to 99.

examples/simple/manifest_dev.json (4)

82-86: LGTM! Library variant added to Resource enum.

The Library variant is properly structured with class_hash and felt252 fields, following the pattern of other resource types.


370-397: LGTM! Library registration function added.

The register_library function is well-designed with appropriate inputs for namespace, class hash, name, and version.


1001-1022: LGTM! Library registration event added.

The LibraryRegistered event follows the standard pattern with key and data fields.


2007-2007: LGTM! Storage arrays added.

Empty arrays for libraries and external_contracts have been added for future use.

Also applies to: 2036-2036

examples/spawn-and-move/manifest_dev.json (2)

2224-2224: Ohayo sensei! Class hash update looks good.

The library's class hash has been updated to 0x5d656902fe69f699ebbe0af587d01a46ecdb166daf10c70a6cf0b27555ee7fe. This change aligns with the version bump from 1.1.2 to 1.2.0.


2284-2301: Interface simplification looks clean.

The SimpleMath interface has been streamlined to only include the decrement_saturating function. The removal of the test function aligns with good interface design principles by keeping the API focused and minimal.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
Cargo.toml (1)

239-240: Ohayo sensei! Let's investigate this TODO.

There's a TODO comment suggesting to review if the git dependency for ipfs-api-backend-hyper is still needed. Would you like me to help investigate alternatives or create an issue to track this?

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9d0964e and e8eca79.

⛔ Files ignored due to path filters (4)
  • Cargo.lock is excluded by !**/*.lock
  • crates/dojo/core/Scarb.lock is excluded by !**/*.lock
  • crates/torii/types-test/Scarb.lock is excluded by !**/*.lock
  • examples/spawn-and-move/Scarb.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • Cargo.toml (1 hunks)
  • crates/dojo/core/Scarb.toml (1 hunks)
  • crates/torii/types-test/Scarb.toml (1 hunks)
  • examples/spawn-and-move/Scarb.toml (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • crates/dojo/core/Scarb.toml
  • crates/torii/types-test/Scarb.toml
  • examples/spawn-and-move/Scarb.toml
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: fmt

@@ -58,7 +58,7 @@ edition = "2021"
license = "Apache-2.0"
license-file = "LICENSE"
repository = "https://github.com/dojoengine/dojo/"
version = "1.1.2"
version = "1.2.0"
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Ohayo sensei! Version bump looks good.

The version increment from 1.1.2 to 1.2.0 follows semantic versioning principles, indicating new backward-compatible features.

Let's verify version consistency across all Scarb.toml files:


🏁 Script executed:

#!/bin/bash
# Description: Check version consistency across all Scarb.toml files

echo "Checking version consistency..."
find . -name "Scarb.toml" -type f -exec grep -H "version = " {} \;

Length of output: 1369


Ohayo sensei! Cargo.toml’s version bump from "1.1.2" to "1.2.0" looks solid, but please double-check the version consistency across your Scarb.toml files.

  • The main package update clearly follows semantic versioning.
  • However, our check shows that while a few Scarb.toml files (like in ./examples/spawn-and-move, ./crates/torii/types-test, and ./crates/dojo/core) are updated to "1.2.0", many others remain on older versions (e.g., "0.1.0", "1.0.12", "1.0.0-rc.0", "0.3.1-rc7").
  • Please confirm if these differences are intentional. If a unified bump is expected for a v1.2.0 release, update the mismatched Scarb.toml files accordingly.

Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.21%. Comparing base (9d0964e) to head (e01de71).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3015   +/-   ##
=======================================
  Coverage   56.21%   56.21%           
=======================================
  Files         436      436           
  Lines       58737    58737           
=======================================
+ Hits        33019    33021    +2     
+ Misses      25718    25716    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@glihm glihm enabled auto-merge (squash) February 13, 2025 01:46
@glihm glihm merged commit d54848b into main Feb 13, 2025
13 checks passed
@glihm glihm deleted the prepare-release branch February 13, 2025 02:05
steebchen added a commit that referenced this pull request Feb 13, 2025
@coderabbitai coderabbitai bot mentioned this pull request Feb 13, 2025
steebchen added a commit that referenced this pull request Feb 13, 2025
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