From 31e4b6f20bbba3d6c1c1653fd3bd28c5337143b3 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Wed, 6 Jul 2022 07:26:35 +0200 Subject: [PATCH 1/3] Test running rescript in finished package --- .github/workflows/ci.yml | 3 ++- packages/test/bsconfig.json | 16 ++++++++++++++++ packages/test/package.json | 5 +---- packages/test/{ => src}/Test.res | 0 4 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 packages/test/bsconfig.json rename packages/test/{ => src}/Test.res (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 799c5a8c8b..7c34525448 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -179,5 +179,6 @@ jobs: working-directory: packages/test - name: Test installation - run: npm test + run: npx rescript -h && npx rescript build && cat src/Test.bs.js + shell: bash working-directory: packages/test diff --git a/packages/test/bsconfig.json b/packages/test/bsconfig.json new file mode 100644 index 0000000000..3ae42bf353 --- /dev/null +++ b/packages/test/bsconfig.json @@ -0,0 +1,16 @@ +{ + "name": "rescript-test", + "sources": [ + { + "dir": "src", + "subdirs": true + } + ], + "package-specs": [ + { + "module": "es6", + "in-source": true + } + ], + "suffix": ".bs.js" +} diff --git a/packages/test/package.json b/packages/test/package.json index a267d0e4f2..31130847f5 100644 --- a/packages/test/package.json +++ b/packages/test/package.json @@ -1,7 +1,4 @@ { "name": "rescript-test", - "version": "0.0.0", - "scripts": { - "test": "bsc Test.res" - } + "version": "0.0.0" } diff --git a/packages/test/Test.res b/packages/test/src/Test.res similarity index 100% rename from packages/test/Test.res rename to packages/test/src/Test.res From e02e3c767aab2b16ecfe75424174225718bfd43d Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Thu, 7 Jul 2022 13:41:32 +0200 Subject: [PATCH 2/3] Fix crash by adding missing #include "caml/osdeps.h" --- jscomp/stubs/ext_basic_hash_stubs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/jscomp/stubs/ext_basic_hash_stubs.c b/jscomp/stubs/ext_basic_hash_stubs.c index ae451904ce..34e4133335 100644 --- a/jscomp/stubs/ext_basic_hash_stubs.c +++ b/jscomp/stubs/ext_basic_hash_stubs.c @@ -3,6 +3,7 @@ #include #include #include "caml/memory.h" +#include "caml/osdeps.h" #include "caml/signals.h" #include "caml/misc.h" #include From 38485af8c65571594e56f85e2b418ab77ec74594 Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Sat, 9 Jul 2022 07:02:28 +0200 Subject: [PATCH 3/3] Rename test job to installationTest --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c34525448..4782088fcd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -149,7 +149,7 @@ jobs: ${{ steps.get_package_info.outputs.rescript_package }} ${{ steps.get_package_info.outputs.stdlib_package }} - test: + installationTest: needs: package strategy: fail-fast: false