Skip to content
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

fix: add missing arch to nativePrebuildInstall cache #9

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

segevfiner
Copy link

@segevfiner segevfiner commented Dec 5, 2023

Otherwise when packaging for multiple architectures, pkg might end up picking up a cached binary for a different arch.

In general that code is a bit finicky and it will only really work for packages that actually use prebuild-install, and currently also fails for any prebuild napi package, as you need to pass -r/--runtime napi to prebuild-install for that to work, which is a different bug.

I'm currently just doing my own workarounds for native packages that this doesn't handle (e.g. pnpm rebuild, or pnpm install --force, before invoking pkg per target, rather than for all targets at once. It would have been much nicer if there was a more general way to handle this or to give per package hooks to pkg to handle packages with special requirements.

Contributed on behalf of Swimm

Otherwise when packaging for multiple architectures, pkg might end up
picking up a cached binary for a different arch.
@robertsLando robertsLando changed the title Add missing arch to nativePrebuildInstall cache fix: add missing arch to nativePrebuildInstall cache Dec 5, 2023
Copy link
Member

@robertsLando robertsLando left a comment

Choose a reason for hiding this comment

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

Sorry @segevfiner but I totally missed your PR. LGTM

@robertsLando robertsLando merged commit cd89e83 into yao-pkg:main Dec 5, 2023
6 checks passed
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