feat: support riscv64 prebuilt binaries in release and install#1382
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughThis PR adds riscv64 to release and package metadata, conditions the Go race detector in tests for riscv64, and builds/wires riscv64 binaries and installer/runtime mappings across build and install scripts. Changesriscv64 Architecture Support
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1382 +/- ##
==========================================
- Coverage 71.98% 71.98% -0.01%
==========================================
Files 700 700
Lines 66293 66293
==========================================
- Hits 47721 47718 -3
- Misses 14867 14870 +3
Partials 3705 3705 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@9a20ec7aac3d7ff6a2038a35a534c9041a5e2339🧩 Skill updatenpx skills add larksuite/cli#feat/riscv64-support -y -g |
9328ed3 to
01e8f44
Compare
The cherry-picked riscv64 commit derived RACE_FLAG from `go env GOARCH` via a grep pipeline, which ignores a GOARCH passed on the make command line (e.g. `make GOARCH=riscv64 unit-test`) since command-line make variables are not visible to $(shell ...). Switch to a make-native filter that honors both, and restore the trailing newline the same commit dropped.
01e8f44 to
9a20ec7
Compare
Summary
Re-homes #1297 onto a branch in the upstream repo and cherry-picks it onto the current
main. Original feature by @rockyzhang — the two original commits are preserved; a follow-up commit applies review feedback.Adds
linux/riscv64as a supported target so lark-cli builds, releases, and installs natively on RISC-V 64-bit hardware. lark-cli is pure Go built withCGO_ENABLED=0and has no architecture-specific code, so riscv64 needs only distribution-list additions — no product code changes.Changes
.goreleaser.yml: addriscv64to the buildgoarchlist. goreleaser v2 auto-skips the invaliddarwin/riscv64andwindows/riscv64combos, so noignorerule is needed.package.json: addriscv64to the npmcpulist so npm does not reject installation on riscv64 hosts.scripts/install.js: addriscv64: "riscv64"toARCH_MAPso the postinstall binary download resolveslark-cli-<version>-linux-riscv64.tar.gz.scripts/build-pkg-pr-new.sh: build thelinux/riscv64preview target and map it in the embedded runner'sarchMap.Makefile,AGENTS.md(original commit): make the test-raceflag architecture-conditional — the Go 1.23 toolchain has no race detector on riscv64.Makefile(follow-up commit): derive the guard with a make-nativeTEST_GOARCH := $(or $(GOARCH),$(shell go env GOARCH))filter so it also honorsmake GOARCH=riscv64 unit-test, and restore the trailing newline the original commit dropped.Test Plan
go build ./...,GOOS=linux GOARCH=riscv64 CGO_ENABLED=0 go build ./...,go vet ./..., gofmt clean,node --test scripts/install.test.js(32/32)UCB RISC-Vstatically-linked ELF;make GOARCH=riscv64 -n unit-testshowsgo testwithout-racewhile the default amd64 path keeps-race; the full npm install chain (download → SHA-256 → extract → run) was exercised on emulated riscv64 (QEMU + container)make unit-test: pre-existing local-load flake, unrelated to this change —internal/binding(TestResolveExecRef_*) andinternal/selfupdate(TestVerifyBinaryLookPath) time out (~10s) only under the full concurrent-racerun; each passes in isolation (~2s). This diff touches no Go code, so behavior is identical tomain; CI is the authoritative gate.Related Issues
N/A — re-homes PR #1297 (a PR, not a tracking issue); maintainer can close #1297 on merge.
Summary by CodeRabbit
New Features
Build / Packaging
Documentation