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

Conversation

cknitt
Copy link
Member

@cknitt cknitt commented Jul 6, 2022

Fixes #5517 and tests rescript build with finished package on each platform.

(Adding

#include "caml/osdeps.h"

in jscomp/stubs/ext_basic_hash_stubs.c fixes compiler warnings and the crash in rescript build on Windows.)

@cknitt cknitt force-pushed the test-rescript-not-bsc branch 2 times, most recently from e96c3ab to ad5d1ed Compare July 7, 2022 11:55
@cknitt cknitt force-pushed the test-rescript-not-bsc branch from ad5d1ed to e02e3c7 Compare July 8, 2022 19:45
@cknitt cknitt changed the title Test running rescript in finished package Fix crash in "rescript build" and add test Jul 8, 2022
@cknitt cknitt changed the title Fix crash in "rescript build" and add test Fix crash in "rescript build" on Windows and add test Jul 8, 2022
@cknitt cknitt marked this pull request as ready for review July 8, 2022 20:16
@cknitt cknitt requested a review from cristianoc July 8, 2022 20:16
Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

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

Amazing find.

.github/workflows/ci.yml Show resolved Hide resolved
@@ -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?)

@cknitt cknitt merged commit 8694560 into rescript-lang:master Jul 9, 2022
@cknitt cknitt deleted the test-rescript-not-bsc branch July 9, 2022 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"rescript build" crashes on Windows
2 participants