Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
79bafe7
upgrade configs with no regard for build
0xgleb Jun 5, 2025
10e2d7e
fix build for default target
0xgleb Jun 5, 2025
89c5670
fix the build for wasm
0xgleb Jun 5, 2025
06003f8
configure ci concurrency
0xgleb Jun 5, 2025
efeb80c
make tests compile
0xgleb Jun 5, 2025
2c2564a
fix mock
0xgleb Jun 6, 2025
b7b9203
rm redundant conversions
0xgleb Jun 6, 2025
fadbdfe
nix switch
0xgleb Jun 6, 2025
b5cc233
switch flake input to main rainix
0xgleb Jun 7, 2025
7c355bc
set editor solidity compiler version
0xgleb Jun 7, 2025
862d28b
update test generated value boundaries
0xgleb Jun 7, 2025
2c1d71d
add explainer comment
0xgleb Jun 7, 2025
66d25ef
address ai feedback
0xgleb Jun 7, 2025
ab9288e
update rain.metadata submodule
0xgleb Jun 7, 2025
6a29dc9
init
rouzwelt Jun 6, 2025
ffd2c54
Update TestERC20.sol
rouzwelt Jun 6, 2025
4359b73
Update TestERC20.sol
rouzwelt Jun 6, 2025
f1fa512
fmt
rouzwelt Jun 6, 2025
955a67a
Update eval.rs
rouzwelt Jun 6, 2025
051d98a
Update lib.rs
rouzwelt Jun 6, 2025
f17bb0a
fmt
rouzwelt Jun 6, 2025
3de0ef9
update
rouzwelt Jun 7, 2025
84b63e0
update
rouzwelt Jun 8, 2025
564b363
Update eval.rs
rouzwelt Jun 8, 2025
575bf64
Update eval.rs
rouzwelt Jun 8, 2025
c63e9e7
Update eval.rs
rouzwelt Jun 8, 2025
c960930
Update eval.rs
rouzwelt Jun 8, 2025
e96364d
Update eval.rs
rouzwelt Jun 8, 2025
b63c295
Update eval.rs
rouzwelt Jun 8, 2025
d3141a6
Update trace.rs
rouzwelt Jun 8, 2025
a2e6a4e
Merge pull request #335 from rainlanguage/2025-06-06-test-fixture-mai…
0xgleb Jun 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[target.wasm32-unknown-unknown]
# Required to make the rand feature of alloy work for wasm32-unknown-unknown
rustflags = ["--cfg", "getrandom_backend=\"wasm_js\""]
5 changes: 0 additions & 5 deletions .env.example

This file was deleted.

10 changes: 10 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
URL=https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc
HASH=sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM=
source_url "$URL" "$HASH"
fi

watch_file flake.lock
watch_file flake.nix

use flake . --verbose --show-trace
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot Jun 6, 2025

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Consider the trade-off of verbose output in development.

The --verbose --show-trace flags are helpful for debugging but might create noisy output during regular development. Consider if this level of verbosity is needed by default.

🤖 Prompt for AI Agents
In the .envrc file at line 10, the use of `--verbose --show-trace` flags with
the `use flake` command generates detailed output that may be too noisy for
regular development. Evaluate whether this verbose output is necessary by
default; if not, remove or conditionally include these flags only when debugging
to reduce clutter during normal workflows.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

nix/direnv can sometimes take a while to load and without --verbose it's not clear whether anything is happening or if it's stuck. --show-trace changes output only in case of an error

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.

@0xgleb Thank you for the clarification! That makes perfect sense - having visual feedback during potentially slow nix/direnv loading is important for user experience, and the trace information is valuable for debugging errors without affecting normal operation.


✏️ Learnings added
Learnt from: 0xgleb
PR: rainlanguage/rain.interpreter#333
File: .envrc:10-10
Timestamp: 2025-06-07T11:13:46.637Z
Learning: In .envrc files for nix/direnv, the --verbose flag is beneficial because nix/direnv can take a while to load and without it, it's unclear whether the process is working or stuck. The --show-trace flag only changes output in case of an error and doesn't affect normal operation.

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.

6 changes: 5 additions & 1 deletion .github/workflows/git-clean.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Git is clean
on: [push]

concurrency:
group: ${{ github.ref }}-git-clean
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

Comment on lines +4 to +7
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot Jun 6, 2025

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Review concurrency configuration
The added concurrency block mirrors the Rainix workflow and properly cancels in‐progress runs on non-main branches. For consistency and readability, you might switch to ${{ github.ref_name }} instead of the full ref.

🤖 Prompt for AI Agents
In .github/workflows/git-clean.yaml around lines 4 to 7, update the concurrency
group and cancel-in-progress expressions to use `${{ github.ref_name }}` instead
of `${{ github.ref }}` for better readability and consistency. Replace all
instances of `${{ github.ref }}` with `${{ github.ref_name }}` in this block.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ref is already consistent with Rainix workflow and this group name is only read by github

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.

@0xgleb You're absolutely right! Consistency between workflows is more important than the minor readability difference, and since the concurrency group names are internal to GitHub's system, using github.ref makes perfect sense. Thanks for the clarification on your design decision.

  (\   /)
 ( ._. )
o_("_")("_")

nods thoughtfully


✏️ Learnings added
Learnt from: 0xgleb
PR: rainlanguage/rain.interpreter#333
File: .github/workflows/git-clean.yaml:4-7
Timestamp: 2025-06-07T11:15:44.392Z
Learning: In GitHub workflows for the rainlanguage/rain.interpreter repository, maintain consistency between workflow files when implementing concurrency controls. The user prefers using `${{ github.ref }}` over `${{ github.ref_name }}` for concurrency group naming to ensure consistency across all workflow files (git-clean.yaml and rainix.yaml).

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.

jobs:
git-clean:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -37,4 +41,4 @@ jobs:
- run: nix develop -c forge fmt

# Check if the repo is clean after generating pointers and formatting.
- run: git diff --exit-code
- run: git diff --exit-code
15 changes: 7 additions & 8 deletions .github/workflows/rainix.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Rainix CI
on: [push]

concurrency:
group: ${{ github.ref }}-rainix
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

Comment on lines +4 to +7
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot Jun 6, 2025

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Review concurrency configuration
The new concurrency block correctly prevents overlapping runs on feature branches while queuing main‐branch jobs. Consider using ${{ github.ref_name }} instead of ${{ github.ref }} to group by the branch name (e.g. main, feature/foo) rather than the full ref path.

🤖 Prompt for AI Agents
In .github/workflows/rainix.yaml around lines 4 to 7, update the concurrency
group expression to use `${{ github.ref_name }}` instead of `${{ github.ref }}`
so that the grouping is done by branch name only, not the full ref path. This
change will ensure concurrency is managed per branch name like 'main' or
'feature/foo' rather than the entire ref string.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ref is fine

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.

@0xgleb Understood! I see you prefer using ${{ github.ref }} for consistency across your workflow files. I have this noted from our previous interactions, and I'll respect this preference in future reviews.


🧠 Learnings used
Learnt from: 0xgleb
PR: rainlanguage/rain.interpreter#333
File: .github/workflows/git-clean.yaml:4-7
Timestamp: 2025-06-07T11:15:44.392Z
Learning: In GitHub workflows for the rainlanguage/rain.interpreter repository, maintain consistency between workflow files when implementing concurrency controls. The user prefers using `${{ github.ref }}` over `${{ github.ref_name }}` for concurrency group naming to ensure consistency across all workflow files (git-clean.yaml and rainix.yaml).

jobs:
rainix:
strategy:
Expand Down Expand Up @@ -55,12 +59,7 @@ jobs:
env:
ETH_RPC_URL: ${{ secrets.CI_DEPLOY_SEPOLIA_RPC_URL || vars.CI_DEPLOY_SEPOLIA_RPC_URL }}
ETHERSCAN_API_KEY: ${{ secrets.EXPLORER_VERIFICATION_KEY }}
DEPLOY_BROADCAST: ''
DEPLOY_VERIFIER: ''
DEPLOY_BROADCAST: ""
DEPLOY_VERIFIER: ""
DEPLOY_METABOARD_ADDRESS: ${{ vars.CI_DEPLOY_SEPOLIA_METABOARD_ADDRESS }}
CI_FORK_SEPOLIA_BLOCK_NUMBER: ${{ vars.CI_FORK_SEPOLIA_BLOCK_NUMBER }}
CI_FORK_SEPOLIA_DEPLOYER_ADDRESS: ${{ vars.CI_FORK_SEPOLIA_DEPLOYER_ADDRESS }}
CI_DEPLOY_SEPOLIA_RPC_URL: ${{ secrets.CI_DEPLOY_SEPOLIA_RPC_URL || vars.CI_DEPLOY_SEPOLIA_RPC_URL }}
CI_FORK_POLYGON_RPC_URL: ${{ secrets.CI_FORK_POLYGON_RPC_URL || vars.CI_FORK_POLYGON_RPC_URL }}
CI_FORK_BSC_RPC_URL: ${{ secrets.CI_FORK_BSC_RPC_URL || vars.CI_FORK_BSC_RPC_URL }}
run: nix develop -c ${{ matrix.task }}
run: nix develop -c ${{ matrix.task }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ meta
target
docs
.DS_Store
.direnv

# This is for our deploy scripts that report the addresses of deployed contracts
deployments
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{
"editor.rulers": [80]
"editor.rulers": [
80
],
"solidity.compileUsingRemoteVersion": "v0.8.25+commit.b61c2a91",
"solidity.formatter": "forge"
}
Loading