Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 10 additions & 1 deletion .github/workflows/test-ui-components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
submodules: recursive
fetch-depth: 0

- name: Free disk space
uses: jlumbroso/free-disk-space@v1.3.1

- uses: nixbuild/nix-quick-install-action@v30
with:
nix_conf: |
Expand All @@ -38,11 +41,17 @@ jobs:
# collect garbage until the Nix store size (in bytes) is at most this number
# before trying to save a new cache
# 1G = 1073741824
gc-max-store-size-linux: 1G
gc-max-store-size-linux: 10G

- run: ./prep-webapp.sh
env:
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }}
COMMIT_SHA: ${{ github.sha }}

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.

🧹 Nitpick | 🔵 Trivial

Remove redundant COMMIT_SHA environment variable.

Line 49 passes COMMIT_SHA: ${{ github.sha }} to the prep-webapp.sh step, but this variable is already defined in the job's env block at line 19. Passing it again is redundant.

Apply this diff to remove the duplicate:

      - run: ./prep-webapp.sh
        env:
          PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }}
-         COMMIT_SHA: ${{ github.sha }}
          CARGO_HOME: ${{ github.workspace }}/.cargo
          CARGO_TARGET_DIR: ${{ github.workspace }}/.cargo/target

Alternatively, if prep-webapp.sh requires it to be passed explicitly, add a comment explaining why it's not inherited from the job env.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
COMMIT_SHA: ${{ github.sha }}
- run: ./prep-webapp.sh
env:
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }}
CARGO_HOME: ${{ github.workspace }}/.cargo
CARGO_TARGET_DIR: ${{ github.workspace }}/.cargo/target
🤖 Prompt for AI Agents
.github/workflows/test-ui-components.yaml around line 49: the step is
redundantly passing COMMIT_SHA: ${{ github.sha }} to the prep-webapp.sh step
even though COMMIT_SHA is already defined in the job-level env at line 19;
remove the duplicate COMMIT_SHA entry from the step to avoid redundancy, or if
prep-webapp.sh truly requires an explicit step-level env, replace the duplicate
with a short comment explaining why the value must be passed again (e.g.,
"explicitly passed because step runs in a separate environment and does not
inherit job env") so the intent is clear.

CARGO_HOME: ${{ github.workspace }}/.cargo
CARGO_TARGET_DIR: ${{ github.workspace }}/.cargo/target

- name: Cleanup Rust artifacts after prep
run: rm -rf target || true

- run: nix develop -c npm run svelte-lint-format-check -w @rainlanguage/ui-components

Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/test-webapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
submodules: recursive
fetch-depth: 0

- name: Free disk space

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ditto

uses: jlumbroso/free-disk-space@v1.3.1

- uses: nixbuild/nix-quick-install-action@v30
with:
nix_conf: |
Expand All @@ -38,11 +41,17 @@ jobs:
# collect garbage until the Nix store size (in bytes) is at most this number
# before trying to save a new cache
# 1G = 1073741824
gc-max-store-size-linux: 1G
gc-max-store-size-linux: 10G

- run: ./prep-webapp.sh
env:
PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }}
COMMIT_SHA: ${{ github.sha }}

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.

🧹 Nitpick | 🔵 Trivial

Remove redundant COMMIT_SHA environment variable.

Line 49 passes COMMIT_SHA: ${{ github.sha }} to the prep-webapp.sh step, but this variable is already defined in the job's env block at line 19. Passing it again is redundant.

Apply this diff to remove the duplicate:

      - run: ./prep-webapp.sh
        env:
          PUBLIC_WALLETCONNECT_PROJECT_ID: ${{ secrets.WALLETCONNECT_PROJECT_ID || 'test' }}
-         COMMIT_SHA: ${{ github.sha }}
          CARGO_HOME: ${{ github.workspace }}/.cargo
          CARGO_TARGET_DIR: ${{ github.workspace }}/.cargo/target

Alternatively, if prep-webapp.sh requires it to be passed explicitly, add a comment explaining why it's not inherited from the job env.

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

🤖 Prompt for AI Agents
.github/workflows/test-webapp.yaml around line 49: the step passes COMMIT_SHA:
${{ github.sha }} even though COMMIT_SHA is already set in the job's env at line
19, so remove the duplicate environment mapping from the step to avoid
redundancy; if the prep-webapp.sh step truly needs an explicit env declaration
because it does not inherit job envs in your setup, instead keep the line but
add a one-line comment explaining why it must be passed explicitly (e.g.,
"explicitly passed because step runs in a different context and does not inherit
job envs").

CARGO_HOME: ${{ github.workspace }}/.cargo
CARGO_TARGET_DIR: ${{ github.workspace }}/.cargo/target

- name: Cleanup Rust artifacts after prep
run: rm -rf target || true

- run: nix develop -c npm run svelte-lint-format-check -w @rainlanguage/webapp
env:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/vercel-docs-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
submodules: recursive
fetch-depth: 0

- name: Free disk space
uses: jlumbroso/free-disk-space@v1.3.1
Comment on lines +27 to +28

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.

🧹 Nitpick | 🔵 Trivial

Consider specifying jlumbroso/free-disk-space action parameters for maximum disk recovery.

The action is used without explicit configuration, relying on defaults. Based on prior review feedback, consider adding parameters to maximize disk space recovery for this build environment.

Apply this diff to add action parameters:

      - name: Free disk space
-       uses: jlumbroso/free-disk-space@v1.3.1
+       uses: jlumbroso/free-disk-space@v1.3.1
+       with:
+         android: true
+         dotnet: true
+         haskell: true
+         large-packages: false
+         docker-images: false
+         swap-storage: false

This aligns with the pattern suggested in previous reviews and ensures maximum disk space availability for the Nix build cache and compilation artifacts.

🤖 Prompt for AI Agents
In .github/workflows/vercel-docs-preview.yaml around lines 27-28, the
jlumbroso/free-disk-space action is invoked with defaults; modify the step to
include a with: block that explicitly targets common large locations and
requests a high free-space threshold so the runner reclaims maximum disk (for
example, set paths to include /home/runner/.cache, /tmp, and
/opt/hostedtoolcache and set a min-free-mb value such as 20000 or another
project-appropriate threshold), optionally enabling any aggressive/recursive
cleanup flags the action supports; ensure the new with: parameters are added
under the action step so the build has maximum disk recovery for Nix cache and
compilation artifacts.


- uses: DeterminateSystems/nix-installer-action@main
with:
determinate: true
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/vercel-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
submodules: recursive
fetch-depth: 0

- name: Free disk space
uses: jlumbroso/free-disk-space@v1.3.1

- uses: nixbuild/nix-quick-install-action@v30
with:
nix_conf: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/vercel-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
submodules: recursive
fetch-depth: 0

- name: Free disk space
uses: jlumbroso/free-disk-space@v1.3.1

- uses: nixbuild/nix-quick-install-action@v30
with:
nix_conf: |
Expand Down
23 changes: 6 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/common/src/rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl RpcClient {

pub fn new_with_hyper_rpc(chain_id: u32, api_token: &str) -> Result<Self, RpcClientError> {
let url = Self::build_hyper_url(chain_id, api_token)?;
let provider = Arc::new(mk_read_provider(&[url.clone()])?);
let provider = Arc::new(mk_read_provider(std::slice::from_ref(&url))?);
Ok(Self {
chain_id: Some(chain_id),
rpc_urls: vec![url],
Expand Down
2 changes: 1 addition & 1 deletion crates/quote/src/quote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl QuoteTarget {
multicall_address: Option<Address>,
) -> Result<QuoteResult, Error> {
Ok(batch_quote(
&[self.clone()],
std::slice::from_ref(self),
rpcs,
block_number,
gas,
Expand Down
2 changes: 1 addition & 1 deletion crates/test_fixtures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ alloy = { workspace = true, features = [
] }

[target.'cfg(target_family = "wasm")'.dependencies]
getrandom = { version = "0", features = ["js", "js-sys"] }
getrandom = { version = "0.2", features = ["js"] }
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/rain.interpreter
5 changes: 5 additions & 0 deletions prep-webapp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ keep=(
echo "Preparing base setup..."
./prep-base.sh

rm -rf target || true

echo "Building packages..."
nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/orderbook)'

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.

⚠️ Potential issue | 🟡 Minor

Fix Shellcheck SC2068 warning by quoting array expansion.

The array ${keep[@]} should be quoted as "${keep[@]}" to prevent word-splitting if environment variables contain spaces. This could cause the nix develop invocation to fail unexpectedly.

Apply this diff to fix the array expansion:

-nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/orderbook)'
+nix develop -i "${keep[@]}" -c bash -c '(npm run build -w @rainlanguage/orderbook)'

Additionally, apply the same fix to line 39 if it also uses ${keep[@]}:

-nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/ui-components && npm run build -w @rainlanguage/webapp)'
+nix develop -i "${keep[@]}" -c bash -c '(npm run build -w @rainlanguage/ui-components && npm run build -w @rainlanguage/webapp)'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/orderbook)'
nix develop -i "${keep[@]}" -c bash -c '(npm run build -w @rainlanguage/orderbook)'
🧰 Tools
🪛 Shellcheck (0.11.0)

[error] 35-35: Double quote array expansions to avoid re-splitting elements.

(SC2068)

🤖 Prompt for AI Agents
In prep-webapp.sh around line 35 (and also update line 39 if it uses the same
expansion), the array expansion ${keep[@]} is unquoted which triggers ShellCheck
SC2068 and can cause word-splitting when elements contain spaces; change the
invocation to quote the array expansion as "${keep[@]}" so each array element is
preserved as a single argument to nix develop (apply the same quoted expansion
on line 39 if present).


rm -rf target || true

nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/ui-components && npm run build -w @rainlanguage/webapp)'

# Temporarily disable command echoing
Expand Down
43 changes: 24 additions & 19 deletions tauri-app/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.