fix: hack fix for contract tests on MacOS (#19965)

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
This commit is contained in:
Siddarth Kumar 2024-05-10 17:58:49 +05:30 committed by GitHub
parent a481a44c72
commit cb9a620f40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 7 deletions

View File

@ -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>

View File

@ -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}";