Skip to content

Commit

Permalink
fix: hack fix for contract tests on MacOS
Browse files Browse the repository at this point in the history
fixes #19802

Contract Tests are failing with missing symbols runtime error on `MacOS` after `golang` version was upgraded to 1.20
A simple hack fix such a case is to use `go 1.19` only to build the status-go library that is used specifically for these integration tests.
Its ugly but it works and unblocks devs from running tests locally.

- execute `make test-contract` on MacOS and it should not fail.

not needed since this impacts only the integration tests.

- macOS

status: ready
  • Loading branch information
siddarthkay committed May 10, 2024
1 parent a68b2f3 commit d55f6be
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
8 changes: 6 additions & 2 deletions modules/react-native-status/nodejs/status.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// DO NOT EDIT: code is autogenerated by go2nodebinding from Go code.
// https://github.com/divan/go2nodebinding
// This code has pieces that were autogenerated but is now managed manually
// Here lies the node bindings used for integration tests
// These are basically C calls to exported status-go functions
// Along 1 additional Poll function to get signals to work
// function names registered here in init() are used in various places
// ref -> status-mobile/src/tests/test_utils.cljs

#include <node.h>
#include <string>
Expand Down
11 changes: 6 additions & 5 deletions nix/status-go/library/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{ buildGoPackage
# object with source attributes
, meta, source}:

buildGoPackage {
{ stdenv, meta, source, buildGo119Package, buildGo120Package }:
let
# https://github.com/status-im/status-mobile/issues/19802
# only for Darwin to fix Integration Tests failing with missing symbols on go 1.20
buildGoPackageIntegrationTest = if stdenv.isDarwin then buildGo119Package else buildGo120Package;
in buildGoPackageIntegrationTest {
pname = source.repo;
version = "${source.cleanVersion}-${source.shortRev}";

Expand Down

0 comments on commit d55f6be

Please sign in to comment.