Repository navigation
Move more macOS hardware superclasses to oshi-common - #3148
Conversation
…n; add JNA suffix to MacDisplay and MacGpuStats (#3147)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
📜 Recent review details🧰 Additional context used🧠 Learnings (10)📓 Common learnings📚 Learning: 2026-04-06T04:45:47.644ZApplied to files:
📚 Learning: 2026-04-08T00:58:10.736ZApplied to files:
📚 Learning: 2026-04-03T02:07:47.621ZApplied to files:
📚 Learning: 2026-04-06T21:48:11.921ZApplied to files:
📚 Learning: 2026-04-11T05:51:49.185ZApplied to files:
📚 Learning: 2026-03-29T20:01:06.452ZApplied to files:
📚 Learning: 2026-04-03T02:07:49.467ZApplied to files:
📚 Learning: 2026-04-06T22:30:07.083ZApplied to files:
📚 Learning: 2026-04-03T18:44:48.200ZApplied to files:
🔇 Additional comments (11)
📝 WalkthroughWalkthroughThis PR introduces abstract base classes for macOS network and power source components into oshi-common, then refactors existing JNA and FFM implementations to extend these new common classes. Several concrete implementation classes are also renamed for consistency (e.g., Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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 @@
## master #3148 +/- ##
============================================
+ Coverage 61.39% 62.12% +0.72%
Complexity 12 12
============================================
Files 39 39
Lines 2329 2329
Branches 407 407
============================================
+ Hits 1430 1447 +17
+ Misses 783 771 -12
+ Partials 116 111 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
* Move macOS MacCentralProcessor, MacFirmware, and MacHWDiskStore superclasses to oshi-common; add JNA suffix to remaining mac hardware classes (#3148) * Fix cpufamily fallback for M4+ Macs, null-safe partitionList, and exception-safe IOKit iteration in MacFirmwareJNA
Continues the macOS hardware migration to oshi-common
Split into superclass (oshi-common) + JNA/FFM subclasses
MacNetworkIFMacNetworkIFJNAMacNetworkIFFMMacPowerSourceMacPowerSourceJNAMacPowerSourceFFMMacNetworkIFbase class holds 11 fields, 11 getters, and 11 protected setters. Subclasses providequeryIfDisplayName(native SystemConfiguration calls),getNetworks,updateAttributes, andupdateNetworkStats(which depend onNetStatin oshi-core).MacPowerSourcebase class is a thin constructor pass-through toAbstractPowerSource, following the same pattern asLinuxPowerSourceandWindowsPowerSource.JNA renames (no split — too little shared code)
MacDisplayMacDisplayJNAMacGpuStatsMacGpuStatsJNAOther changes
MacHardwareAbstractionLayerJNA: Updated references to renamed classesMacGraphicsCardJNA: UpdatedMacGpuStats→MacGpuStatsJNAMacPowerSourceFFM: Now extends commonMacPowerSourceinstead ofAbstractPowerSourceSummary by CodeRabbit
Release Notes