-
-
Notifications
You must be signed in to change notification settings - Fork 727
feat(target): add loong64 support #7347
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
base: next
Are you sure you want to change the base?
Conversation
π¦ Changeset detectedLatest commit: d15aef0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughAdds LoongArch64 (loong64) support across the repository. Introduces the new package Suggested labels
Suggested reviewers
β¨ Finishing Touches
π§ͺ Generate unit tests
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. πͺ§ TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
1b95202
to
cdde1d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
Caution
Some comments are outside the diff and canβt be posted inline due to platform limitations.
β οΈ Outside diff range comments (1)
.changeset/poor-chefs-bet.md (1)
1-8
: Polish the user-facing note and finish the sentence.Prefer the archβs proper name and end with a period.
-Biome now supports loong64 +Biome now supports LoongArch64 (linux/loong64).
π§Ή Nitpick comments (6)
packages/@biomejs/biome/scripts/generate-packages.mjs (2)
128-129
: Avoid drift: keep LINUX_ONLY_ARCHITECTURES in one place.This constant also appears in scripts/update-manifests.mjs. Consider importing from a single source (or generating both scripts from a template) to prevent silent divergence later.
141-143
: Tiny style fix: brace the loop and terminate statements.Keeps consistency with the rest of the file and avoids ASI gotchas.
-for (const arch of LINUX_ONLY_ARCHITECTURES) - copyBinaryToNativePackage("linux-%s", arch) +for (const arch of LINUX_ONLY_ARCHITECTURES) { + copyBinaryToNativePackage("linux-%s", arch); +}.github/workflows/release_cli.yml (2)
103-106
: Pinning cross to a commit: add --locked; consider a tag
- Add
--locked
to respect Cargo.lock of cross.- If possible, prefer a released tag over a raw commit to avoid accidental breakage when the repo history shifts.
Proposed tweak:
- run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea + run: cargo install cross --locked --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea
117-125
: Cross path looks good; optional: de-duplicate env and confirm QEMU availability
- Env duplication across native/cross can be hoisted to the job level.
- Please confirm the depot runners have a working container engine and binfmt/QEMU for LoongArch.
Optional refactor:
env: - version: ${{ needs.check.outputs.version }} + version: ${{ needs.check.outputs.version }} + # Shared build env + RUSTFLAGS: "-C strip=symbols -C codegen-units=1" + BIOME_VERSION: ${{ env.version }} @@ - env: - # Strip all debug symbols from the resulting binaries - RUSTFLAGS: "-C strip=symbols -C codegen-units=1" - # Inline the version of the npm package in the CLI binary - BIOME_VERSION: ${{ env.version }} + env: {} @@ - env: - # Strip all debug symbols from the resulting binaries - RUSTFLAGS: "-C strip=symbols -C codegen-units=1" - # Inline the version of the npm package in the CLI binary - BIOME_VERSION: ${{ env.version }} + env: {}.github/workflows/beta.yml (2)
86-89
: Install cross: add --locked; tag if feasibleSame rationale as in release workflow.
- run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea + run: cargo install cross --locked --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea
100-108
: Cross build path LGTM; confirm jemalloc page size needs for loong64
- If LoongArch defaults to 16KiB pages on your targets and you rely on jemalloc, consider exporting
JEMALLOC_SYS_WITH_LG_PAGE=16
(Cross.toml already passthroughs it). If not required, ignore.Optional env hoist (as in release) to avoid duplication:
env: - version: ${{ needs.version.outputs.version }} + version: ${{ needs.version.outputs.version }} + RUSTFLAGS: "-C strip=symbols -C codegen-units=1" + BIOME_VERSION: ${{ env.version }} @@ - env: - # Strip all debug symbols from the resulting binaries - RUSTFLAGS: "-C strip=symbols -C codegen-units=1" - # Inline the version of the npm package in the CLI binary - BIOME_VERSION: ${{ env.version }} + env: {} @@ - env: - # Strip all debug symbols from the resulting binaries - RUSTFLAGS: "-C strip=symbols -C codegen-units=1" - # Inline the version of the npm package in the CLI binary - BIOME_VERSION: ${{ env.version }} + env: {}
π Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
π‘ Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
π Files selected for processing (12)
.changeset/config.json
(1 hunks).changeset/poor-chefs-bet.md
(1 hunks).github/workflows/beta.yml
(2 hunks).github/workflows/preview.yml
(2 hunks).github/workflows/release.yml
(2 hunks).github/workflows/release_cli.yml
(2 hunks)Cross.toml
(1 hunks)packages/@biomejs/backend-jsonrpc/src/command.ts
(1 hunks)packages/@biomejs/biome/bin/biome
(1 hunks)packages/@biomejs/biome/scripts/generate-packages.mjs
(2 hunks)packages/@biomejs/cli-linux-loong64/package.json
(1 hunks)scripts/update-manifests.mjs
(2 hunks)
π§° Additional context used
π Path-based instructions (2)
.changeset/*.md
π CodeRabbit inference engine (CONTRIBUTING.md)
.changeset/*.md
: Create changesets withjust new-changeset
; store them in.changeset/
with correct frontmatter (package keys and change type).
In changeset descriptions, follow content conventions: user-facing changes only; past tense for what you did; present tense for current behavior; link issues for fixes; link rules/assists; include representative code blocks; end every sentence with a period.
When adding headers in a changeset, only use #### or ##### levels.
Files:
.changeset/poor-chefs-bet.md
**/*.{rs,toml}
π CodeRabbit inference engine (CONTRIBUTING.md)
Format Rust and TOML files before committing (use
just f
/just format
).
Files:
Cross.toml
π§ Learnings (1)
π Learning: 2025-08-05T14:43:29.581Z
Learnt from: dyc3
PR: biomejs/biome#7081
File: packages/@biomejs/biome/configuration_schema.json:7765-7781
Timestamp: 2025-08-05T14:43:29.581Z
Learning: The file `packages/biomejs/biome/configuration_schema.json` is auto-generated and should not be manually edited or reviewed for schema issues; any changes should be made at the code generation source.
Applied to files:
.changeset/config.json
𧬠Code graph analysis (2)
scripts/update-manifests.mjs (1)
packages/@biomejs/biome/scripts/generate-packages.mjs (1)
LINUX_ONLY_ARCHITECTURES
(128-128)
packages/@biomejs/biome/scripts/generate-packages.mjs (1)
scripts/update-manifests.mjs (1)
LINUX_ONLY_ARCHITECTURES
(13-13)
πͺ actionlint (1.7.7)
.github/workflows/release_cli.yml
64-64: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
.github/workflows/preview.yml
47-47: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
.github/workflows/release.yml
113-113: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
.github/workflows/beta.yml
50-50: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
π Additional comments (13)
.changeset/config.json (1)
14-14
: Approve loong64 CLI addition
Sanity checks passed: package manifest exists,os
/cpu
declared correctly, and changeset references the new package.packages/@biomejs/backend-jsonrpc/src/command.ts (1)
27-27
: Ensure @types/node supports βloong64β or widen the PLATFORMS type
Confirm which @types/node version your workspace uses and upgrade to one that declares NodeJS.Architecture βloong64β; otherwise, adjust the PLATFORMS union to accept this new architecture.packages/@biomejs/biome/bin/biome (1)
32-32
: Nice: linux/loong64 mapped to the new binary.
This keeps launcher parity with backend-jsonrpc.scripts/update-manifests.mjs (2)
26-28
: Good: manifests get updated for linux-loong64 alongside the standard matrix.
This plugs the hole for the new arch without touching musl paths.
13-13
: No drift detected
ConfirmedLINUX_ONLY_ARCHITECTURES
in scripts/update-manifests.mjs (line 13) and packages/@biomejs/biome/scripts/generate-packages.mjs (line 128) are identical..github/workflows/release.yml (4)
113-117
: Matrix entry for loong64 looks good; confirm runner/docker support.Given cross builds require Docker/binfmt, please verify the depot-ubuntu-24.04-16 runners have Docker and QEMU enabled. Also, actionlint flags custom runner labels; add them to actionlint.yaml to silence noise.
144-147
: Pinned cross commit: doubleβcheck stability.Pinning to a commit is fine for reproducibility; please confirm this revision is vetted internally. If not, consider pinning to a released tag and/or using taiki-e/install-action for faster installs.
149-151
: Nice guard on native builds.The
if: matrix.cross != true
gate prevents duplicate work on cross targets. LGTM.
158-166
: Cross build path wired correctly.Env passthrough matches Cross.toml and artifact naming fits generate-packages expectations. Looks solid.
.github/workflows/preview.yml (2)
47-51
: Loong64 matrix entry: πTargets and code-target naming align with the packaging script.
78-81
: Install cross: confirm chosen revision and availability.Same note as release.yml: ensure this commit is stable and the runner has Docker/binfmt for cross.
.github/workflows/release_cli.yml (1)
108-116
: Native path split looks soundCondition and env propagation are correct; nice rename for clarity.
.github/workflows/beta.yml (1)
91-99
: Native build split LGTMClear split; env is passed correctly.
- os: depot-ubuntu-24.04-16 | ||
target: loongarch64-unknown-linux-gnu | ||
code-target: linux-loong64 | ||
cross: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π‘ Verification agent
β Verification inconclusive
Loong64 matrix entry: nice; guard host toolchain + quiet actionlint
- Same note as release: skip
rustup target add
whencross: true
. - Add depot labels to actionlint config to silence false positives.
Proposed guard:
- - name: Install Rust toolchain
- run: rustup target add ${{ matrix.target }}
+ - name: Install Rust toolchain
+ if: matrix.cross != true
+ run: rustup target add ${{ matrix.target }}
Guard Rust toolchain add on cross builds & allow depot runner in actionlint
- In .github/workflows/beta.yml, add
if: matrix.cross != true
to the βInstall Rust toolchainβ step. - In .actionlint.yml, add
depot-ubuntu-24.04-16
to the allowed runner labels to silence false positives.
π§° Tools
πͺ actionlint (1.7.7)
50-50: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
π€ Prompt for AI Agents
In .github/workflows/beta.yml around lines 50 to 53, the βInstall Rust
toolchainβ step should be guarded so it only runs on non-cross builds; add a
conditional `if: matrix.cross != true` to that step to skip toolchain
installation for cross matrix entries. Also update .actionlint.yml to include
`depot-ubuntu-24.04-16` in the allowed runner_labels list so actionlint no
longer flags that runner as invalid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
- name: Build binaries (native) | ||
if: matrix.cross != true | ||
run: cargo build -p biome_cli --release --target ${{ matrix.target }} | ||
env: | ||
# Strip all debug symbols from the resulting binaries | ||
RUSTFLAGS: "-C strip=symbols -C codegen-units=1" | ||
# Inline the version of the npm package in the CLI binary | ||
BIOME_VERSION: ${{ env.cli-version }} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π‘ Verification agent
π§© Analysis chain
BIOME_VERSION uses undefined env var; wire to job output.
In this workflow, version
is exported from the version
job, not cli-version
. Use the job output to avoid embedding an empty version.
- name: Build binaries (native)
if: matrix.cross != true
run: cargo build -p biome_cli --release --target ${{ matrix.target }}
env:
# Strip all debug symbols from the resulting binaries
RUSTFLAGS: "-C strip=symbols -C codegen-units=1"
# Inline the version of the npm package in the CLI binary
- BIOME_VERSION: ${{ env.cli-version }}
+ BIOME_VERSION: ${{ needs.version.outputs.version }}
Run to find other occurrences of the wrong var:
π Script executed:
#!/bin/bash
rg -nP -C2 '\bBIOME_VERSION:\s*\${{\s*env\.cli-version\s*}}' .github/workflows
Length of output: 1323
Wire BIOME_VERSION to the version job output
Replace every BIOME_VERSION: ${{ env.cli-version }}
in .github/workflows/preview.yml (lines 90, 99 and 155) with:
BIOME_VERSION: ${{ needs.version.outputs.version }}
π€ Prompt for AI Agents
.github/workflows/preview.yml around lines 83 to 91: the workflow currently
injects BIOME_VERSION using the env variable cli-version; update this to pull
the version output from the version job by replacing every occurrence of
BIOME_VERSION: ${{ env.cli-version }} (lines 90, 99 and 155) with BIOME_VERSION:
${{ needs.version.outputs.version }} so the build uses the produced version
output from the job dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
βI was also wondering about this while reading preview.yml. It seems that env.cli-version has not been defined...?
- name: Build binaries (cross) | ||
if: matrix.cross == true | ||
run: cross build -p biome_cli --release --target ${{ matrix.target }} | ||
env: | ||
# Strip all debug symbols from the resulting binaries | ||
RUSTFLAGS: "-C strip=symbols -C codegen-units=1" | ||
# Inline the version of the npm package in the CLI binary | ||
BIOME_VERSION: ${{ env.cli-version }} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same BIOME_VERSION issue in the cross path.
Mirror the fix here too.
- name: Build binaries (cross)
if: matrix.cross == true
run: cross build -p biome_cli --release --target ${{ matrix.target }}
env:
# Strip all debug symbols from the resulting binaries
RUSTFLAGS: "-C strip=symbols -C codegen-units=1"
# Inline the version of the npm package in the CLI binary
- BIOME_VERSION: ${{ env.cli-version }}
+ BIOME_VERSION: ${{ needs.version.outputs.version }}
π 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.
- name: Build binaries (cross) | |
if: matrix.cross == true | |
run: cross build -p biome_cli --release --target ${{ matrix.target }} | |
env: | |
# Strip all debug symbols from the resulting binaries | |
RUSTFLAGS: "-C strip=symbols -C codegen-units=1" | |
# Inline the version of the npm package in the CLI binary | |
BIOME_VERSION: ${{ env.cli-version }} | |
- name: Build binaries (cross) | |
if: matrix.cross == true | |
run: cross build -p biome_cli --release --target ${{ matrix.target }} | |
env: | |
# Strip all debug symbols from the resulting binaries | |
RUSTFLAGS: "-C strip=symbols -C codegen-units=1" | |
# Inline the version of the npm package in the CLI binary | |
BIOME_VERSION: ${{ needs.version.outputs.version }} |
π€ Prompt for AI Agents
In .github/workflows/preview.yml around lines 92 to 100, the cross build step
still sets BIOME_VERSION using the incorrect env reference ${{ env.cli-version
}}; mirror the earlier fix by replacing that reference with the same environment
variable used in the other build step (e.g. ${{ env.CLI_VERSION }}) so
BIOME_VERSION is populated consistently for cross builds, keeping the
BIOME_VERSION key and other RUSTFLAGS unchanged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
- os: depot-ubuntu-24.04-16 | ||
target: loongarch64-unknown-linux-gnu | ||
code-target: linux-loong64 | ||
cross: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π‘ Verification agent
π§© Analysis chain
Loong64 matrix entry wired correctly; guard host toolchain step + actionlint label
- Good addition of
loongarch64-unknown-linux-gnu
withcross: true
. - To avoid spurious failures on hosts, skip
rustup target add
for cross builds. - actionlint will flag
depot-ubuntu-24.04-16
as unknown; whitelist custom labels in actionlint config.
Proposed guard:
- - name: Install Rust toolchain
- run: rustup target add ${{ matrix.target }}
+ - name: Install Rust toolchain
+ if: matrix.cross != true
+ run: rustup target add ${{ matrix.target }}
And add your depot labels to .github/actionlint.yaml
:
+runner:
+ labels:
+ - depot-ubuntu-24.04-16
+ - depot-ubuntu-24.04-arm-16
+ - depot-windows-2022-16
+ - depot-macos-14
π Script executed:
#!/bin/bash
# Locate the Install Rust toolchain step
grep -R "name: Install Rust toolchain" -n .github/workflows/release_cli.yml
# Show context around that step to inspect existing guards
sed -n '60,90p' .github/workflows/release_cli.yml
# Verify matrix.cross is defined in the job matrix
grep -R "matrix:" -n .github/workflows/release_cli.yml
# Find Actionlint configuration file
find .github -type f | grep -Ei "actionlint\\.ya?ml$"
# If present, show its labels whitelist section
if [[ -f .github/actionlint.yaml ]]; then
grep -R "labels:" -n .github/actionlint.yaml || echo "No labels section"
sed -n '1,200p' .github/actionlint.yaml
fi
Length of output: 1389
Guard Rust toolchain install and whitelist custom runners
-
In .github/workflows/release_cli.yml (around line 84), change
- - name: Install Rust toolchain - run: rustup target add ${{ matrix.target }} + - name: Install Rust toolchain + if: matrix.cross != true + run: rustup target add ${{ matrix.target }}
-
Create .github/actionlint.yaml with:
runner: labels: - depot-ubuntu-24.04-16 - depot-ubuntu-24.04-arm-16 - depot-windows-2022-16 - depot-macos-14
π§° Tools
πͺ actionlint (1.7.7)
64-64: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
π€ Prompt for AI Agents
In .github/workflows/release_cli.yml around lines 64 to 67 (and near line 84),
guard the Rust toolchain installation so it only runs on supported runners by
wrapping the rustup/cargo install steps with a conditional that checks for the
custom runner labels (e.g., only run when runner OS/label matches target
platforms) and skip or mark as not-required on unsupported hosts; additionally
create a new file .github/actionlint.yaml and whitelist the custom self-hosted
runner labels by listing: depot-ubuntu-24.04-16, depot-ubuntu-24.04-arm-16,
depot-windows-2022-16, and depot-macos-14 so actionlint accepts those runners.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
Cross.toml
Outdated
[target.loongarch64-unknown-linux-gnu.env] | ||
passthrough = ["RUSTFLAGS", "BIOME_VERSION", "JEMALLOC_SYS_WITH_LG_PAGE=16"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π‘ Verification agent
π§© Analysis chain
Env passthrough entry is malformed; remove the '=16'.
Cross expects names only in env.passthrough
. Put the value in the workflow env, not in this list.
Apply:
[target.loongarch64-unknown-linux-gnu.env]
-passthrough = ["RUSTFLAGS", "BIOME_VERSION", "JEMALLOC_SYS_WITH_LG_PAGE=16"]
+passthrough = ["RUSTFLAGS", "BIOME_VERSION", "JEMALLOC_SYS_WITH_LG_PAGE"]
Then set JEMALLOC_SYS_WITH_LG_PAGE: 16
in the CI steps for the loongarch64 target.
Also, please run the repoβs TOML/Rust formatter before merging (per repo guidelines).
Verify the workflow actually sets the variable:
π Script executed:
#!/bin/bash
set -euo pipefail
rg -nP 'JEMALLOC_SYS_WITH_LG_PAGE' .github/workflows -C2
Length of output: 1386
Remove the literal value from Cross TOML passthrough and rely on CI to set it
Crossβs env.passthrough
accepts only variable names. Our CI workflows already echo JEMALLOC_SYS_WITH_LG_PAGE=16
into $GITHUB_ENV
(e.g. .github/workflows/release_cli.yml:176, release.yml:215, preview.yml:146, beta.yml:159). Apply:
[target.loongarch64-unknown-linux-gnu.env]
-passthrough = ["RUSTFLAGS", "BIOME_VERSION", "JEMALLOC_SYS_WITH_LG_PAGE=16"]
+passthrough = ["RUSTFLAGS", "BIOME_VERSION", "JEMALLOC_SYS_WITH_LG_PAGE"]
Run the repoβs TOML/Rust formatter before merging.
π 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.
[target.loongarch64-unknown-linux-gnu.env] | |
passthrough = ["RUSTFLAGS", "BIOME_VERSION", "JEMALLOC_SYS_WITH_LG_PAGE=16"] | |
[target.loongarch64-unknown-linux-gnu.env] | |
passthrough = ["RUSTFLAGS", "BIOME_VERSION", "JEMALLOC_SYS_WITH_LG_PAGE"] |
π€ Prompt for AI Agents
In Cross.toml around lines 1-2, the passthrough entry incorrectly includes a
literal assignment "JEMALLOC_SYS_WITH_LG_PAGE=16"; remove the literal value so
passthrough contains only the variable name JEMALLOC_SYS_WITH_LG_PAGE (e.g.
passthrough = ["RUSTFLAGS", "BIOME_VERSION", "JEMALLOC_SYS_WITH_LG_PAGE"]) to
let CI provide the value, and then run the repo's TOML/Rust formatter before
committing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been discussed below.
{ | ||
"name": "@biomejs/cli-linux-loong64", | ||
"version": "2.2.2", | ||
"license": "MIT OR Apache-2.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/biomejs/biome.git", | ||
"directory": "packages/@biomejs/biome/cli-linux-loong64" | ||
}, | ||
"engines": { | ||
"node": ">=14.21.3" | ||
}, | ||
"homepage": "https://biomejs.dev", | ||
"os": [ | ||
"linux" | ||
], | ||
"cpu": [ | ||
"loong64" | ||
], | ||
"libc": [ | ||
"glibc" | ||
], | ||
"publishConfig": { | ||
"provenance": true | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repository.directory path is inconsistent and likely wrong.
The package lives at packages/@biomejs/cli-linux-loong64, but the manifest points to packages/@biomejs/biome/cli-linux-loong64. Mirror the other CLI platform packages.
"repository": {
"type": "git",
"url": "git+https://github.com/biomejs/biome.git",
- "directory": "packages/@biomejs/biome/cli-linux-loong64"
+ "directory": "packages/@biomejs/cli-linux-loong64"
},
π 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.
{ | |
"name": "@biomejs/cli-linux-loong64", | |
"version": "2.2.2", | |
"license": "MIT OR Apache-2.0", | |
"repository": { | |
"type": "git", | |
"url": "git+https://github.com/biomejs/biome.git", | |
"directory": "packages/@biomejs/biome/cli-linux-loong64" | |
}, | |
"engines": { | |
"node": ">=14.21.3" | |
}, | |
"homepage": "https://biomejs.dev", | |
"os": [ | |
"linux" | |
], | |
"cpu": [ | |
"loong64" | |
], | |
"libc": [ | |
"glibc" | |
], | |
"publishConfig": { | |
"provenance": true | |
} | |
} | |
{ | |
"name": "@biomejs/cli-linux-loong64", | |
"version": "2.2.2", | |
"license": "MIT OR Apache-2.0", | |
"repository": { | |
"type": "git", | |
"url": "git+https://github.com/biomejs/biome.git", | |
"directory": "packages/@biomejs/cli-linux-loong64" | |
}, | |
"engines": { | |
"node": ">=14.21.3" | |
}, | |
"homepage": "https://biomejs.dev", | |
"os": [ | |
"linux" | |
], | |
"cpu": [ | |
"loong64" | |
], | |
"libc": [ | |
"glibc" | |
], | |
"publishConfig": { | |
"provenance": true | |
} | |
} |
π€ Prompt for AI Agents
In packages/@biomejs/cli-linux-loong64/package.json around lines 1 to 26, the
repository.directory field incorrectly points to
"packages/@biomejs/biome/cli-linux-loong64" instead of this package's actual
path; update repository.directory to "packages/@biomejs/cli-linux-loong64" to
match the package location and mirror the other CLI platform packages so
repository metadata is consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is generated by script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coderabbit caught some potential bugs. Can you please address them?
|
||
- name: Install cross | ||
if: matrix.cross == true | ||
run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note that this needs to be documented. We can't expect to add a commit without context to the fellow developers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the latest commit since the last cross-rs tag is two years old. Should I use the latest tag instead, or just add a comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since loong64 support was added after the lasted release of cross-rs (cross-rs/cross@2acf34d), I will add comments to the related blocks.
Cross.toml
Outdated
@@ -0,0 +1,2 @@ | |||
[target.loongarch64-unknown-linux-gnu.env] | |||
passthrough = ["RUSTFLAGS", "BIOME_VERSION", "JEMALLOC_SYS_WITH_LG_PAGE=16"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does it do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
βSince cross-rs builds targets in a container, passing environment variables is necessary. For JEMALLOC_SYS_WITH_LG_PAGE=16
, loong64 defaults to 16K page size, so setting this is necessary.
Actually it would be better to configure passthrough for RUSTFLAGS
and BIOME_VERSION
in the [build.env]
section to ensure they apply to all cross-compilation targets. I will modify it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
β»οΈ Duplicate comments (7)
.github/workflows/release.yml (1)
145-148
: Pin to cross git rev is fine; add rationale + preflight checkAdd a brief comment explaining why a git rev (not tag) is used, and fail early if Docker isnβt present on the runner.
You can inline a note:
- name: Install cross if: matrix.cross == true - run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea + run: | + # Pin to a known-good commit; latest tagged release lacks loongarch64 fixes. + cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1eaOptional preflight (add before installing cross):
- name: Preflight cross dependencies if: matrix.cross == true run: | docker --version.github/workflows/release_cli.yml (1)
64-67
: Loong64 matrix entry: +1; also whitelist depot labelsEntry looks correct; please add the depot labels to .github/actionlint.yaml as noted in release.yml.
.github/workflows/preview.yml (4)
47-51
: Loong64 matrix entry OK; donβt forget actionlint whitelistGood addition. Please add depot labels to .github/actionlint.yaml as per release.yml.
79-82
: Pin cross and document whySame note: add a brief comment for the chosen commit; optional Docker preflight as in release.yml.
84-92
: BIOME_VERSION uses undefined env; wire to job outputUse the version from the version job; current
${{ env.cli-version }}
is unset here.- name: Build binaries (native) if: matrix.cross != true run: cargo build -p biome_cli --release --target ${{ matrix.target }} env: # Strip all debug symbols from the resulting binaries RUSTFLAGS: "-C strip=symbols -C codegen-units=1" # Inline the version of the npm package in the CLI binary - BIOME_VERSION: ${{ env.cli-version }} + BIOME_VERSION: ${{ needs.version.outputs.version }}
93-101
: Mirror BIOME_VERSION fix in cross pathSame correction needed here.
- name: Build binaries (cross) if: matrix.cross == true run: cross build -p biome_cli --release --target ${{ matrix.target }} env: # Strip all debug symbols from the resulting binaries RUSTFLAGS: "-C strip=symbols -C codegen-units=1" # Inline the version of the npm package in the CLI binary - BIOME_VERSION: ${{ env.cli-version }} + BIOME_VERSION: ${{ needs.version.outputs.version }}Run to catch any remaining occurrences (thereβs usually one in the GNU job too):
#!/bin/bash rg -nP -C1 '\bBIOME_VERSION:\s*\${{\s*env\.cli-version\s*}}' .github/workflows/preview.yml.github/workflows/beta.yml (1)
50-54
: Loong64 matrix entry: thumbs up; whitelist depot labelsLooks correct. Please add/extend .github/actionlint.yaml with depot runner labels.
π§Ή Nitpick comments (5)
.github/workflows/release.yml (1)
150-167
: Split native/cross paths: solid; consider de-duplicating envBoth paths mirror flags nicely. Consider lifting RUSTFLAGS/BIOME_VERSION to job-level env to avoid repetition.
.github/workflows/release_cli.yml (2)
104-107
: Cross install pinned; add why + consider faster installAdd a one-liner comment for the pin rationale. Optionally switch to taiki-e/install-action for cached installs to speed CI.
- name: Install cross if: matrix.cross == true - run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea + run: | + # Using commit pin due to missing loongarch64 support in latest tag. + cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea
109-126
: Native/cross builds mirror nicely; minor DRYLooks good. You could hoist RUSTFLAGS/BIOME_VERSION to job env to reduce duplication.
.github/workflows/beta.yml (2)
87-90
: Pin rationale for cross + optional cachingAdd a short comment explaining the pin; consider taiki-e/install-action for cached installs.
- name: Install cross if: matrix.cross == true - run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea + run: | + # Pin to a commit with loongarch64 support pending next release. + cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea
92-109
: Native/cross build split is sound; minor DRY opportunityAs elsewhere, you could hoist RUSTFLAGS/BIOME_VERSION to job env to avoid repetition.
π Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
π‘ Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
π Files selected for processing (5)
.github/workflows/beta.yml
(3 hunks).github/workflows/preview.yml
(3 hunks).github/workflows/release.yml
(3 hunks).github/workflows/release_cli.yml
(3 hunks)Cross.toml
(1 hunks)
π§ Files skipped from review as they are similar to previous changes (1)
- Cross.toml
π§° Additional context used
πͺ actionlint (1.7.7)
.github/workflows/preview.yml
47-47: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
.github/workflows/release_cli.yml
64-64: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
.github/workflows/beta.yml
50-50: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
.github/workflows/release.yml
113-113: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
π Additional comments (5)
.github/workflows/release.yml (2)
113-117
: Loong64 matrix entry wired correctly; whitelist depot runners for actionlintLooks good. Please also whitelist the custom depot labels so actionlint stops complaining.
Add a new config file:
+--- /dev/null ++++ b/.github/actionlint.yaml +runner: + labels: + - depot-ubuntu-24.04-16 + - depot-ubuntu-24.04-arm-16 + - depot-ubuntu-24.04-arm-4 + - depot-ubuntu-24.04 + - depot-ubuntu-24.04-arm + - depot-ubuntu-24.04-arm-small + - depot-windows-2022-16 + - depot-macos-14
126-128
: Guarding rustup on cross builds: LGTMSkipping toolchain install when cross-compiling is the right call.
.github/workflows/release_cli.yml (1)
85-86
: Guarded rustup install: +1Good to skip on cross builds.
.github/workflows/preview.yml (1)
60-61
: Guarded rustup: looks rightSkipping toolchain install for cross builds is correct.
.github/workflows/beta.yml (1)
68-69
: Guarding rustup for cross: LGTMCorrectly skips target install when cross-compiling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and canβt be posted inline due to platform limitations.
β οΈ Outside diff range comments (6)
.github/workflows/release.yml (1)
264-272
: Artifact name references undefined matrix; fix to a static name.This job has no matrix, but uses
name: wasm-${{ matrix.target }}
. On GitHub Actions, referencing an undefined context can error; even if it resolves to empty, it produces a slightly odd name (βwasm-β) and complicates downloads.Apply:
- - name: Upload WASM artifact + - name: Upload WASM artifact uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: - name: wasm-${{ matrix.target }} + name: wasm path: | ./packages/@biomejs/wasm-bundler ./packages/@biomejs/wasm-nodejs ./packages/@biomejs/wasm-web if-no-files-found: errorAlso update the download step in
publish-cli
to match (outside this hunk):- pattern: wasm-* + pattern: wasm*.github/workflows/preview.yml (2)
15-23
: Job output should come from a step output, not env.Setting
env.version
wonβt reliably populateneeds.version.outputs.version
. Emit a proper step output and reference it.Apply:
- version: + version: name: Generate version runs-on: depot-ubuntu-24.04-arm outputs: - version: ${{ env.version }} + version: ${{ steps.set-version.outputs.version }} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set version + id: set-version run: | echo "version=$(node packages/@biomejs/biome/scripts/update-preview-version.mjs)" >> $GITHUB_ENV + echo "version=$(node -e 'console.log(process.env.version)')" >> $GITHUB_OUTPUTOr emit the value directly without re-evaluating the node call:
- echo "version=$(node packages/@biomejs/biome/scripts/update-preview-version.mjs)" >> $GITHUB_ENV - echo "version=$(node -e 'console.log(process.env.version)')" >> $GITHUB_OUTPUT + v=$(node packages/@biomejs/biome/scripts/update-preview-version.mjs) + echo "version=$v" >> $GITHUB_ENV + echo "version=$v" >> $GITHUB_OUTPUT
195-203
: Use a static artifact name; this job has no matrix.Avoid
${{ matrix.target }}
here and simplify downloads.Apply:
- - name: Upload WASM artifact + - name: Upload WASM artifact uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: - name: wasm-${{ matrix.target }} + name: wasm path: | ./packages/@biomejs/wasm-bundler ./packages/@biomejs/wasm-nodejs ./packages/@biomejs/wasm-web if-no-files-found: errorAnd update the download pattern in
publish
:- pattern: wasm-* + pattern: wasm*.github/workflows/beta.yml (1)
207-216
: Static WASM artifact name; no matrix here either.Mirror the fix suggested for the other workflows.
Apply:
- name: wasm-${{ matrix.target }} + name: wasmAnd adjust the download pattern under
publish
:- pattern: wasm-* + pattern: wasm*.github/workflows/release_cli.yml (2)
72-79
: Broken job condition: outputs arenβt defined.
needs.check.outputs.version_changed
and.nightly
donβt exist;check
only outputsversion
. This will short-circuit the build.Two options:
- Export the missing outputs from
check
:check: name: Check version runs-on: depot-ubuntu-24.04-arm-small outputs: - version: ${{ env.version }} + version: ${{ env.version }} + version_changed: ${{ steps.version.outputs.changed }} + nightly: ${{ env.nightly }} + prerelease: ${{ env.prerelease }}Ensure
env.prerelease
is set (it is, in βSet prerelease statusβ).
- Or simplify the condition to something you already export:
- if: needs.check.outputs.version_changed == 'true' || needs.check.outputs.nightly == 'true' + if: steps.version.outputs.changed == 'true' || env.nightly == 'true'(Option 1 is preferred to keep downstream jobs using
needs.check.outputs.*
.)
224-233
: Static name for WASM artifact; avoid undefined${{ matrix.* }}
.Same fix as other workflows.
Apply:
- name: wasm-${{ matrix.target }} + name: wasmAnd in
publish
, update the download pattern:- pattern: wasm-* + pattern: wasm*
β»οΈ Duplicate comments (1)
.github/workflows/preview.yml (1)
95-96
: Wire BIOME_VERSION from the job output, not an undefined env.
env.cli-version
isnβt defined; use the version jobβs output so the binary embeds the correct preview version.Apply:
- BIOME_VERSION: ${{ env.cli-version }} + BIOME_VERSION: ${{ needs.version.outputs.version }}Also applies to: 101-105, 159-161
π§Ή Nitpick comments (8)
.github/workflows/release.yml (2)
145-151
: Pinning cross to a commit is fine; centralise the rev and plan to revisit.Given crates.io is stale and newer targets land only on Git, pinning is reasonable. Please:
- Hoist the commit to a single env (e.g. CROSS_RS_REV) to keep all workflows in sync.
- Revisit periodically; if/when a tagged release ships with LoongArch, switch to
cargo install cross --version
or a tag.Rationale: cross hasn't cut frequent GitHub/crates.io releases; folks install from Git for newer support. (github.com)
Apply within this step:
- run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea + run: cargo install cross --git https://github.com/cross-rs/cross --rev $CROSS_RS_REVAdd (outside this hunk) near the top-level
env:
so it propagates to all jobs:CROSS_RS_REV: "e281947ca900da425e4ecea7483cfde646c8a1ea"If you confirm a newer tag includes loongarch64, I can prep a follow-up patch to switch to that tag.
87-117
: Silence actionlint for custom Depot runners.actionlint will keep flagging the custom
depot-*
labels as βunknownβ. Add a repo config to whitelist them.Add
.github/actionlint.yaml
:runner: labels: - depot-ubuntu-24.04-16 - depot-ubuntu-24.04-arm-16 - depot-ubuntu-24.04 - depot-ubuntu-24.04-arm-4 - depot-windows-2022-16 - depot-macos-14Also applies to: 193-209, 245-248
.github/workflows/preview.yml (2)
79-86
: Pin cross via a single env and plan a follow-up to a tag when available.Same note as release.yml: centralise the commit and periodically reassess; crates.io is behind, so Git pinning is expected. (github.com)
Apply within this step:
- run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea + run: cargo install cross --git https://github.com/cross-rs/cross --rev $CROSS_RS_REVAdd (outside this hunk) near the top-level
env:
:CROSS_RS_REV: "e281947ca900da425e4ecea7483cfde646c8a1ea"
35-41
: Whitelist Depot labels in actionlint config.Add
.github/actionlint.yaml
as in the release.yml comment to silence βunknown labelβ warnings for custom runners.Also applies to: 132-138, 178-186, 229-234
.github/workflows/beta.yml (2)
87-94
: DRY the pinned cross revision via env; plan a later switch to a tag.Same guidance as other workflows; pinning to Git is expected given release cadence. (github.com)
Apply:
- run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea + run: cargo install cross --git https://github.com/cross-rs/cross --rev $CROSS_RS_REVAdd (outside this hunk) at the workflow or job
env:
:CROSS_RS_REV: "e281947ca900da425e4ecea7483cfde646c8a1ea"
38-44
: Add actionlint config to whitelist self-hosteddepot-*
labels.Same snippet as proposed in release.yml to stop false positives.
Also applies to: 140-146, 192-196, 243-248
.github/workflows/release_cli.yml (2)
104-111
: Same cross pinning: centralise the rev and reassess when tags catch up.Use a shared env
CROSS_RS_REV
and reference it here; crates.io is lagging, so Git pinning is expected. (github.com)Apply:
- run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea + run: cargo install cross --git https://github.com/cross-rs/cross --rev $CROSS_RS_REVAdd (outside this hunk) to the workflow
env:
:CROSS_RS_REV: "e281947ca900da425e4ecea7483cfde646c8a1ea"
156-162
: Whitelist custom runner labels for actionlint.Add
.github/actionlint.yaml
as suggested earlier to suppress βunknown labelβ warnings.Also applies to: 208-214, 236-245
π Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
π‘ Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
π Files selected for processing (4)
.github/workflows/beta.yml
(3 hunks).github/workflows/preview.yml
(3 hunks).github/workflows/release.yml
(3 hunks).github/workflows/release_cli.yml
(3 hunks)
π§° Additional context used
πͺ actionlint (1.7.7)
.github/workflows/beta.yml
50-50: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
.github/workflows/preview.yml
47-47: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
.github/workflows/release.yml
113-113: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
.github/workflows/release_cli.yml
64-64: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
π Additional comments (9)
.github/workflows/release.yml (3)
113-116
: Loong64 matrix entry wired correctly.New target, code-target naming, and
cross: true
flag look consistent with the rest of the matrix.
125-127
: Good guard on rustup for cross builds.Skipping
rustup target add
whenmatrix.cross == true
avoids redundant toolchain installs on cross paths.
163-171
: Cross build path mirrors native path correctly.Env passthrough and target selection match the native build; assuming Cross.toml forwards BIOME_VERSION/RUSTFLAGS, this is good.
.github/workflows/preview.yml (1)
47-51
: Loong64 entry looks consistent.Matrix item and
cross: true
flag are aligned with other workflows..github/workflows/beta.yml (2)
50-53
: Loong64 matrix item LGTM.Values are aligned with other workflows;
cross: true
is correct.
67-69
: Nice guard on host toolchain install.This prevents unnecessary rustup work on cross builds.
.github/workflows/release_cli.yml (3)
64-67
: Loong64 entry looks good.Correct target triple and
code-target
mapping.
84-87
: Good: rustup guard for cross builds.Prevents unnecessary target installs on cross paths.
112-121
: Build envs look consistent across native/cross.RUSTFLAGS and BIOME_VERSION are aligned with upstream patterns.
Also applies to: 122-130
409e0da
to
d15aef0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
β»οΈ Duplicate comments (3)
.github/workflows/preview.yml (2)
47-51
: Whitelist depot runners for actionlintSame nit as release.yml; add depot labels to .github/actionlint.yaml.
87-96
: BIOME_VERSION uses an undefined var; wire to job outputenv.cli-version isnβt defined. Use the version jobβs output.
- name: Build binaries (native) if: matrix.cross != true run: cargo build -p biome_cli --release --target ${{ matrix.target }} --features=js_plugin env: # Strip all debug symbols from the resulting binaries RUSTFLAGS: "-C strip=symbols -C codegen-units=1" # Inline the version of the npm package in the CLI binary - BIOME_VERSION: ${{ env.cli-version }} + BIOME_VERSION: ${{ needs.version.outputs.version }}- name: Build binaries (cross) if: matrix.cross == true run: cross build -p biome_cli --release --target ${{ matrix.target }} --features=js_plugin env: # Strip all debug symbols from the resulting binaries RUSTFLAGS: "-C strip=symbols -C codegen-units=1" # Inline the version of the npm package in the CLI binary - BIOME_VERSION: ${{ env.cli-version }} + BIOME_VERSION: ${{ needs.version.outputs.version }}- name: Build binaries run: cargo build -p biome_cli --release --target=${{ matrix.target }} --features=js_plugin env: # Strip all debug symbols from the resulting binaries RUSTFLAGS: "-C strip=symbols -C codegen-units=1" # Inline the version of the npm package in the CLI binary - BIOME_VERSION: ${{ env.cli-version }} + BIOME_VERSION: ${{ needs.version.outputs.version }}Also applies to: 97-105, 154-161
.github/workflows/beta.yml (1)
50-54
: Whitelist depot labels for actionlintAdd the depot runners to .github/actionlint.yaml to avoid noisy lint.
π§Ή Nitpick comments (7)
packages/@biomejs/backend-jsonrpc/src/command.ts (1)
15-31
: Type surface: ensure NodeJS.Architecture includes 'loong64'If your @types/node is older, the object literal may error on the extra key. If you hit that, widen the type locally:
TypeScript (outside this hunk):
type Arch = NodeJS.Architecture | 'loong64'; type PlatformPaths = { [P in NodeJS.Platform]?: Partial<Record<Arch, string>> };
.github/workflows/release.yml (2)
145-151
: Pin cross deterministicallyAdd --locked to make the git install reproducible.
- run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea + run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea --locked
113-117
: Silence actionlint for custom depot labelsactionlint flags depot-* runners by default. Add an actionlint config to whitelist them.
New file .github/actionlint.yaml:
runner: labels: - depot-ubuntu-24.04-16 - depot-ubuntu-24.04-arm-16 - depot-windows-2022-16 - depot-macos-14.github/workflows/preview.yml (1)
79-86
: Make cross install reproducibleAdd --locked to the cargo install.
- run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea + run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea --locked.github/workflows/release_cli.yml (2)
104-111
: Lock cross install for determinismPin dependencies during install.
- run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea + run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea --locked
64-67
: actionlint and depot labelsIf not already in repo, add an actionlint config to allow depot-* labels.
.github/workflows/beta.yml (1)
87-94
: Reproducible cross installSame --locked suggestion here.
- run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea + run: cargo install cross --git https://github.com/cross-rs/cross --rev e281947ca900da425e4ecea7483cfde646c8a1ea --locked
π Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
π‘ Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
π Files selected for processing (12)
.changeset/config.json
(1 hunks).changeset/poor-chefs-bet.md
(1 hunks).github/workflows/beta.yml
(3 hunks).github/workflows/preview.yml
(3 hunks).github/workflows/release.yml
(3 hunks).github/workflows/release_cli.yml
(3 hunks)Cross.toml
(1 hunks)packages/@biomejs/backend-jsonrpc/src/command.ts
(1 hunks)packages/@biomejs/biome/bin/biome
(1 hunks)packages/@biomejs/biome/scripts/generate-packages.mjs
(2 hunks)packages/@biomejs/cli-linux-loong64/package.json
(1 hunks)scripts/update-manifests.mjs
(2 hunks)
π§ Files skipped from review as they are similar to previous changes (7)
- packages/@biomejs/cli-linux-loong64/package.json
- .changeset/poor-chefs-bet.md
- Cross.toml
- .changeset/config.json
- scripts/update-manifests.mjs
- packages/@biomejs/biome/scripts/generate-packages.mjs
- packages/@biomejs/biome/bin/biome
π§° Additional context used
πͺ actionlint (1.7.7)
.github/workflows/beta.yml
50-50: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
.github/workflows/preview.yml
47-47: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
.github/workflows/release.yml
113-113: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
.github/workflows/release_cli.yml
64-64: label "depot-ubuntu-24.04-16" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
(runner-label)
π Additional comments (8)
packages/@biomejs/backend-jsonrpc/src/command.ts (1)
27-28
: Loong64 mapping added β looks goodThe binary resolution for linux/loong64 aligns with the new package name.
.github/workflows/release.yml (2)
113-117
: Matrix entry for loongarch64 β confirm toolchain/image availabilityTriple and code-target look right. Please verify the cross image pulls on your depot runners and that QEMU is available.
126-126
: Guarding rustup on cross builds β good catchPrevents unnecessary target installation on cross paths.
.github/workflows/preview.yml (1)
47-51
: Loong64 in preview matrix β good additionEntry matches the release workflow; parity looks consistent.
.github/workflows/release_cli.yml (2)
64-67
: Loong64 matrix entry β thumbs upCross flag with the correct triple looks tidy.
84-86
: Guarding rustup on cross builds β niceAvoids pointless target install on cross.
.github/workflows/beta.yml (2)
50-54
: Loong64 beta matrix β looks consistentMatches other workflows and target naming.
67-69
: rustup guard on cross β goodKeeps cross path lean.
Hi @ematipico, I've addressed all the comments and rebased the branch. Please let me know if any further changes are needed. |
Summary
This pull request adds support for loong64 (
loongarch64
as a rust target) architecture. As biome works well on loong64 it would be a good idea to add support and ship prebuilt binaries for this architecture.Note that we are using cross-rs to build the binary as there's no loong64 runners on GitHub Actions or depot.dev. Hopefully it would be a good start for adding more architectures if needed.
Test Plan
The loong64 artifact built in this workflow has been smoke tested on native loong64.
Docs
We are planning to submit another pull request to
biomejs/website
after this one being merged.