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 c408534 commit dda85c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ in {
};
go = super.go_1_20;
clang = super.clang_15;
buildGo19Package = super.buildGo19Package;
buildGoPackage = super.buildGo120Package;
buildGoModule = super.buildGo120Module;
gomobile = (super.gomobile.overrideAttrs (old: {
Expand Down
12 changes: 7 additions & 5 deletions nix/status-go/library/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{ 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 dda85c1

Please sign in to comment.