Fix linux-arm RID: rename NuGet package to linux-arm64, keep shim for compatibility - #1871
Conversation
…tibility The native binary has always been built for ARM64 (AArch64), but the NuGet package path was runtimes/linux-arm/native/ instead of runtimes/linux-arm64/native/. These are siblings in the .NET RID graph, so .NET never automatically copied the native library on linux-arm64 targets. - Add OpenCvSharp4.runtime.linux-arm64 with correct runtimes/linux-arm64/native/ path - Convert OpenCvSharp4.runtime.linux-arm to a compatibility shim that depends on linux-arm64 - Rename workflow linux-arm.yml -> linux-arm64.yml and update artifact names - Update publish_nuget.yml, README.md, and nuget/README.runtime.md Closes #1870 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR adds a new OpenCvSharp4.runtime.linux-arm64 NuGet package, converts the existing linux-arm package into a deprecated compatibility shim that references linux-arm64, updates CI workflows to build/publish ARM64 artifacts and cache keys, and updates README documentation accordingly. ChangesLinux ARM64 Package Migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@nuget/README.runtime.md`:
- Around line 29-31: Remove the empty line between the two consecutive
blockquote notes in the README.runtime.md so the two "Note:" blockquotes are
adjacent (this resolves markdownlint MD028); specifically, delete the blank line
separating the blockquote mentioning OpenCvSharp4.official.runtime.* and the
blockquote mentioning OpenCvSharp4.runtime.linux-arm ->
OpenCvSharp4.runtime.linux-arm64 so both blockquotes form a single back-to-back
block without intervening blank lines.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 37915c69-6afc-4eb1-a3c4-fa28f317385a
📒 Files selected for processing (6)
.github/workflows/linux-arm64.yml.github/workflows/publish_nuget.ymlREADME.mdnuget/OpenCvSharp4.runtime.linux-arm.csprojnuget/OpenCvSharp4.runtime.linux-arm64.csprojnuget/README.runtime.md
…-arm64 OpenCvSharp4.runtime.linux-arm64 does not yet exist on nuget.org, so dotnet pack for the shim package fails during restore. Since the project has NoBuild=true and only needs the dependency written to the nuspec, --no-restore is sufficient. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary
Fixes #1870.
The
OpenCvSharp4.runtime.linux-armNuGet package placed native binaries underruntimes/linux-arm/native/, but the CI has always built on ARM64 hardware(
ubuntu-24.04-arm) and tested with--runtime linux-arm64. In the .NET RID graph,linux-arm(32-bit ARMv7) andlinux-arm64(64-bit AArch64) are siblings, notparent/child, so .NET never automatically resolves
runtimes/linux-arm/native/whenrunning on
linux-arm64targets — the native library was silently not copied.Changes
nuget/OpenCvSharp4.runtime.linux-arm64.csproj— New package with the correctruntimes/linux-arm64/native/path.nuget/OpenCvSharp4.runtime.linux-arm.csproj— Converted to a compatibility shim: native.soremoved, replaced with aPackageReferencedependency onlinux-arm64. Existing users who reference the old package name will automatically get the real library..github/workflows/linux-arm.yml→linux-arm64.yml— Renamed and updated to pack both the newlinux-arm64package and the shim. Artifact name changed toartifacts_linux_arm64..github/workflows/publish_nuget.yml— Updated workflow and artifact references.nuget/README.runtime.md/README.md— Package table updated; deprecation note added forlinux-arm.Reviewer notes
linux-arm64at the same version, so existing projects require no code changes — NuGet will resolve the correct native library automatically.linux-arm64.ymlinstead oflinux-arm.yml; the existing cache will be invalidated once on the first run after merge, which is expected and harmless.Summary by CodeRabbit
New Features
Documentation