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

chore: update dependences #2072

Merged
merged 23 commits into from
Oct 7, 2024
Merged

Conversation

lklimek
Copy link
Contributor

@lklimek lklimek commented Aug 23, 2024

Issue being fixed or feature implemented

Updated dependencies

What was done?

  • updated multiple dependencies
  • removed atty dependency which is not needed anymore, as the feature is already in rust std lib
  • updated source code to reflect dependency changes, mainly in derive_more

Note: requires #2070 to be merged first

How Has This Been Tested?

GHA

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Summary by CodeRabbit

Release Notes

  • New Features

    • Retained and clarified documentation comments in relevant methods for better understanding.
  • Bug Fixes

    • Various dependency updates may include bug fixes and performance improvements.
  • Documentation

    • Updated the version of the protoc - protobuf compiler in the README.
  • Refactor

    • Simplified display formatting in several enums and structs for cleaner code aesthetics without changing functionality.
  • Chores

    • Updated dependency versions across multiple packages to enhance stability and performance.

@lklimek lklimek added this to the v1.2.0 milestone Aug 23, 2024
@lklimek lklimek force-pushed the build/update-deps-tokio-tonic-prost branch from 8589ce9 to 93384fd Compare August 23, 2024 11:48
@lklimek lklimek changed the base branch from v1.2-dev to v1.3-dev September 3, 2024 06:26
@lklimek lklimek modified the milestones: v1.2.0, v1.3.0 Sep 3, 2024
@shumkov
Copy link
Member

shumkov commented Sep 4, 2024

It seems the branch is outdated since I see changes from other PRs

@shumkov shumkov changed the base branch from v1.3-dev to v1.4-dev September 20, 2024 16:18
@shumkov shumkov linked an issue Sep 23, 2024 that may be closed by this pull request
@shumkov shumkov removed this from the v1.3.0 milestone Sep 27, 2024
@lklimek lklimek marked this pull request as ready for review October 7, 2024 07:38
Copy link
Contributor

coderabbitai bot commented Oct 7, 2024

Walkthrough

The pull request introduces formatting adjustments to the #[display] attributes across multiple enums and structs related to document transitions. Changes include the removal of the fmt keyword in the display attributes, which does not impact the underlying functionality. The modifications are present in various files, specifically involving DocumentDeleteTransition, DocumentPurchaseTransition, DocumentReplaceTransition, and others. Additionally, updates to dependency versions and the Protocol Buffers compiler version are included, reflecting a general maintenance effort without altering core functionalities.

Changes

File Path Change Summary
packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/mod.rs Updated #[display] attribute for DocumentDeleteTransition enum, removing fmt keyword.
packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/v0/mod.rs Updated #[display] attribute for DocumentDeleteTransitionV0 struct, removing fmt keyword.
packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/mod.rs Updated #[display] attribute for DocumentPurchaseTransition enum, removing fmt keyword.
packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/v0/mod.rs Updated #[display] attribute for DocumentPurchaseTransitionV0 struct, removing fmt keyword.
packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/mod.rs Updated #[display] attribute for DocumentReplaceTransition enum, removing fmt keyword. Added methods to DocumentFromReplaceTransition trait.
packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/v0/mod.rs Updated #[display] attribute for DocumentReplaceTransitionV0 struct, removing fmt keyword.
packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/mod.rs Updated #[display] attribute for DocumentTransferTransition enum, removing fmt keyword.
packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/mod.rs Updated #[display] attribute for DocumentUpdatePriceTransition enum, removing fmt keyword.
packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/v0/mod.rs Updated #[display] attribute for DocumentUpdatePriceTransitionV0 struct, removing fmt keyword.
packages/rs-dapi-client/Cargo.toml Updated dependency versions and package version to 1.4.0-dev.5.
packages/rs-dpp/Cargo.toml Updated dependency versions and package version to 1.4.0-dev.5.
packages/rs-drive-abci/Cargo.toml Updated dependency versions and package version to 1.4.0-dev.5.
packages/rs-sdk/Cargo.toml Updated dependency versions and package version to 1.4.0-dev.5.
.devcontainer/Dockerfile Updated PROTOC_VERSION from 25.2 to 27.3, refining the installation process for the Protocol Buffers compiler.
README.md Updated prerequisite version for protoc - protobuf compiler from v25.2+ to v27.3+.

Possibly related PRs

Suggested reviewers

  • shumkov
  • QuantumExplorer

Poem

In the meadow where the code does play,
A new display shines bright today.
With attributes neat, and syntax so clear,
Our enums now sparkle, let’s give a cheer!
For every small change, a hop and a bound,
In the world of code, joy can be found! 🐇✨


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 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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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
Contributor

@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

🧹 Outside diff range and nitpick comments (6)
packages/rs-platform-versioning/Cargo.toml (1)

14-14: Consider updating proc-macro2 for consistency.

The proc-macro2 dependency is currently pinned to version "1.0.56", which is slightly older compared to the updated quote and syn versions. For consistency and to ensure compatibility, consider updating proc-macro2 to the latest compatible version.

You can update proc-macro2 by running:

cargo update -p proc-macro2

Then, update the version in the Cargo.toml file accordingly.

packages/rs-json-schema-compatibility-validator/Cargo.toml (1)

10-12: Consider updating other dependencies.

While json-patch has been updated, other dependencies like serde_json, thiserror, and once_cell remain unchanged. It's good practice to keep all dependencies up-to-date when possible.

Consider running cargo update to check for any available updates for these dependencies. If updates are available, verify that they don't introduce any breaking changes before applying them.

packages/wasm-dpp/Cargo.toml (1)

Line range hint 1-58: Consider addressing technical debt and improving dependency management.

There are a few areas in the Cargo.toml file that suggest potential improvements:

  1. There's a TODO comment about building wasm with build.rs. Consider prioritizing this task to improve the build process.
  2. The note about updating wasm-bindgen version in multiple places indicates a potential maintenance issue. Consider centralizing this configuration to reduce the risk of inconsistencies.
  3. The wasm-bindgen-futures dependency is marked as a false positive for cargo-machete. This might indicate that the dependency management could be simplified or clarified.

To improve the project's maintainability and reduce technical debt:

  • Implement the build.rs script for building wasm.
  • Centralize the wasm-bindgen version configuration, possibly using a workspace-level variable.
  • Review the necessity of the wasm-bindgen-futures dependency and consider documenting its usage more clearly if it's required.

Would you like assistance in implementing any of these improvements?

packages/rs-drive-abci/Cargo.toml (1)

Line range hint 1-114: Overall assessment: Dependency updates look good, with a few points to address.

The changes in this Cargo.toml file primarily consist of dependency updates, which is a good practice for maintaining the project. Most updates are minor or patch versions, which should be backwards compatible. However, there are a few points that require attention:

  1. The major version update of itertools (0.10.5 to 0.13) may introduce breaking changes.
  2. The tokio-util downgrade from 0.7.8 to 0.7 needs explanation or correction.
  3. New features added to derive_more should be utilized if not already in use.

General recommendations:

  1. Review changelogs for all updated dependencies, especially for itertools and tokio-util.
  2. Run a full test suite to ensure all functionality remains intact after these updates.
  3. Consider updating the package version (currently 1.4.0-dev.5) if these changes warrant it.
  4. Ensure all developers are aware of these dependency changes, especially if they require code modifications.

To improve the maintainability of your project:

  1. Consider using a tool like cargo-outdated to regularly check for and update dependencies.
  2. Implement a policy for dependency updates, including how often to check and criteria for accepting updates.
  3. If not already in place, set up a CI/CD pipeline that includes running tests with the updated dependencies before merging changes.
.github/actions/rust/action.yaml (1)

Line range hint 1-124: Consider addressing TODO comments and optimizing the workflow

While reviewing the entire file, I noticed several areas for potential improvement:

  1. TODO Comments: There are multiple TODO comments in the file (lines 31, 66, 103). Consider creating issues to track these improvements:

    • Moving certain installations to AMI and building daily (lines 31, 66, 103)
    • This could significantly speed up the workflow by having pre-built images
  2. Caching Optimization: The workflow uses both sccache and cargo registry caching. Consider evaluating if both are necessary or if one could be optimized out.

  3. Use of Shell Scripts: Some steps use inline shell scripts. For better maintainability and reusability, consider creating custom actions for complex operations like protoc installation and Rust toolchain version extraction.

  4. Error Handling: Ensure robust error handling is in place, especially for steps like protoc installation and Rust toolchain setup.

To improve the overall structure and efficiency of this workflow, consider the following steps:

  1. Create separate, reusable GitHub Actions for complex operations (e.g., protoc installation, Rust toolchain setup).
  2. Evaluate the caching strategy to ensure it's optimal for your use case.
  3. Address the TODO comments by creating corresponding GitHub issues.
  4. Consider using a matrix strategy if you need to test against multiple Rust versions or targets.

These changes could lead to a more maintainable, efficient, and robust CI process.

packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/mod.rs (1)

24-24: LGTM! Consider applying consistent formatting to other similar macros.

The added space between the display macro and its argument improves readability. This change is purely cosmetic and doesn't affect functionality.

For consistency, you might want to apply this formatting style to other similar macro usages throughout the codebase.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 9a8068b and 2d5aad9.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (32)
  • .github/actions/rust/action.yaml (1 hunks)
  • Dockerfile (1 hunks)
  • packages/dapi-grpc/Cargo.toml (1 hunks)
  • packages/rs-dapi-client/Cargo.toml (1 hunks)
  • packages/rs-dapi-grpc-macros/Cargo.toml (1 hunks)
  • packages/rs-dpp/Cargo.toml (3 hunks)
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/mod.rs (1 hunks)
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/v0/mod.rs (1 hunks)
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/mod.rs (1 hunks)
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/v0/mod.rs (1 hunks)
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/mod.rs (1 hunks)
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/v0/mod.rs (1 hunks)
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/mod.rs (1 hunks)
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/v0/mod.rs (1 hunks)
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/mod.rs (1 hunks)
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/v0/mod.rs (1 hunks)
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/mod.rs (1 hunks)
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/v0/mod.rs (1 hunks)
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/mod.rs (1 hunks)
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/v0/mod.rs (1 hunks)
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs (1 hunks)
  • packages/rs-drive-abci/Cargo.toml (2 hunks)
  • packages/rs-drive-abci/src/logging/logger.rs (2 hunks)
  • packages/rs-drive-proof-verifier/Cargo.toml (2 hunks)
  • packages/rs-drive/Cargo.toml (2 hunks)
  • packages/rs-json-schema-compatibility-validator/Cargo.toml (1 hunks)
  • packages/rs-platform-serialization-derive/Cargo.toml (1 hunks)
  • packages/rs-platform-value-convertible/Cargo.toml (1 hunks)
  • packages/rs-platform-version/Cargo.toml (1 hunks)
  • packages/rs-platform-versioning/Cargo.toml (1 hunks)
  • packages/rs-sdk/Cargo.toml (3 hunks)
  • packages/wasm-dpp/Cargo.toml (1 hunks)
✅ Files skipped from review due to trivial changes (13)
  • packages/rs-dapi-grpc-macros/Cargo.toml
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/mod.rs
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_create_transition/v0/mod.rs
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/mod.rs
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_purchase_transition/mod.rs
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_replace_transition/v0/mod.rs
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/mod.rs
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/mod.rs
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_update_price_transition/v0/mod.rs
  • packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/mod.rs
  • packages/rs-platform-serialization-derive/Cargo.toml
  • packages/rs-platform-value-convertible/Cargo.toml
  • packages/rs-platform-version/Cargo.toml
🧰 Additional context used
🔇 Additional comments (51)
packages/rs-platform-versioning/Cargo.toml (2)

16-16: LGTM: Dependency update for syn looks good.

The update from 2.0.15 to 2.0.75 for the syn dependency is a patch version bump, which should only include bug fixes and minor improvements. This significant jump in patch versions might indicate important bug fixes or performance improvements.

To ensure awareness of any notable changes or improvements, please run the following command:

#!/bin/bash
# Description: Check for notable changes or improvements in the syn crate

cargo tree -p syn --depth=0
cargo doc --no-deps --open syn

Review the output and changelog for any significant bug fixes or improvements that might affect your code.


15-15: LGTM: Dependency update for quote looks good.

The update from 1.0.26 to 1.0.37 for the quote dependency is a minor version bump, which should maintain backwards compatibility. This update likely includes bug fixes and potentially new features.

To ensure compatibility, please run the following command to check for any breaking changes or deprecations:

Review the output for any warnings or deprecation notices.

packages/rs-json-schema-compatibility-validator/Cargo.toml (2)

Line range hint 3-3: LGTM: Package version is appropriate.

The package version "1.4.0-dev.5" follows semantic versioning and correctly indicates a development version. This is suitable for ongoing development work.


9-9: Verify compatibility with updated json-patch dependency.

The update of json-patch from "1.2.0" to "1.4" is a minor version bump, which should be backwards compatible. However, it's important to ensure that this update doesn't introduce any unexpected behavior changes in the package.

Please run the following script to check for any breaking changes or new features in the json-patch changelog:

packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_delete_transition/v0/mod.rs (1)

20-20: LGTM! Consider verifying consistency across the codebase.

The change in the #[display] attribute is functionally equivalent and doesn't affect the output. It's a valid simplification of the attribute syntax.

To ensure consistency, please verify if similar changes have been applied to other structs in the codebase. You can use the following script:

If both syntaxes are present in the codebase, consider updating all occurrences to maintain consistency.

✅ Verification successful

Consistency Across Codebase Verified

All instances of the #[display] attribute are using the new syntax. No inconsistencies found.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for inconsistent usage of display attributes across the codebase

# Search for both old and new syntax
echo "Old syntax (#[display(fmt = ...)]):"
rg --type rust '#\[display\(fmt\s*=\s*"[^"]*"'

echo "\nNew syntax (#[display( ...)]):"
rg --type rust '#\[display\(\s*"[^"]*"'

Length of output: 3574

packages/rs-dapi-client/Cargo.toml (5)

37-37: LGTM. Consistent update with main dependencies.

The update of tokio from 1.32.0 to 1.39 in the [dev-dependencies] section is consistent with the update in the main dependencies. This ensures that the same version of tokio is used across both production and development environments.


Line range hint 1-3: Confirm intentional version bump to 1.4.0-dev.5.

The package version has been updated to 1.4.0-dev.5. Please confirm that this version bump is intentional and aligns with the project's versioning strategy. Ensure that all relevant changes for this version are included in this PR or have been addressed in previous commits.

To check the recent changes and commits, run the following script:


22-22: LGTM. Verify compatibility with the new backon version.

The update of backon from 0.4.1 to 0.5 is a minor version bump, which should be backwards compatible. However, it's always good to verify that no breaking changes were introduced that might affect our codebase.

To ensure compatibility, please run the following script:

✅ Verification successful

Verified: The backon dependency update to version 0.5 introduces no breaking changes or deprecations.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any breaking changes or deprecations in the backon 0.5 release notes

# Test: Search for breaking changes or deprecations in the backon changelog
curl -sSL https://raw.githubusercontent.com/backoff-rs/backoff/main/CHANGELOG.md | rg -i '(breaking|deprecat)'

Length of output: 292


Script:

#!/bin/bash
# Description: Check for any breaking changes or deprecations in the backon 0.5 release notes

# Fetch the changelog and search for 'breaking' or 'deprecation'
curl -sSL https://raw.githubusercontent.com/backoff-rs/backoff/main/CHANGELOG.md | rg -i '(breaking|deprecat)'

Length of output: 112


25-25: Major version update for http-serde. Review changes carefully.

The update of http-serde from 1.1.3 to 2.1 is a major version bump, which may include breaking changes. It's crucial to review the changelog and update any affected code in the project.

Please run the following script to check for breaking changes and update notes:


29-29: LGTM. Consider reviewing new features in tokio 1.39.

The update of tokio from 1.32.0 to 1.39 in the [dependencies] section is a minor version bump. While this should be backwards compatible, it's worth reviewing the changelog for any new features or optimizations that could benefit the project.

To check for new features and potential optimizations, run the following script:

packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_transfer_transition/v0/mod.rs (1)

Line range hint 28-32: LGTM! Consider updating similar structs for consistency.

The change to remove the fmt = prefix from the Display attribute is correct and aligns with current best practices for the derive_more::Display macro. This modification doesn't affect the functionality and improves code clarity.

To ensure consistency across the codebase, please run the following script to check for any other structs that might need a similar update:

✅ Verification successful

All Display attributes are correctly formatted. No further updates needed.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Find other structs using the old Display attribute format

# Search for structs with the old Display attribute format
rg --type rust '#\[display\(fmt\s*=\s*".*"\)\]' -g '!target/'

# Note: If any results are found, consider updating them similarly.

Length of output: 63


Script:

#!/bin/bash
# Description: Robustly find structs using the old Display attribute format

# Using ast-grep to search for structs with the old Display attribute format
ast-grep --lang rust --pattern '
    struct $_Name {
        $$$
    }
    #[display(fmt = $_Format)]
'

Length of output: 598


Script:

#!/bin/bash
# Description: Find structs using the old Display attribute format

# Using ast-grep to search for the old Display attribute format
ast-grep --lang rust --pattern '
    #[display(fmt = $_Format)]
' --find-lang rust

Length of output: 293


Script:

#!/bin/bash
# Description: Find structs using the old Display attribute format

# Using ast-grep to search for the old Display attribute format
ast-grep --lang rust --pattern '#[display(fmt = $_Format)]' .

Length of output: 63

packages/rs-drive-proof-verifier/Cargo.toml (3)

Line range hint 36-45: Summary: Dependency updates look good, but require verification.

The updates to tenderdash-abci (1.2.0 to 1.2.1) and derive_more (0.99.11 to 1.0) align with the PR objectives. However, as these changes could potentially affect the codebase, please ensure:

  1. All tests pass after these updates.
  2. The functionality using these dependencies works as expected.
  3. There are no deprecation warnings or breaking changes that need to be addressed.

Run the following script to perform a general check:

#!/bin/bash
# Description: Perform general checks after dependency updates

# Test: Run all tests
cargo test --package drive-proof-verifier

# Test: Check for any new warnings after the updates
cargo check --package drive-proof-verifier

# Test: Search for usage of new 'from' feature from derive_more
rg --type rust 'derive\(.*From.*\)' $(fd -t f -e rs)

36-39: LGTM: tenderdash-abci dependency update looks good.

The update from version 1.2.0 to 1.2.1 is a minor version change, which typically indicates bug fixes or small improvements. This aligns with the PR objectives to update dependencies.

To ensure compatibility, please run the following script to check for any breaking changes or deprecations:


45-45: Verify compatibility with derive_more 1.0 and explain new feature usage.

The update from version 0.99.11 to 1.0 is a major version change, which could potentially introduce breaking changes. Additionally, the new from feature has been added.

Please run the following script to check for any breaking changes and verify the crate still builds:

Could you please explain why the from feature was added and how it's being used in the codebase? This will help ensure the update is being fully utilized.

packages/wasm-dpp/Cargo.toml (2)

47-47: Verify compatibility with updated num_enum dependency.

The num_enum dependency has been updated from version 0.5.7 to 0.7. While this is a minor version update and should maintain backwards compatibility, it's still important to ensure that it works correctly with the project.

Please confirm that:

  1. The project compiles without errors using the new version.
  2. All tests related to enum usage pass after the update.

Run the following script to check for any num_enum usage that might be affected:


44-44: Verify compatibility with updated itertools dependency.

The itertools dependency has been updated from version 0.10.5 to 0.13, which is a significant version jump. While this update may bring performance improvements and new features, it could also introduce breaking changes.

Please ensure that:

  1. The project compiles successfully with the new version.
  2. All tests pass after the update.
  3. There are no deprecation warnings related to itertools usage.

Run the following script to check for any itertools usage that might be affected:

packages/dapi-grpc/Cargo.toml (5)

36-36: LGTM: prost dependency update

The update of prost from version 0.12.3 to 0.13 is a minor version bump, which should introduce new features and improvements without breaking changes.

Please ensure that this update is compatible with the rest of the codebase and other dependencies. You can verify this by running the project's test suite and checking for any compilation errors or warnings related to prost.


38-41: LGTM: tonic dependency update and feature specification

The update of tonic from version 0.11 to 0.12 is a minor version bump, which should introduce new features and improvements without breaking changes. The explicit disabling of default features while specifying required ones is a good practice for minimizing dependencies.

Please ensure that this update is compatible with the rest of the codebase and other dependencies. You can verify this by:

  1. Running the project's test suite.
  2. Checking for any compilation errors or warnings related to tonic.
  3. Verifying that all required tonic functionality is still available with the specified features.

45-47: Version mismatch in tenderdash-proto dependency

The update of tenderdash-proto from version 1.2.0+1.3.0 to 1.2.1 is a patch version bump, which should include bug fixes and minor improvements. However, there's a discrepancy between the specified version (1.2.1) and the tag version (v1.2.1+1.3.0).

Please clarify the intended version:

  1. If 1.2.1 is correct, update the tag to match: tag = "v1.2.1".
  2. If 1.2.1+1.3.0 is correct, update the version to match: version = "1.2.1+1.3.0".

Ensure that the chosen version is compatible with the rest of the codebase and other dependencies by running the project's test suite.


52-52: Significant version update for tonic-build dependency

The update of tonic-build from version 0.9.2 to 0.12 is a significant jump, which may include breaking changes. However, it's good that it now matches the version of the main tonic dependency, ensuring consistency.

Due to the significant version jump, please carefully verify compatibility:

  1. Review the changelog for tonic-build between versions 0.9.2 and 0.12 for any breaking changes.
  2. Run the project's build process and test suite to ensure no compilation errors or warnings related to tonic-build.
  3. Check if any generated code needs to be updated due to changes in tonic-build.
  4. Verify that all tonic-build related scripts or build configurations are still working as expected.

36-52: Summary of dependency updates

The changes in this file consist of several dependency updates:

  1. prost: 0.12.3 -> 0.13
  2. tonic: 0.11 -> 0.12
  3. tenderdash-proto: 1.2.0+1.3.0 -> 1.2.1
  4. tonic-build: 0.9.2 -> 0.12

These updates appear to be part of a general dependency upgrade process. Most are minor or patch version updates, which should introduce improvements and bug fixes without breaking changes. The tonic-build update is more significant and requires careful verification.

To ensure the stability of the project after these updates:

  1. Run the full test suite to catch any potential compatibility issues.
  2. Perform a thorough manual testing of the affected components.
  3. Review the changelogs of the updated dependencies for any breaking changes or deprecations.
  4. Update any documentation or examples that might be affected by these changes.
packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/mod.rs (1)

40-40: LGTM: Display attribute syntax updated.

The change from #[display(fmt = "V0({})", "_0")] to #[display("V0({})", "_0")] is a minor syntax update that aligns with the PR's objective of updating dependencies, particularly the derive_more library. This modification maintains the same functionality while potentially adhering to newer syntax conventions.

packages/rs-drive-abci/Cargo.toml (7)

72-72: LGTM. Verify usage of new derive_more features.

The update to derive_more 1.0 with additional features ("from", "deref", "deref_mut") is a positive change, moving to a stable release. This update likely includes performance improvements and bug fixes.

To ensure the new features are being utilized effectively:

  1. Run a check for compile errors:
cargo check
  1. Search for usage of the new derive macros:
rg --type rust '#\[derive\((From|Deref|DerefMut)\)]'
  1. If no usage is found, consider updating relevant structs to take advantage of these new features where appropriate.

65-71: LGTM for tokio. Verify tokio-util downgrade.

The update to tokio 1.39 is a minor version bump, which should be backwards compatible. However, the change to tokio-util from 0.7.8 to 0.7 is a version downgrade, which is unusual and might cause compatibility issues.

Please verify the tokio-util downgrade:

  1. Check if this was intentional or a typo.
  2. If intentional, explain the reasoning in a comment.
  3. Run the following commands to ensure compatibility:
cargo check
cargo test

Also, review any code using tokio-util to ensure it's compatible with version 0.7:

rg --type rust 'use tokio_util::'

61-62: LGTM. Verify compatibility with updated metrics dependencies.

The updates to metrics (0.22.3 to 0.23) and metrics-exporter-prometheus (0.14.0 to 0.15) are minor version bumps, which should be backwards compatible. However, it's recommended to review the changelogs for any potential breaking changes or new features that might be beneficial to the project.

To ensure there are no compatibility issues, please run the following commands:

Also, verify that the metrics are still being collected and exported correctly in your testing environment.


37-37: LGTM. Verify compatibility with prost 0.13.

The update from prost 0.12 to 0.13 is a minor version bump, which should be backwards compatible. However, it's recommended to review the changelog for any potential breaking changes or new features that might be beneficial to the project.

To ensure there are no compatibility issues, please run the following command:


36-36: LGTM. Verify compatibility with mockall 0.13.

The update from mockall 0.11 to 0.13 is a minor version bump, which should be backwards compatible. However, it's recommended to review the changelog for any potential breaking changes or new features that might be beneficial to the project.

To ensure there are no compatibility issues, please run the following command:


56-56: Major version update for itertools. Verify compatibility and update usage.

The update from itertools 0.10.5 to 0.13 is a major version bump, which may include breaking changes. It's crucial to review the changelog and update any usage of itertools in the codebase.

Please run the following commands to check for any compatibility issues:

Also, review the itertools changelog and update any affected code:


52-54: LGTM. Verify reproducibility with git-sourced tenderdash-abci.

The update to tenderdash-abci 1.2.1 is a patch version bump, which should only include bug fixes. However, the switch to sourcing from a git repository with a specific tag might affect build reproducibility.

To ensure reproducibility and no compatibility issues, please run the following commands:

Also, consider adding a cargo-vet policy for this git dependency to enhance supply chain security.

packages/rs-sdk/Cargo.toml (4)

Line range hint 1-3: Version update and dependency changes summary.

The package version has been updated to "1.4.0-dev.5". Please ensure this version update aligns with the project's versioning strategy and reflects the nature of the changes made.

Overall, this update includes:

  1. Addition of the arc-swap dependency (v1.7.1)
  2. Major version update of the http dependency (v0.2.12 -> v1.1)
  3. Minor version update of derive_more (v0.99.17 -> v1.0) with the addition of the "from" feature

These changes suggest improvements in concurrency handling, HTTP functionality, and derive macro usage. Ensure that all these updates are intentional and that the codebase has been appropriately adjusted to accommodate these changes.


19-19: Major version update for http dependency.

The http dependency has been updated from version 0.2.12 to 1.1. This is a major version update that may introduce breaking changes. Please ensure that:

  1. The codebase has been updated to accommodate any API changes in the new version.
  2. All functionality depending on the http crate still works as expected.
  3. The changelog for the http crate has been reviewed for any significant changes or deprecations.

Run the following script to identify potential areas that might be affected by this update:

#!/bin/bash
# Description: Identify usage of http crate in the codebase

# Test: Search for imports or uses of the http crate
rg --type rust 'use http::|use.*http'

34-34: Update to derive_more dependency and addition of "from" feature.

The derive_more dependency has been updated from version 0.99.17 to 1.0, and the "from" feature has been added. While this is a minor version update and should be backwards compatible, please ensure that:

  1. The codebase has been updated to use the new "from" feature where appropriate.
  2. Existing usage of derive_more macros still works as expected.
  3. The addition of the "from" feature doesn't introduce any unintended behavior.

Run the following script to identify usage of derive_more in the codebase, particularly focusing on potential uses of the new "from" feature:

✅ Verification successful

derive_more Dependency Updated Successfully with Active From Feature Usage.

The derive_more dependency has been updated to version 1.0, and the "from" feature has been successfully incorporated. The feature is actively used across multiple modules in the codebase, ensuring that the update aligns with current code requirements. Please ensure thorough testing to confirm that this update maintains expected behaviors without introducing any regressions.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Identify usage of derive_more in the codebase

# Test: Search for imports of derive_more and uses of From derive macro
rg --type rust 'use derive_more::|#\[derive\(.*From.*\)\]'

Length of output: 19904


7-8: Verify usage of the new arc-swap dependency.

The arc-swap crate has been added as a new dependency. This library is typically used for concurrent programming with atomic reference counting. Please ensure that this dependency is actually used in the codebase and that its addition is intentional.

Run the following script to check for usage of arc-swap in the codebase:

✅ Verification successful

Re-verify the usage of the new arc-swap dependency.

Please execute the following script to check for any use of arc_swap in the codebase:


Usage of the new arc-swap dependency confirmed.

The arc-swap crate is actively used in the following files:

  • packages/rs-sdk/src/mock/sdk.rs
  • packages/rs-sdk/src/mock/provider.rs
  • packages/rs-drive/src/cache/system_contracts.rs
  • packages/rs-drive-abci/src/platform_types/platform/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/mod.rs
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for usage of arc-swap in the codebase

# Test: Search for imports or uses of arc-swap
rg --type rust 'use arc_swap::|use.*arc_swap'

Length of output: 139


Script:

#!/bin/bash
# Description: Accurately check for usage of arc-swap in the codebase

# Test: Search for imports or uses of arc-swap
rg --type rust 'use arc_swap::|use.*arc_swap'

Length of output: 447

.github/actions/rust/action.yaml (1)

82-82: Verify compatibility and update related components for protoc 27.3

The update of protoc from version 25.2 to 27.3 is a significant version jump. While keeping dependencies up-to-date is crucial for security and feature improvements, please ensure the following:

  1. Compatibility: Confirm that protoc 27.3 is compatible with all parts of the project that depend on it.
  2. Testing: Verify that this change has been tested in the CI/CD pipeline and doesn't break any existing functionality.
  3. Documentation: Update any relevant documentation that mentions the protoc version.
  4. Consistency: Check for other references to the protoc version in the project (e.g., README, other CI files) and update them accordingly.

To help verify the impact of this change, you can run the following script:

This script will help identify any other files that might need updating due to the protoc version change.

packages/rs-drive/Cargo.toml (5)

54-54: Verify compatibility with itertools 0.13.

The itertools dependency has been updated from version 0.11.0 to 0.13, which is a significant version jump.

  1. Please verify that this update doesn't introduce any breaking changes to the codebase.
  2. Check the itertools changelog for any important updates, new features, or potential issues.
  3. Ensure that any usage of itertools in the project is compatible with the new version.

To help verify the impact of this change, you can run the following command to search for usages of itertools in the codebase:

rg --type rust 'use itertools' -A 5

This will help identify any potential areas that might be affected by the update.


Line range hint 1-114: Overall assessment of dependency updates

The changes in this Cargo.toml file primarily involve updating several dependencies to newer versions and adding new features to some of them. While these updates can bring improvements and new capabilities, they also carry the risk of introducing breaking changes or unexpected behavior.

Key points to consider:

  1. Significant version jumps for derive_more, itertools, and criterion.
  2. Addition of new features like "from" for derive_more and "sync" for moka.
  3. The criterion update only affects benchmarking and not the main codebase.

To ensure the stability and correctness of the project after these updates:

  1. Run the full test suite to catch any potential breaking changes or regressions.
  2. Update and run all benchmarks to verify they still work with the new criterion version.
  3. Perform a thorough manual testing of the application, focusing on areas that heavily use the updated dependencies.

You can use the following command to run all tests:

And this command to run the benchmarks:

Please ensure all tests pass and benchmarks run successfully after the dependency updates.


34-34: Verify compatibility with derive_more 1.0 and the new "from" feature.

The derive_more dependency has been updated from version 0.99.17 to 1.0, which is a significant version jump. Additionally, the "from" feature has been added.

  1. Please verify that this update doesn't introduce any breaking changes to the codebase.
  2. Check the derive_more changelog for any important updates or potential issues.
  3. Ensure that the addition of the "from" feature is intentional and doesn't affect existing derive macro behavior unexpectedly.

To help verify the impact of this change, you can run the following command to search for usages of derive_more in the codebase:

This will help identify any potential areas that might be affected by the update.


43-46: Verify compatibility with moka 0.12 and the new "sync" feature.

The moka dependency has been updated from version 0.11.1 to 0.12, and the "sync" feature has been added.

  1. Please verify that this update doesn't introduce any breaking changes to the codebase.
  2. Check the moka changelog for any important updates or potential issues.
  3. Ensure that the addition of the "sync" feature is intentional and aligns with the project's requirements.

To help verify the impact of this change, you can run the following command to search for usages of moka in the codebase:

This will help identify any potential areas that might be affected by the update and the new "sync" feature.

✅ Verification successful

No usages of moka were found in the initial search.

It appears that the previous search did not locate any instances of moka being used in the codebase. To ensure a thorough verification, please execute the following command to accurately search for all usages of moka:


moka dependency update and "sync" feature addition verified.

The moka dependency has been successfully updated to version 0.12, and the "sync" feature is actively utilized in packages/rs-drive/src/cache/data_contract.rs. No compatibility issues or breaking changes have been identified based on the current usage.

  • File Impacted: packages/rs-drive/src/cache/data_contract.rs
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

rg --type rust 'use moka' -A 5

Length of output: 22360


Script:

#!/bin/bash
# Corrected command to search for `use moka` in Rust files
rg --type rust 'use moka' -A 5

Length of output: 503


63-63: Verify compatibility with criterion 0.5 for benchmarks.

The criterion dependency in the dev-dependencies section has been updated from version 0.3.5 to 0.5, which is a significant version jump.

  1. Please verify that this update doesn't break any existing benchmarks.
  2. Check the criterion changelog for any important updates, new features, or potential issues.
  3. Ensure that all benchmark code is compatible with the new version.

To help verify the impact of this change, you can run the following command to search for benchmark files in the codebase:

This will help identify any benchmark files that might need to be updated due to the criterion version change.

✅ Verification successful

Verified that no benchmarks are present in the codebase.

Since no benchmark annotations (#[bench]) were found, updating the criterion dependency from version 0.3.5 to 0.5 does not impact any existing benchmarks.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

fd -e rs | xargs rg '#\[bench\]'

Length of output: 194


Script:

#!/bin/bash
# Search for Rust benchmark annotations in the codebase
fd -e rs | xargs rg '#\[bench\]' || echo "No benchmarks found or an error occurred."

Length of output: 127

packages/rs-dpp/src/state_transition/state_transitions/document/documents_batch_transition/document_transition/document_base_transition/v0/mod.rs (1)

38-38: LGTM! Verify derive_more crate version.

The change in the #[display] attribute syntax is correct and likely due to an update in the derive_more crate. The removal of fmt = aligns with newer versions of the crate.

To ensure consistency across the project, please run the following script to check the derive_more crate version and usage:

packages/rs-dpp/Cargo.toml (8)

Line range hint 3-3: LGTM: Package version update

The package version has been updated to "1.4.0-dev.5", which follows semantic versioning principles and indicates a development version. This update is appropriate for ongoing development work.


33-33: Verify compatibility with env_logger v0.11

The env_logger dependency has been updated from version 0.9 to 0.11. This minor version update may include new features and bug fixes. Please ensure that this update doesn't introduce any breaking changes to the codebase.

To verify the compatibility, you can run the following command to check for any breaking changes or deprecations:

cargo tree -p env_logger --depth=0
cargo check

37-37: Verify compatibility with itertools v0.13

The itertools dependency has been updated from version 0.12.1 to 0.13. This minor version update may include new features and bug fixes. Please ensure that this update doesn't introduce any breaking changes to the codebase.

To verify the compatibility, you can run the following command to check for any breaking changes or deprecations:

cargo tree -p itertools --depth=0
cargo check

43-43: Verify compatibility with num_enum v0.7

The num_enum dependency has been updated from version 0.5.7 to 0.7. This minor version update may include new features and bug fixes. Please ensure that this update doesn't introduce any breaking changes to the codebase.

To verify the compatibility, you can run the following command to check for any breaking changes or deprecations:

cargo tree -p num_enum --depth=0
cargo check

58-58: Verify compatibility with derive_more v1.0 and review feature additions

The derive_more dependency has been updated from version 0.99.17 to 1.0, which is a major version update. Additionally, specific features "from" and "display" have been added. This update may include breaking changes and new functionality.

  1. Please ensure that this update doesn't introduce any breaking changes to the codebase.
  2. Verify that the added features "from" and "display" are necessary and used in the project.

To verify the compatibility and feature usage, you can run the following commands:

cargo tree -p derive_more --depth=0
cargo check
rg --type rust 'use derive_more::(From|Display)'

59-59: Verify compatibility with ed25519-dalek v2.1

The ed25519-dalek dependency has been updated from version 2.0.0-rc.2 to 2.1, moving from a release candidate to a stable version. The "rand_core" feature is retained as optional. This update may include important fixes and improvements.

Please ensure that this update doesn't introduce any breaking changes to the codebase and that the optional "rand_core" feature is still used as intended.

To verify the compatibility and feature usage, you can run the following commands:

cargo tree -p ed25519-dalek --depth=0
cargo check
rg --type rust 'use ed25519_dalek'

Line range hint 1-270: Summary of dependency updates

This pull request updates several dependencies in the packages/rs-dpp/Cargo.toml file. The updates include both minor and major version changes, which may introduce new features, bug fixes, and potentially breaking changes. Here's a summary of the key updates:

  1. Package version updated to "1.4.0-dev.5"
  2. bs58: 0.4.0 → 0.5
  3. env_logger: 0.9 → 0.11
  4. itertools: 0.12.1 → 0.13
  5. num_enum: 0.5.7 → 0.7
  6. derive_more: 0.99.17 → 1.0 (with added features)
  7. ed25519-dalek: 2.0.0-rc.2 → 2.1

These updates appear to be part of a general dependency upgrade, which is a good practice for maintaining the project. However, it's crucial to verify compatibility and test thoroughly, especially for the major version updates like derive_more.

To ensure the stability of the project after these updates, please:

  1. Run a full test suite
  2. Perform a thorough code review to check for any breaking changes
  3. Update any documentation or examples that may be affected by these changes

You can use the following command to get an overview of all updated dependencies:

cargo tree --depth=1

19-19: Verify compatibility with bs58 v0.5

The bs58 dependency has been updated from version 0.4.0 to 0.5. This minor version update may include new features and bug fixes. Please ensure that this update doesn't introduce any breaking changes to the codebase.

To verify the compatibility, you can run the following command to check for any breaking changes or deprecations:

packages/rs-drive-abci/src/logging/logger.rs (2)

8-8: LGTM: Import statement updated to include IsTerminal

This change aligns with the PR objective of removing the atty dependency. The IsTerminal trait from std::io is now imported, which will be used to replace the functionality previously provided by atty.


308-310: LGTM: Improved terminal check logic

The changes in the layer method effectively replace the atty dependency with standard library functionality:

  1. Using unwrap_or_else instead of unwrap_or allows for lazy evaluation, potentially improving performance.
  2. The terminal check now uses std::io::stdout().is_terminal() and std::io::stderr().is_terminal(), which replaces atty::is().

These changes maintain the existing behavior while aligning with the PR objective of removing the atty dependency.

Dockerfile (1)

33-33: Ensure compatibility with protoc version 27.3

Updating PROTOC_VERSION from 25.2 to 27.3 may introduce changes in how protobuf files are compiled. Please verify that all .proto files are compatible with the new protoc version and that the generated code functions as expected without any issues.

Run the following script to identify any deprecated or incompatible protobuf syntax:

✅ Verification successful


Compatibility with protoc version 27.3 Confirmed

All .proto files have been checked and no deprecated or incompatible syntax was found. The update to PROTOC_VERSION from 25.2 to 27.3 should not introduce any issues with the protobuf file compilation.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for deprecated or changed syntax in .proto files that may not be compatible with protoc 27.3.

# Expected: No matches found. If matches are found, they indicate potential incompatibilities.

# Check for usage of the 'required' keyword, which is discouraged in newer protobuf versions.
rg 'required\s+\w+\s+\w+\s*=' --type proto

# Check for any other deprecated fields or options.
rg '^\s*option\s+deprecated\s*=' --type proto

Length of output: 152


Script:

#!/bin/bash
# Description: Search for deprecated or changed syntax in .proto files that may not be compatible with protoc 27.3.

# Expected: No matches found. If matches are found, they indicate potential incompatibilities.

# Check for usage of the 'required' keyword, which is discouraged in newer protobuf versions.
rg 'required\s+\w+\s+\w+\s*=' -g "*.proto"

# Check for any other deprecated fields or options.
rg '^\s*option\s+deprecated\s*=' -g "*.proto"

Length of output: 92


Script:

#!/bin/bash
# Description: Verify the presence of .proto files and search for deprecated or changed syntax incompatible with protoc 27.3.

# Step 1: List all .proto files in the repository.
fd --extension proto --type f --exclude node_modules --exclude dist --exclude build > proto_files_list.txt

# Check if any .proto files were found.
if [ -s proto_files_list.txt ]; then
    echo "Found .proto files:"
    cat proto_files_list.txt
else
    echo "No .proto files found in the repository."
    exit 1
fi

# Step 2: Search for deprecated syntax in the found .proto files.
rg 'required\s+\w+\s+\w+\s*=' -f proto_files_list.txt
rg '^\s*option\s+deprecated\s*=' -f proto_files_list.txt

Length of output: 596


Script:

#!/bin/bash
# Description: Verify the presence of .proto files and search for deprecated or changed syntax incompatible with protoc 27.3.

# Step 1: List all .proto files in the repository.
fd --extension proto --type f --exclude node_modules --exclude dist --exclude build > proto_files_list.txt

# Check if any .proto files were found.
if [ -s proto_files_list.txt ]; then
    echo "Found .proto files:"
    cat proto_files_list.txt
else
    echo "No .proto files found in the repository."
    exit 1
fi

# Step 2: Search for deprecated syntax in the found .proto files.
# Using xargs to pass the file paths to rg
xargs rg 'required\s+\w+\s+\w+\s*=' < proto_files_list.txt
xargs rg '^\s*option\s+deprecated\s*=' < proto_files_list.txt

Length of output: 427

Dockerfile Show resolved Hide resolved
shumkov
shumkov previously approved these changes Oct 7, 2024
Copy link
Member

@QuantumExplorer QuantumExplorer left a comment

Choose a reason for hiding this comment

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

We should always specify the patch version in dependencies.

QuantumExplorer
QuantumExplorer previously approved these changes Oct 7, 2024
@lklimek lklimek dismissed stale reviews from QuantumExplorer and shumkov via 610f588 October 7, 2024 09:36
Copy link
Contributor

@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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between f132a7e and 610f588.

📒 Files selected for processing (2)
  • .devcontainer/Dockerfile (1 hunks)
  • README.md (1 hunks)
🧰 Additional context used
🔇 Additional comments (4)
.devcontainer/Dockerfile (3)

32-35: Approved: Improved protoc installation process.

The updated protoc installation process is an improvement over the previous version. It now uses the PROTOC_VERSION variable, making it more flexible and easier to update in the future. The installation command has been simplified and streamlined, which is a good practice in Dockerfile management.


26-31: Approved: Enhanced protoc installation with architecture support.

The updated protoc installation process in the main RUN command is a significant improvement:

  1. It now supports multiple architectures (arm64 and x86_64) dynamically.
  2. The use of PROTOC_VERSION ensures consistency with the ARG declaration.
  3. The installation process is more streamlined and includes proper cleanup.

These changes make the Dockerfile more robust and maintainable.


24-24: Approved: PROTOC_VERSION update, but verify compatibility.

The Protocol Buffers compiler version has been updated from 25.2 to 27.3. This is generally a good practice to keep dependencies up-to-date. However, it's important to ensure that this update is compatible with the project and doesn't introduce any breaking changes.

To verify the compatibility of the new protoc version with the project, please run the following script:

This script will attempt to compile all .proto files in the project and search for protobuf-related code, which might help identify any potential compatibility issues.

README.md (1)

57-57: LGTM. Verify compatibility with the updated protoc version.

The update of the protobuf compiler (protoc) version from v25.2+ to v27.3+ in the prerequisites is consistent with the PR's objective of updating dependencies. This change should improve the build process or resolve compatibility issues.

To ensure this update doesn't introduce any unforeseen issues, please run the following verification steps:

This script will verify that the installed protoc version meets the new requirement and that the project builds successfully with this version.

.devcontainer/Dockerfile Show resolved Hide resolved
@shumkov shumkov merged commit 3f7a3b9 into v1.4-dev Oct 7, 2024
86 checks passed
@shumkov shumkov deleted the build/update-deps-tokio-tonic-prost branch October 7, 2024 11:34
@shumkov shumkov changed the title build: update dependences chore: update dependences Oct 7, 2024
@thephez thephez added this to the v1.4.0 milestone Oct 30, 2024
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.

4 participants