Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash in "rescript build" on Windows and add test #5516

Merged
merged 3 commits into from
Jul 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
1 change: 1 addition & 0 deletions jscomp/stubs/ext_basic_hash_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <string.h>
#include <stdint.h>
#include "caml/memory.h"
#include "caml/osdeps.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any idea of what happened?
Was this removed or was it never there?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 9.1.4, this wasn't there either, but

  ret = CAML_SYS_STAT(p, &st);

was used instead of

  ret = stat_os(p, &st);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Now CAML_SYS_STAT does not exist anymore, this was probably an OCaml 4.06 thing?)

#include "caml/signals.h"
#include "caml/misc.h"
#include <sys/stat.h>
Expand Down
16 changes: 16 additions & 0 deletions packages/test/bsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "rescript-test",
"sources": [
{
"dir": "src",
"subdirs": true
}
],
"package-specs": [
{
"module": "es6",
"in-source": true
}
],
"suffix": ".bs.js"
}
5 changes: 1 addition & 4 deletions packages/test/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"name": "rescript-test",
"version": "0.0.0",
"scripts": {
"test": "bsc Test.res"
}
"version": "0.0.0"
}
File renamed without changes.