-
Notifications
You must be signed in to change notification settings - Fork 5
Pre-builds for more platforms / architectures #3
Comments
https://github.com/lovell/sharp/blob/main/install/libvips.js sharp is an interesting one where the script actually fetches from GitHub Releases. Its also rust with some libc requirements Here is where they actually upload the artifact when tagged: https://github.com/lovell/sharp/blob/main/.github/workflows/ci.yml#L97 |
On m1 Mac we needed to do some additional steps:
With out doing this.. this happens:
Guessing something to do with node being x86_64 vs node module detecting and compiling the arm64 Oddly though even with: yarn build:darwin:x64 we had to mv the index.node so this condition is hit: which I guess is generated at build time seemed to analyze appropriate architecture and load in the right one |
I just use old Mac and running I tried on x86 and M1 mac. both are the same. Tried on old yarn v1 it is ok. The exact issue is this package with yarn v2 and above. # This file contains the result of Yarn building a package (@turt2live/matrix-sdk-crypto-nodejs@npm:0.1.0-beta.10)
# Script name: postinstall
Internal Error: @turt2live/matrix-sdk-crypto-nodejs@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
at AF.getCandidates (/Users/aaa/Documents/code/bbb/.yarn/releases/yarn-3.1.0.cjs:437:4421)
at pd.getCandidates (/Users/aaa/Documents/code/bbb/.yarn/releases/yarn-3.1.0.cjs:432:5275)
at /Users/aaa/Documents/code/bbb/.yarn/releases/yarn-3.1.0.cjs:441:7674
at du (/Users/aaa/Documents/code/bbb/.yarn/releases/yarn-3.1.0.cjs:382:4003)
at R (/Users/aaa/Documents/code/bbb/.yarn/releases/yarn-3.1.0.cjs:441:7654)
|
Is your feature request related to a problem? Please describe.
Looks like currently there are pre-builds happening for linux via:
https://github.com/matrix-org/matrix-rust-sdk-bindings/blob/main/crates/matrix-sdk-crypto-nodejs/release/Dockerfile.linux#L34
But for others it utilizes a post install hook:
https://github.com/matrix-org/matrix-rust-sdk-bindings/blob/main/crates/matrix-sdk-crypto-nodejs/check-exists.js#L7
Which then means you need to have rust, cargo and numerous other dependencies installed.
Describe the solution you'd like
Looks like the current CI builds for Mac and linux. I'd propose utilizing the CI instead to do the build of the artifacts.
The hard part is need to then release to npm from the CI. Or.. upload as artifacts and make the post install fetch from those build artifacts if not present.
Honestly not sure on the best solution.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
In my particular case. The check-exists fails regardless because we utilize yarn workspaces. Something about having yarn workspace plugin configured causes the
yarn build:release
from inside the check-exists.js to fail with an error like:you can reproduce by cloning: https://github.com/RocketChat/Rocket.Chat on a Mac and doing
yarn add matrix-appservice-bridge
or directly this packageyarn add @turt2live/matrix-sdk-crypto-nodejs
.I believe its related to yarn workspaces as if I copy the .yarn folder and .yarnrc.yml to a new folder and try the same error happens.
Current work around is go into node_modules/@turt2live/matrix-sdk-crypto-nodejs and run
npm run build:debug
ornpm run build:release
The text was updated successfully, but these errors were encountered: