Skip to content

Conversation

@RetricSu
Copy link
Collaborator

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR makes the cpu-features package an optional dependency to improve compatibility with systems that lack native build tools (particularly Windows). The changes allow the CLI to gracefully fall back to portable CKB binaries when CPU feature detection is unavailable.

Key Changes

  • Moved cpu-features from a regular dependency to an optional dependency
  • Implemented graceful fallback using dynamic require() with try-catch error handling
  • Added documentation for Windows users about potential installation issues

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/node/install.ts Replaced static import with dynamic require() wrapped in try-catch; falls back to portable binary if cpu-features unavailable
package.json Moved cpu-features to optionalDependencies; removed from onlyBuiltDependencies and removed @types/cpu-features from devDependencies
pnpm-lock.yaml Updated lockfile to reflect cpu-features and its dependencies (buildcheck, nan) as optional
README.md Added note for Windows users about optional native module compilation and performance trade-offs
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@RetricSu
Copy link
Collaborator Author

@copilot open a new pull request to apply review suggestions on #344

Copy link
Contributor

Copilot AI commented Dec 30, 2025

@RetricSu I've opened a new pull request, #345, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits December 30, 2025 10:49
* Initial plan

* Apply review suggestions: add error logging and memoize isPortable

Co-authored-by: RetricSu <23436060+RetricSu@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: RetricSu <23436060+RetricSu@users.noreply.github.com>
@RetricSu RetricSu merged commit fbcec0c into develop Dec 30, 2025
2 checks passed
@RetricSu RetricSu deleted the fix-window-install-failed branch December 30, 2025 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants