Skip to content

Conversation

@0xgleb
Copy link
Contributor

@0xgleb 0xgleb commented May 21, 2025

Motivation

We need the latest version of Rust to use the latest version of Alloy

Solution

Bump up nixpkgs (to make the latest version of Rust available) and switch to the latest version of Rust

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

Summary by CodeRabbit

  • Chores
    • Disabled a caching step in continuous integration workflows.
    • Removed an unused submodule reference.
    • Recommended the "jnoortheen.nix-ide" extension for Visual Studio Code.
    • Updated configuration to include the .vscode directory in license annotations.
    • Upgraded the Rust toolchain version from 1.79.0 to 1.87.0.
    • Improved formatting and readability in configuration files without changing functionality.

@0xgleb 0xgleb self-assigned this May 21, 2025
@coderabbitai
Copy link

coderabbitai bot commented May 21, 2025

Warning

Rate limit exceeded

@thedavidmeister has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 21 minutes and 19 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 4e87c16 and bcaab21.

📒 Files selected for processing (2)
  • .github/workflows/check-shell.yml (1 hunks)
  • .github/workflows/test.yml (1 hunks)

Walkthrough

This change updates the Rust toolchain version in flake.nix, reformats Nix expressions for readability, and simplifies package exports. It also disables a caching action in GitHub workflows, removes a submodule from .gitmodules, adds a VS Code extension recommendation, and updates REUSE.toml to include .vscode in annotation paths.

Changes

File(s) Change Summary
.github/workflows/check-shell.yml,
.github/workflows/test.yml
Commented out DeterminateSystems/magic-nix-cache-action@v2 step, disabling this caching action in CI.
.gitmodules Removed the submodule entry for example/sol/lib/forge-std.
.vscode/extensions.json Added with a recommendation for the jnoortheen.nix-ide VS Code extension.
REUSE.toml Added .vscode/**/ to annotation paths under [[annotations]].
flake.nix Updated Rust version to 1.87.0, reformatted expressions, simplified package exports, and improved readability.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHub Actions
    participant CachingAction

    Developer->>GitHub Actions: Push code / open PR
    GitHub Actions--x CachingAction: (Step commented out, no invocation)
    GitHub Actions->>Developer: Run remaining workflow steps
Loading

Possibly related PRs

  • rainlanguage/rainix#82: Updates Rust version and reformats flake.nix, related through modifications to the Rust toolchain and Nix configuration.

Suggested reviewers

  • thedavidmeister

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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.

@0xgleb 0xgleb linked an issue May 21, 2025 that may be closed by this pull request

- uses: DeterminateSystems/nix-installer-action@v4
- uses: DeterminateSystems/magic-nix-cache-action@v2
# - uses: DeterminateSystems/magic-nix-cache-action@v2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is supposed to be switched to flakehub-cache-action as magic-nix-cache-action is deprecated

@0xgleb 0xgleb requested review from hardyjosh and rouzwelt May 26, 2025 17:18
@0xgleb 0xgleb marked this pull request as ready for review May 26, 2025 17:18
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🔭 Outside diff range comments (1)
flake.nix (1)

382-388: 🧹 Nitpick (assertive)

Remove unused tauri-libraries binding
The tauri-libraries list is declared but never used in the tauri-shell devShell. Consider removing this binding to reduce unused code and avoid confusion:

-          # NOTE: this binding is unused
-          tauri-libraries = [
-            pkgs.gtk3
-            pkgs.cairo
-            pkgs.gdk-pixbuf
-            pkgs.glib
-            pkgs.dbus
-            pkgs.openssl_3
-            pkgs.librsvg
-            pkgs.gettext
-            pkgs.libiconv
-          ] ++ (pkgs.lib.optionals (!pkgs.stdenv.isDarwin) [
-            # This is probably needed but is marked as broken in nixpkgs
-            pkgs.webkitgtk
-          ]);
♻️ Duplicate comments (2)
.github/workflows/test.yml (1)

34-34: Deprecated cache action is commented out
The DeterminateSystems/magic-nix-cache-action@v2 step has been disabled. If build caching is still desired, please replace it with the recommended flakehub-cache-action or another up-to-date caching solution as per the deprecation notice.

.github/workflows/check-shell.yml (1)

21-21: Deprecated cache action is commented out
The DeterminateSystems/magic-nix-cache-action@v2 step has been disabled. If caching is needed here, switch to the supported flakehub-cache-action or an equivalent up-to-date action.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6ce0d46 and 4e87c16.

⛔ Files ignored due to path filters (1)
  • flake.lock is excluded by !**/*.lock
📒 Files selected for processing (6)
  • .github/workflows/check-shell.yml (1 hunks)
  • .github/workflows/test.yml (1 hunks)
  • .gitmodules (0 hunks)
  • .vscode/extensions.json (1 hunks)
  • REUSE.toml (1 hunks)
  • flake.nix (10 hunks)
💤 Files with no reviewable changes (1)
  • .gitmodules
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/check-shell.yml

[error] 9-9: wrong indentation: expected 10 but found 12

(indentation)


[error] 11-11: wrong indentation: expected 10 but found 12

(indentation)


[error] 13-13: wrong indentation: expected 10 but found 12

(indentation)


[error] 14-14: wrong indentation: expected 8 but found 10

(indentation)

🔇 Additional comments (4)
.vscode/extensions.json (1)

1-5: Add VS Code Nix IDE recommendation
Including "jnoortheen.nix-ide" will help contributors get Nix language support in VS Code and aligns well with the project’s Nix-based workflows.

REUSE.toml (1)

10-11: Extend REUSE annotations to .vscode directory
Adding ".vscode/**/" alongside ".github/**/" ensures that compliance metadata also covers the new VS Code configuration files.

flake.nix (2)

18-23: Verify Rust version bump and update flake.lock
The toolchain has been upgraded to Rust "1.87.0". Please ensure that pkgs.rust-bin.stable."1.87.0" is available, then run:

nix flake update --update-input rust-overlay

(and any other updated inputs) to regenerate flake.lock. Committing the updated lock file will prevent version drift.


361-365: Simplify packages export with inherit
Using inherit for the rainix-sol-*, rainix-rs-*, and tauri-release-env attributes reduces boilerplate and aligns with Nix best practices.

Comment on lines +9 to +14
ubuntu-latest,
# intel mac
macos-13,
# apple silicon
macos-latest,
]
Copy link

@coderabbitai coderabbitai bot May 26, 2025

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix indentation for YAML compliance
The entries in the os matrix are misaligned, causing YAMLlint errors. Align the list items under os: [ by reducing two spaces of indentation so they start directly under the bracket. For example:

 matrix:
-       os: [
-             ubuntu-latest,
-             # intel mac
-             macos-13,
-             # apple silicon
-             macos-latest,
-           ]
+      os: [
+        ubuntu-latest,
+        # intel mac
+        macos-13,
+        # apple silicon
+        macos-latest,
+      ]

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 9-9: wrong indentation: expected 10 but found 12

(indentation)


[error] 11-11: wrong indentation: expected 10 but found 12

(indentation)


[error] 13-13: wrong indentation: expected 10 but found 12

(indentation)


[error] 14-14: wrong indentation: expected 8 but found 10

(indentation)

🤖 Prompt for AI Agents
In .github/workflows/check-shell.yml around lines 9 to 14, the list items under
the os matrix are indented incorrectly, causing YAMLlint errors. Fix this by
reducing the indentation of each list item by two spaces so they align directly
under the opening bracket of the os array, ensuring proper YAML syntax and
compliance.

Copy link
Contributor Author

@0xgleb 0xgleb May 26, 2025

Choose a reason for hiding this comment

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

this was auto-formatted and shouldn't be an issue unless humans say it is

Copy link

Choose a reason for hiding this comment

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

@0xgleb, I understand your perspective on auto-formatted code. You're right that if the YAML is functionally correct and was produced by an auto-formatter, these indentation warnings may be more pedantic than practical.

If the YAMLlint errors become problematic in your CI pipeline, you could consider:

  • Configuring YAMLlint to be less strict about indentation
  • Ensuring your auto-formatter and linter are aligned in their formatting preferences
  • Adding a .yamllint.yml config to ignore specific indentation rules

For now, I'll note your preference about auto-formatted code for future reviews.

  /|   /|   
 ( ._. )
o_(")(")

Thoughtfully notes your formatting preferences


✏️ Learnings added
Learnt from: 0xgleb
PR: rainlanguage/rainix#84
File: .github/workflows/check-shell.yml:9-14
Timestamp: 2025-05-26T18:06:48.993Z
Learning: The user 0xgleb prefers not to flag formatting issues in auto-formatted code (like YAML files) unless they cause actual functional problems or humans specifically complain about them. Auto-formatter output should generally be accepted even if it doesn't perfectly align with linting rules.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@thedavidmeister thedavidmeister merged commit a1a5c32 into main May 27, 2025
12 of 13 checks passed
@0xgleb 0xgleb deleted the feat/rust-upd branch May 28, 2025 17:40
@coderabbitai coderabbitai bot mentioned this pull request Oct 16, 2025
4 tasks
@coderabbitai coderabbitai bot mentioned this pull request Dec 9, 2025
4 tasks
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.

Bump up Rust version in rainix

3 participants