You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR intoduces long-awaited linux-arm64 builds!
A few notes on the PR:
Dugite was updated from 2.5.0 to 2.5.1. There should be no incompatibilities (see UPD2 below) between this versions but 2.5.1 has linux-arm64 support. Please kindly check if everything works as expected before merging this upgrade to upstream.
Since AppImage builder has hardcoded x64 architecture specified in build settings, I have commented-out moving AppImage to builds directory. After (if?) it will be fixed it's possible to just uncomment related line and everything should work just fine. Currently x64 AppImage may work on arm64 machine with help of something like Box64 to initially unpack the image and start native binaries after unpacking.
Yarn doesn't have options like --os and --architecture (which npm has) to specify which architecture to select when installing optional dependencies. Instead it has --ignore-platform option. But when using it on the whole package, it will also tell Yarn to (try to) install ALL the optional packages, for all the architectures and it will have significant impact on the resulting archive size and dependency installation time. That's why I'm using a little bit hacky approach - creating a temporary dir and installing the only required package for the only architecture we need and then moving it to original project's node_modules dir.
Binaries was tested on ThinkPad X13s laptop with Manjaro-ARM on board (Snapdragon 8cx Gen 3, 16GB RAM) but should work fine on any other ARM64 device.
Yarn doesn't have options like --os and --architecture (which npm has) to specify which architecture to select when installing optional dependencies. Instead it has --ignore-platform option. But when using it on the whole package, it will also tell Yarn to (try to) install ALL the optional packages, for all the architectures and it will have significant impact on the resulting archive size and dependency installation time. That's why I'm using a little bit hacky approach - creating a temporary dir and installing the only required package for the only architecture we need and then moving it to original project's node_modules dir.
@theofficialgmannpm_config_arch has different purpose. Please read my description carefully and check the PR code: I already use this env to support cross-platform binary downloads. Please also note that the env might be ignored by some packages at all.
Also there is another approach to provide binary dependencies - via set of optionalDependencies like, for example, esbuild or @logseq/rsapi does. And this is where --os and --architecture npm flags comes into play. If you don't use such packages, you might just stick with npm_config_arch but Logseq does (at least @logseq/rsapi). Please check the PR code for details. You can also fork the repo and try to just use npm_config_arch only, removing the step with temporary installation of required binary package and you will see what I'm talking about — you will get rsapi binaries for x64 instead of arm64 (everything is fine with dugite binaries though - they're installed via postinstall script and the postinstall script respects npm_config_arch). Feel free to try it by yourself 😊
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR intoduces long-awaited linux-arm64 builds!
A few notes on the PR:
--osand--architecture(which npm has) to specify which architecture to select when installing optional dependencies. Instead it has--ignore-platformoption. But when using it on the whole package, it will also tell Yarn to (try to) install ALL the optional packages, for all the architectures and it will have significant impact on the resulting archive size and dependency installation time. That's why I'm using a little bit hacky approach - creating a temporary dir and installing the only required package for the only architecture we need and then moving it to original project's node_modules dir.Binaries was tested on ThinkPad X13s laptop with Manjaro-ARM on board (Snapdragon 8cx Gen 3, 16GB RAM) but should work fine on any other ARM64 device.
Resolves #6623
UPD: Here's also a release created so you can see that everything works as expected.
UPD2: Looks like there is no changes in dugite API between v2.5.0 and v2.5.1 so everything is expected to work fine.