Skip to content

Commit

Permalink
fix(native): Improve support detection (disable on darwin-aaarch64)
Browse files Browse the repository at this point in the history
  • Loading branch information
ovr committed Jun 17, 2023
1 parent d3c06a7 commit 1e7756c
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion packages/cubejs-backend-shared/src/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,28 @@ export function isNativeSupported(): IsNativeSupportedResult {
reason: 'You are using linux distro with Musl which is not supported'
};
}

return true;

Check warning on line 72 in packages/cubejs-backend-shared/src/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cubejs-backend-shared/src/platform.ts#L72

Added line #L72 was not covered by tests
}

if (process.platform === 'win32') {
return true;

Check warning on line 76 in packages/cubejs-backend-shared/src/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cubejs-backend-shared/src/platform.ts#L76

Added line #L76 was not covered by tests
}

return true;
// TODO(ovr): https://github.com/cube-js/cube/pull/6093
if (process.platform === 'darwin' && process.arch === 'x64') {
return true;

Check warning on line 81 in packages/cubejs-backend-shared/src/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cubejs-backend-shared/src/platform.ts#L81

Added line #L81 was not covered by tests
}

displayCLIWarningOnce(

Check warning on line 84 in packages/cubejs-backend-shared/src/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cubejs-backend-shared/src/platform.ts#L84

Added line #L84 was not covered by tests
'is-native-supported',
`Unable to load native extension. You are using a ${process.platform}-${process.arch} platform which is not supported. Read more: ` +
'https://github.com/cube-js/cube/blob/master/packages/cubejs-backend-native/README.md#supported-architectures-and-platforms'
);

return {

Check warning on line 90 in packages/cubejs-backend-shared/src/platform.ts

View check run for this annotation

Codecov / codecov/patch

packages/cubejs-backend-shared/src/platform.ts#L90

Added line #L90 was not covered by tests
reason: `You are using ${process.platform}-${process.arch} platform which is not supported`
};
}

export enum LibraryExistsResult {
Expand Down

0 comments on commit 1e7756c

Please sign in to comment.