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

Fix/kleros app resolution #1833

Merged
merged 6 commits into from
Jan 14, 2025
Merged

Fix/kleros app resolution #1833

merged 6 commits into from
Jan 14, 2025

Conversation

Harman-singh-waraich
Copy link
Contributor

@Harman-singh-waraich Harman-singh-waraich commented Jan 14, 2025

PR-Codex overview

This PR focuses on updating package dependencies, particularly the wagmi package version, and refining the GitHub workflows for setting up the development environment.

Detailed summary

  • Deleted .github/workflows/pr-labels.yml.
  • Updated wagmi version from ^2.13.0 to ^2.13.5 in multiple package.json files.
  • Changed @kleros/kleros-app dependency from ^2.0.2 to workspace:^.
  • Added new build scripts for web and web-devtools in package.json.
  • Modified GitHub Actions workflow to set up Node.js with version 20.x and enabled corepack for Yarn.
  • Adjusted installation command for @kleros/kleros-v2-contracts to disable hardened mode temporarily.
  • Updated @metamask/sdk version from 0.30.1 to 0.31.1 in @wagmi/connectors.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • Dependencies

    • Updated wagmi package version to ^2.13.5 in kleros-app and web-devtools projects.
    • Added new dependency @kleros/kleros-v2-contracts in web-devtools.
    • Changed @kleros/kleros-app dependency in the web project to use workspace reference.
  • Build Configuration

    • Updated Netlify build command to yarn build:web:ci for streamlined builds.
    • Added new build scripts for @kleros/kleros-v2-web and @kleros/kleros-v2-web-devtools.

Copy link
Contributor

coderabbitai bot commented Jan 14, 2025

Warning

Rate limit exceeded

@jaybuidl has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 40 seconds before requesting another review.

⌛ How to resolve this issue?

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

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

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

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

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 2409603 and 1582b52.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • .github/workflows/contracts-testing.yml (2 hunks)
  • .github/workflows/pr-labels.yml (0 hunks)
  • package.json (1 hunks)
  • web-devtools/package.json (2 hunks)

Walkthrough

This pull request involves updates to dependency versions and build configurations across multiple packages in the Kleros project. The changes include updating the wagmi package version to ^2.13.5 in both kleros-app and web-devtools package.json files, modifying the web/package.json to use a workspace reference for @kleros/kleros-app, and updating the web/netlify.toml to include a comprehensive build command for Yarn workspaces. Additionally, new build scripts were added to the main package.json.

Changes

File Change Summary
kleros-app/package.json Updated wagmi peer dependency from ^2.13.0 to ^2.13.5
web-devtools/package.json Added new dependency @kleros/kleros-v2-contracts and updated wagmi from ^2.13.0 to ^2.13.5
web/netlify.toml Added new build command for Yarn workspace installation and build
web/package.json Changed @kleros/kleros-app dependency from ^2.0.2 to workspace:^
package.json Added new scripts: build:web:ci and build:web-devtools:ci

Possibly related PRs

Suggested Labels

Type: Maintenance :construction:, Type: Toolchain ⚒️, dependencies

Suggested Reviewers

  • alcercu

Poem

🐰 Hop, hop, dependencies dance!
Wagmi versions take their stance
Netlify builds with graceful might
Workspaces aligned, future bright
Code evolves with rabbit's delight! 🚀


🪧 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 or @coderabbitai title 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

netlify bot commented Jan 14, 2025

Deploy Preview for kleros-v2-university ready!

Name Link
🔨 Latest commit 1582b52
🔍 Latest deploy log https://app.netlify.com/sites/kleros-v2-university/deploys/6786966b450a2d000802c11c
😎 Deploy Preview https://deploy-preview-1833--kleros-v2-university.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 14, 2025

Deploy Preview for kleros-v2-testnet ready!

Name Link
🔨 Latest commit db895fb
🔍 Latest deploy log https://app.netlify.com/sites/kleros-v2-testnet/deploys/67866d8c6247560008fe08c3
😎 Deploy Preview https://deploy-preview-1833--kleros-v2-testnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 14, 2025

Deploy Preview for kleros-v2-testnet-devtools failed. Why did it fail? →

Name Link
🔨 Latest commit 1582b52
🔍 Latest deploy log https://app.netlify.com/sites/kleros-v2-testnet-devtools/deploys/6786966bd4881d00086f519c

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

🧹 Nitpick comments (1)
web/netlify.toml (1)

9-10: Consider optimizing the build command for better efficiency.

The current sequential installation and build process could be optimized. Consider:

  1. Using yarn workspaces focus for efficient dependency installation
  2. Parallelizing builds where possible if there are no strict dependencies between workspaces

Example optimization:

-command = "yarn workspace @kleros/kleros-v2-contracts install && yarn workspace @kleros/kleros-app install &&  yarn workspace @kleros/kleros-v2-web install && yarn workspace @kleros/kleros-v2-contracts build && yarn workspace @kleros/kleros-app build && yarn workspace @kleros/kleros-v2-web build-netlify"
+command = "yarn workspaces focus --production && yarn workspace @kleros/kleros-v2-contracts build && yarn workspace @kleros/kleros-app build && yarn workspace @kleros/kleros-v2-web build-netlify"
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6f21310 and dbcad12.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • kleros-app/package.json (1 hunks)
  • web-devtools/package.json (1 hunks)
  • web/netlify.toml (1 hunks)
  • web/package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (18)
  • GitHub Check: Redirect rules - kleros-v2-testnet-devtools
  • GitHub Check: Header rules - kleros-v2-testnet-devtools
  • GitHub Check: Pages changed - kleros-v2-testnet-devtools
  • GitHub Check: Redirect rules - kleros-v2-university
  • GitHub Check: Redirect rules - kleros-v2-testnet
  • GitHub Check: Redirect rules - kleros-v2-testnet
  • GitHub Check: Header rules - kleros-v2-university
  • GitHub Check: Header rules - kleros-v2-testnet
  • GitHub Check: Header rules - kleros-v2-testnet
  • GitHub Check: Pages changed - kleros-v2-university
  • GitHub Check: Pages changed - kleros-v2-testnet
  • GitHub Check: Pages changed - kleros-v2-testnet
  • GitHub Check: Copy labels from linked issues
  • GitHub Check: dependency-review
  • GitHub Check: Analyze (javascript)
  • GitHub Check: contracts-testing
  • GitHub Check: Copy labels from linked issues
  • GitHub Check: Mend Security Check
🔇 Additional comments (2)
kleros-app/package.json (1)

64-64: Verify wagmi version compatibility with peer dependencies.

The wagmi update to ^2.13.5 looks good, but let's verify compatibility with other peer dependencies, particularly viem ^2.21.42.

✅ Verification successful

Wagmi v2.13.5 update is compatible with all peer dependencies

All peer dependency version requirements are satisfied:

  • viem ^2.21.42 (requires 2.x)
  • react ^18.3.1 (requires >=18)
  • @tanstack/react-query ^5.59.20 (requires >=5.0.0)
  • typescript ^5.6.3 (requires >=5.0.4)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check compatibility between wagmi and its peer dependencies
# Get wagmi's peer dependencies and their version requirements

echo "Checking wagmi peer dependencies..."
curl -s "https://registry.npmjs.org/wagmi/2.13.5" | jq -r '.peerDependencies'

echo "Checking if current viem version satisfies wagmi's requirements..."
curl -s "https://registry.npmjs.org/viem/2.21.42" | jq -r '.version'

Length of output: 481


Script:

#!/bin/bash
# Check versions of other peer dependencies in package.json
echo "Checking package.json dependencies..."
cat kleros-app/package.json | jq '.dependencies["react"], .dependencies["@tanstack/react-query"], .devDependencies["typescript"]'

Length of output: 235


Script:

#!/bin/bash
# Check peer dependencies in package.json
echo "Checking package.json peerDependencies..."
cat kleros-app/package.json | jq '.peerDependencies'

Length of output: 334

web-devtools/package.json (1)

68-68: Verify alignment of wagmi-related package versions.

The wagmi update to ^2.13.5 is consistent with kleros-app. Let's verify compatibility with @wagmi/cli and @wagmi/core.

✅ Verification successful

✓ Wagmi package versions are properly aligned

The update to wagmi ^2.13.5 is compatible with all related packages in web-devtools:

  • All wagmi-related packages are on major version 2.x
  • @wagmi/core ^2.15.0 and @wagmi/cli ^2.1.18 are compatible with wagmi ^2.13.5
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check version alignment between wagmi and related packages

echo "Checking @wagmi/cli recommended wagmi version..."
curl -s "https://registry.npmjs.org/@wagmi/cli/2.1.18" | jq -r '.peerDependencies.wagmi'

echo "Checking @wagmi/core version compatibility..."
curl -s "https://registry.npmjs.org/@wagmi/core/2.15.0" | jq -r '.peerDependencies.wagmi'

Length of output: 392


Script:

#!/bin/bash
# Search for wagmi-related packages in all package.json files
echo "=== Searching for wagmi packages in package.json files ==="
fd package.json --type f --exec sh -c 'echo "=== $1 ==="; cat "$1" | jq -r "(.dependencies,.devDependencies) | with_entries(select(.key | contains(\"wagmi\"))) // {}"' _ {}

echo -e "\n=== Searching for wagmi version constraints in documentation or configuration files ==="
rg -i "wagmi.*version|version.*wagmi" --type-add 'docs:*.{md,txt}' -tdocs

Length of output: 9132


Script:

#!/bin/bash
echo "=== web-devtools/package.json wagmi packages ==="
cat web-devtools/package.json | jq '{dependencies: .dependencies | with_entries(select(.key | contains("wagmi"))), devDependencies: .devDependencies | with_entries(select(.key | contains("wagmi")))}'

echo -e "\n=== kleros-app/package.json wagmi packages ==="
cat kleros-app/package.json | jq '{dependencies: .dependencies | with_entries(select(.key | contains("wagmi"))), devDependencies: .devDependencies | with_entries(select(.key | contains("wagmi")))}'

Length of output: 873

web/package.json Show resolved Hide resolved
Copy link

netlify bot commented Jan 14, 2025

Deploy Preview for kleros-v2-neo ready!

Name Link
🔨 Latest commit 1582b52
🔍 Latest deploy log https://app.netlify.com/sites/kleros-v2-neo/deploys/6786966bcd6975000881929a
😎 Deploy Preview https://deploy-preview-1833--kleros-v2-neo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 14, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 14, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 14, 2025
@jaybuidl jaybuidl added Type: Bug 🐛 Type: Toolchain ⚒️ Build tools configuration, CI/CD labels Jan 14, 2025
jaybuidl
jaybuidl previously approved these changes Jan 14, 2025
@jaybuidl jaybuidl dismissed stale reviews from coderabbitai[bot] and themself via b371250 January 14, 2025 16:49
@jaybuidl jaybuidl force-pushed the fix/kleros-app-resolution branch from b371250 to e7faa21 Compare January 14, 2025 16:50
Copy link

codeclimate bot commented Jan 14, 2025

Code Climate has analyzed commit 1582b52 and detected 0 issues on this pull request.

View more on Code Climate.

@jaybuidl jaybuidl merged commit 1de725b into dev Jan 14, 2025
18 of 22 checks passed
@jaybuidl jaybuidl deleted the fix/kleros-app-resolution branch January 14, 2025 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 Type: Toolchain ⚒️ Build tools configuration, CI/CD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants