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(verifier): extract dependencies into workspace #1232

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

rimrakhimov
Copy link
Member

@rimrakhimov rimrakhimov commented Feb 6, 2025

Summary by CodeRabbit

  • Chores
    • Consolidated dependency management by transitioning from fixed versioning to a centralized workspace configuration.
    • Integrated new external libraries across multiple modules to enhance overall system stability and maintainability.
    • Streamlined internal setups to facilitate smoother future development and ensure consistency throughout the project.

Copy link
Contributor

coderabbitai bot commented Feb 6, 2025

Walkthrough

This pull request updates several Cargo.toml files within the smart-contract-verifier workspace. Notably, it introduces a new workspace member and adds multiple dependencies to the workspace configuration. The modifications convert explicit path and version declarations across multiple packages—including sig-provider-extension, smart-contract-verifier-proto, smart-contract-verifier-server, and smart-contract-verifier—to use the { workspace = true } syntax. This shift unifies the dependency management approach across the workspace, replacing fixed version numbers or direct paths with centralized references. Additional dependencies are also declared with specific version requirements or Git repository references in the root configuration.

Possibly related PRs

Poem

Hi there, I'm a rabbit with a skip so bright,
Hopping through workspaces, setting dependencies light.
No more fixed versions—everything's aligned and true,
Each dependency now dances in a workspace view.
With a twitch of my nose and a joyful little cheer,
I celebrate the changes that now bring our code near!
🥕 Hop on, fellow coders—workspace magic is here!

Tip

🌐 Web search-backed reviews and chat
  • We have enabled web search-based reviews and chat for all users. This feature allows CodeRabbit to access the latest documentation and information on the web.
  • You can disable this feature by setting web_search: false in the knowledge_base settings.
  • Please share any feedback in the Discord discussion.

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.

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: 0

🧹 Nitpick comments (2)
smart-contract-verifier/sig-provider-extension/Cargo.toml (1)

7-15: Consistent Workspace Dependency Usage

All dependencies in the [dependencies] section have been updated to use the workspace = true directive. This helps centralize and standardize version management across the workspace. Please ensure that the workspace root provides the necessary version definitions for these dependencies so that package resolution remains consistent.

smart-contract-verifier/smart-contract-verifier/Cargo.toml (1)

10-48: Unified Main Dependencies Configuration

The main dependencies have been transitioned entirely to workspace references. This simplifies management by deferring version information to the workspace’s central configuration. Verify that the centralized versions meet all compatibility requirements across various packages.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b1bdb48 and 3ea2d5a.

⛔ Files ignored due to path filters (1)
  • smart-contract-verifier/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • smart-contract-verifier/Cargo.toml (1 hunks)
  • smart-contract-verifier/sig-provider-extension/Cargo.toml (1 hunks)
  • smart-contract-verifier/smart-contract-verifier-proto/Cargo.toml (2 hunks)
  • smart-contract-verifier/smart-contract-verifier-server/Cargo.toml (1 hunks)
  • smart-contract-verifier/smart-contract-verifier/Cargo.toml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Linting / lint
  • GitHub Check: Unit, doc and integration tests
🔇 Additional comments (13)
smart-contract-verifier/smart-contract-verifier-proto/Cargo.toml (5)

9-16: Unified Workspace Dependencies for Main Dependencies

The dependencies block for core libraries (e.g., actix-prost, actix-prost-macros, actix-web, async-trait, prost, serde, serde_with, and tonic) now uniformly uses { workspace = true }. This change aligns well with the workspace strategy and ensures centralized dependency management.


18-25: Unified Configuration for Optional Dependencies

The optional dependencies (anyhow, mockall, reqwest, reqwest-middleware, reqwest-retry, thiserror, tokio, and url) have been updated to use { workspace = true, optional = true }. This approach maintains consistency and makes these dependencies available on an opt-in basis.


28-30: Standardizing Build Dependencies with Workspace Attributes

The build dependencies (actix-prost-build, prost-build, and tonic-build) now use { workspace = true }. This update standardizes the dependency management across both the regular and build dependency sections.


33-34: Dev Dependencies Aligned to Workspace Configuration

The dev-dependencies section correctly reflects the workspace configuration for smart-contract-verifier-proto (with additional features) and tokio. These updates improve consistency and simplify dependency tracking for development and testing purposes.


37-48: Feature Flags: Verification and Consistency

The [features] section defines feature groups for http-client and mock effectively by referencing the necessary dependent features. Please verify that downstream consumers are aware of and compatible with these workspace-based dependency resolutions.

smart-contract-verifier/smart-contract-verifier/Cargo.toml (1)

53-61: Consistent Transition for Dev Dependencies

All development dependencies have been updated to use the workspace configuration. Confirm that test and development builds still resolve these dependencies correctly and that any special features (e.g. for quick-xml or tokio) remain fully supported.

smart-contract-verifier/Cargo.toml (2)

3-8: Updated Workspace Members List

The workspace members now include "sig-provider-extension" alongside "smart-contract-verifier", "smart-contract-verifier-proto", and "smart-contract-verifier-server". This update ensures that all related projects are part of the centralized workspace, facilitating unified dependency resolution and project builds.


10-77: Centralized Dependency Management

The [workspace.dependencies] section now centrally defines all dependencies—with a mix of direct path references, Git sources, and explicit version numbers. This is a significant enhancement for maintainability. Please review the version constraints (e.g., for alloy-dyn-abi, async-trait, and third-party libraries) to ensure they align with the requirements of all workspace members. A careful check will help avoid any unexpected version conflicts across packages.

smart-contract-verifier/smart-contract-verifier-server/Cargo.toml (5)

9-11: Centralizing Core Dependencies via Workspace

The dependencies for sig-provider-extension, smart-contract-verifier, and smart-contract-verifier-proto have been updated to use { workspace = true } (with sig-provider-extension additionally marked as optional). This centralizes dependency version management across the workspace and helps avoid version mismatches between interdependent crates.


13-16: Unified Dependency Declaration for Web Framework and Utility Crates

The changes on lines 13-16 convert dependencies like actix-web, amplify, anyhow, and async-trait to use workspace declarations. This reinforces consistency by delegating version management to the workspace configuration. Ensure that the workspace’s versions meet the package’s specific needs.


19-28: Consistent Workspace Adoption for Core Libraries

For dependencies spanning from bytes to prometheus, the configuration now uses { workspace = true }. This change ensures that libraries such as config, cron, ethers-core, ethers-solc, and others are managed uniformly. Verify that the workspace-level versions are compatible with this crate’s requirements.


29-38: Standardizing Common Serialization and Async Libraries

The modifications in lines 29-38 update dependencies for crates like rust-s3, serde, serde_json, serde_with, thiserror, tokio, tonic, tracing, url, and uuid to their workspace-based equivalents (with additional features where necessary). This is an effective move to reduce duplication of dependency versions across multiple packages.


43-49: Harmonizing Development Dependencies Using Workspace

The dev-dependencies (ethabi, ethers-solc with features, pretty_assertions, reqwest, rstest, stdext, and tempfile) are now declared with { workspace = true }. This aligns the test and development environment dependencies with the workspace approach, simplifying dependency updates and maintenance.

@rimrakhimov rimrakhimov merged commit 21543d2 into main Feb 6, 2025
5 checks passed
@rimrakhimov rimrakhimov deleted the rimrakhimov/verifier/workspace-dependencies branch February 6, 2025 08:17
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.

1 participant