Skip to content

Commit

Permalink
skip incompatible services on ARM64 yarn services
Browse files Browse the repository at this point in the history
Some libraries relying on native modules will not compile on ARM64:

* couchbase is missing an ARM64 `config` directory [1]
* oracledb still does not support it because first party client libraries
  are not available [2]
* grpc is EoL and does not support ARM64 [3]

We skip these services such that `yarn services` still succeeds and
installs all other dependencies.

[1] couchbase/couchnode#106
[2] oracle/node-oracledb#1349
[3] grpc/grpc-node#1880 (comment)
  • Loading branch information
Jordi Bertran de Balanda committed Mar 3, 2023
1 parent c84e190 commit d7b65c1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/install_plugin_modules.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict'

const fs = require('fs')
const os = require('node:os')
const path = require('path')
const crypto = require('crypto')
const semver = require('semver')
Expand All @@ -11,6 +12,7 @@ const externals = require('../packages/dd-trace/test/plugins/externals')

const requirePackageJsonPath = require.resolve('../packages/dd-trace/src/require-package-json')

const excludeList = os.arch() === 'arm64' ? ['couchbase', 'grpc', 'oracledb'] : []
const workspaces = new Set()
const versionLists = {}
const deps = {}
Expand Down Expand Up @@ -42,6 +44,8 @@ async function run () {
assertFolder()
await assertVersions()
assertWorkspace()
// Some native addon packages rely on libraries that are not supported on ARM64
excludeList.forEach(pkg => delete workspaces[pkg])
install()
}

Expand Down Expand Up @@ -197,7 +201,7 @@ function install () {

function addFolder (name, version) {
const basename = [name, version].filter(val => val).join('@')
workspaces.add(basename)
if (!excludeList.includes(name)) workspaces.add(basename)
}

function folder (name, version) {
Expand Down

0 comments on commit d7b65c1

Please sign in to comment.