Skip to content

2025 05 06 codegen#324

Merged
thedavidmeister merged 6 commits intomainfrom
2025-05-06-codegen
May 6, 2025
Merged

2025 05 06 codegen#324
thedavidmeister merged 6 commits intomainfrom
2025-05-06-codegen

Conversation

@thedavidmeister
Copy link
Copy Markdown
Contributor

@thedavidmeister thedavidmeister commented May 6, 2025

Motivation

Solution

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
    • Removed an external dependency from the project. No user-facing features or functionality are affected.
    • Updated configuration to reflect changes in project structure.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2025

"""

Walkthrough

The changes remove the lib/rain.sol.codegen submodule by deleting its entry in .gitmodules and removing the submodule directory reference. The remapping path for rain.sol.codegen in foundry.toml was updated to nest it under lib/rain.interpreter.interface. Additionally, the subproject commit reference for lib/rain.interpreter.interface was updated. Several import paths for LibGenParseMeta were changed accordingly in scripts and test files. No public or exported entities were changed.

Changes

Files / Paths Change Summary
.gitmodules Removed the submodule entry for lib/rain.sol.codegen.
lib/rain.sol.codegen Deleted the entire submodule directory/reference for rain.sol.codegen.
foundry.toml Updated remapping path for rain.sol.codegen from lib/rain.sol.codegen/src/ to lib/rain.interpreter.interface/lib/rain.sol.codegen/src/.
lib/rain.interpreter.interface Updated subproject commit reference from 7c36c664d1bc9c48735367e893b125f3950bd7fe to 4ccc600027fb760a7e6d40d1a1c23acff3625e1f.
script/BuildPointers.sol Added import of LibGenParseMeta; replaced calls from LibCodeGen.parseMetaConstantString to LibGenParseMeta.parseMetaConstantString.
test/abstract/RainterpreterExpressionDeployerDeploymentTest.sol, test/lib/parse/LibMetaFixture.sol, test/src/concrete/RainterpreterParser.pointers.t.sol, test/src/concrete/RainterpreterReferenceExtern.pointers.t.sol, test/src/lib/parse/LibParse.namedLHS.t.sol, test/src/lib/parse/LibParse.singleRHSNamed.gas.t.sol Changed import paths for LibGenParseMeta from rain.sol.codegen/lib/LibGenParseMeta.sol to rain.interpreter.interface/lib/codegen/LibGenParseMeta.sol.

Sequence Diagram(s)

No sequence diagram is generated as the changes are limited to submodule removal, commit reference update, import path changes, and configuration updates without affecting control flow or adding new features.
"""

Possibly related PRs

  • bump int #319: Updates the subproject commit reference for lib/rain.interpreter.interface, related to dependency versioning.
  • bump int #323: Updates the subproject commit reference for lib/rain.interpreter.interface from an earlier commit to the one preceding this PR’s update, showing sequential commit updates.

📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3aae558 and 9c46f97.

⛔ Files ignored due to path filters (5)
  • src/generated/Rainterpreter.pointers.sol is excluded by !**/generated/**
  • src/generated/RainterpreterExpressionDeployer.pointers.sol is excluded by !**/generated/**
  • src/generated/RainterpreterParser.pointers.sol is excluded by !**/generated/**
  • src/generated/RainterpreterReferenceExtern.pointers.sol is excluded by !**/generated/**
  • src/generated/RainterpreterStore.pointers.sol is excluded by !**/generated/**
📒 Files selected for processing (7)
  • script/BuildPointers.sol (3 hunks)
  • test/abstract/RainterpreterExpressionDeployerDeploymentTest.sol (1 hunks)
  • test/lib/parse/LibMetaFixture.sol (1 hunks)
  • test/src/concrete/RainterpreterParser.pointers.t.sol (1 hunks)
  • test/src/concrete/RainterpreterReferenceExtern.pointers.t.sol (1 hunks)
  • test/src/lib/parse/LibParse.namedLHS.t.sol (1 hunks)
  • test/src/lib/parse/LibParse.singleRHSNamed.gas.t.sol (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: rainix (macos-latest, rainix-rs-artifacts)
  • GitHub Check: rainix (ubuntu-latest, rainix-rs-static)
  • GitHub Check: rainix (ubuntu-latest, test-wasm-build)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-test)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-artifacts)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-static)
  • GitHub Check: rainix (ubuntu-latest, rainix-rs-test)
  • GitHub Check: rainix (ubuntu-latest, rainix-rs-artifacts)
  • GitHub Check: rainix (macos-latest, rainix-rs-test)
  • GitHub Check: git-clean
🔇 Additional comments (9)
test/src/lib/parse/LibParse.singleRHSNamed.gas.t.sol (1)

13-13: Consistent update of LibGenParseMeta import path
The import path has been correctly updated to point at rain.interpreter.interface/lib/codegen/LibGenParseMeta.sol following the removal of the old submodule. Ensure that the corresponding remapping in foundry.toml has been adjusted to match this new layout and that no lingering references to the old rain.sol.codegen path remain.

test/lib/parse/LibMetaFixture.sol (1)

11-11: Correct relocation of LibGenParseMeta import
The import has been updated to the new rain.interpreter.interface/lib/codegen location. This aligns with the submodule removal and maintains consistency across test fixtures.

test/src/lib/parse/LibParse.namedLHS.t.sol (1)

17-17: Updated LibGenParseMeta import to new codegen path
This change aligns the test contract with the relocated codegen library. Please confirm that all usages of LibGenParseMeta in other contracts and scripts reflect the same path.

test/abstract/RainterpreterExpressionDeployerDeploymentTest.sol (1)

24-24: Align LibGenParseMeta import with new interface package
Import path now correctly points to rain.interpreter.interface/lib/codegen. Verify that the build scripts and remappings reflect this update to avoid compilation errors.

test/src/concrete/RainterpreterReferenceExtern.pointers.t.sol (1)

17-17: Import path for LibGenParseMeta updated to nested interface location
The change matches the refactored package structure. Double-check that Foundry remappings and any scripts invoking codegen functions have been updated in unison.

test/src/concrete/RainterpreterParser.pointers.t.sol (1)

14-14: Import path updated to reflect codegen relocation
The LibGenParseMeta import path has been correctly updated to "rain.interpreter.interface/lib/codegen/LibGenParseMeta.sol", aligning with the new project structure after removing the rain.sol.codegen submodule.

script/BuildPointers.sol (3)

19-19: Add LibGenParseMeta import for codegen operations
Importing LibGenParseMeta from the new rain.interpreter.interface location is correct. Retaining the LibCodeGen import for other utilities is appropriate.


45-45: Use LibGenParseMeta.parseMetaConstantString for parser pointers
Switching this call from LibCodeGen to LibGenParseMeta.parseMetaConstantString aligns with the submodule removal. Confirm that PARSE_META_BUILD_DEPTH is correctly passed.


86-86: Apply LibGenParseMeta in reference extern pointers
Replacing the old LibCodeGen.parseMetaConstantString usage here maintains consistency across pointer-building functions.


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

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.

Copy link
Copy Markdown
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: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c97b237 and d4d31ff.

📒 Files selected for processing (1)
  • foundry.toml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: rainix (ubuntu-latest, rainix-rs-static)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-test)
  • GitHub Check: rainix (ubuntu-latest, test-wasm-build)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-artifacts)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-static)
  • GitHub Check: rainix (ubuntu-latest, rainix-rs-test)
  • GitHub Check: rainix (ubuntu-latest, rainix-rs-artifacts)
  • GitHub Check: git-clean

Comment thread foundry.toml
Copy link
Copy Markdown
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: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d4d31ff and 3aae558.

📒 Files selected for processing (1)
  • lib/rain.interpreter.interface (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-test)
  • GitHub Check: rainix (ubuntu-latest, rainix-rs-test)
  • GitHub Check: rainix (ubuntu-latest, test-wasm-build)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-artifacts)
  • GitHub Check: git-clean
  • GitHub Check: rainix (macos-latest, rainix-rs-artifacts)
  • GitHub Check: rainix (ubuntu-latest, rainix-rs-artifacts)
  • GitHub Check: rainix (ubuntu-latest, rainix-rs-static)
  • GitHub Check: rainix (ubuntu-latest, rainix-sol-static)
  • GitHub Check: rainix (macos-latest, rainix-rs-test)

@@ -1 +1 @@
Subproject commit 7c36c664d1bc9c48735367e893b125f3950bd7fe
Subproject commit 4ccc600027fb760a7e6d40d1a1c23acff3625e1f
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

❓ Verification inconclusive

Confirm submodule commit reference update

The rain.interpreter.interface subproject commit hash has been bumped to
4ccc600027fb760a7e6d40d1a1c23acff3625e1f. Ensure this commit exists in the remote repo and that your CI/build steps correctly initialize the updated submodule.

To verify the commit, you can run:


🏁 Script executed:

#!/bin/bash
# Verify the updated commit exists in the remote repository
url=$(git config --file .gitmodules --get submodule.lib/rain.interpreter.interface.url)
commit="4ccc600027fb760a7e6d40d1a1c23acff3625e1f"
if git ls-remote "$url" "$commit" | grep -q "$commit"; then
  echo "Commit $commit exists in $url"
else
  echo "ERROR: Commit $commit not found in $url" >&2
  exit 1
fi

Length of output: 637


Submodule commit reference not found

I ran the provided verification script against https://github.com/rainlanguage/rain.interpreter.interface and got:

ERROR: Commit 4ccc600027fb760a7e6d40d1a1c23acff3625e1f not found in https://github.com/rainlanguage/rain.interpreter.interface

Please address the following:

  • Verify that the intended commit (4ccc600027fb760a7e6d40d1a1c23acff3625e1f) has been pushed to the remote submodule repo.
  • If the commit is missing, either push it upstream or update the submodule reference in .gitmodules (and in lib/rain.interpreter.interface) to a valid commit.
  • Ensure your CI/build pipeline runs git submodule update --init --recursive (or equivalent) so the updated hash is fetched.

@thedavidmeister thedavidmeister merged commit 7cbbfa2 into main May 6, 2025
9 of 11 checks passed
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