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

OCaml 5.0 support #13

Open
dannywillems opened this issue May 5, 2023 · 2 comments
Open

OCaml 5.0 support #13

dannywillems opened this issue May 5, 2023 · 2 comments
Assignees

Comments

@dannywillems
Copy link
Member

Currently, when adding 5.0.0 in the CI, we get:

 warning: vendor/boxroot/boxroot.c: In function ‘pool_remove’:
warning: vendor/boxroot/boxroot.c:360:31: warning: unused variable ‘cl’ [-Wunused-variable]
warning:   360 |   FOREACH_GLOBAL_RING(global, cl, {
warning:       |                               ^~
warning: vendor/boxroot/boxroot.c:164:13: note: in definition of macro ‘FOREACH_GLOBAL_RING’
warning:   164 |       class cl = global_ring_classes[b__i - b__st];                     \
warning:       |             ^~
warning: vendor/boxroot/boxroot.c: In function ‘free_all_chunks’:
warning: vendor/boxroot/boxroot.c:375:31: warning: unused variable ‘cl’ [-Wunused-variable]
warning:   375 |   FOREACH_GLOBAL_RING(global, cl, { *global = NULL; });
warning:       |                               ^~
warning: vendor/boxroot/boxroot.c:164:13: note: in definition of macro ‘FOREACH_GLOBAL_RING’
warning:   164 |       class cl = global_ring_classes[b__i - b__st];                     \
warning:       |             ^~
warning: vendor/boxroot/boxroot.c: In function ‘promotion_occupancy’:
warning: vendor/boxroot/boxroot.c:521:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
warning:   521 |   if (threshold <= LOW_COUNT_THRESHOLD) return LOW;
warning:       |                 ^~
warning: vendor/boxroot/boxroot.c:522:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
warning:   522 |   if (threshold <= HIGH_COUNT_THRESHOLD) return HIGH;
warning:       |                 ^~
warning: vendor/boxroot/boxroot.c: In function ‘pool_reclassify’:
warning: vendor/boxroot/boxroot.c:544:3: warning: enumeration value ‘NO_CHANGE’ not handled in switch [-Wswitch]
warning:   544 |   switch (occ) {
warning:       |   ^~~~~~
warning: vendor/boxroot/boxroot.c: In function ‘scan_pool’:
warning: vendor/boxroot/boxroot.c:821:14: warning: passing argument 1 of ‘action’ makes pointer from integer without a cast [-Wint-conversion]
warning:   821 |       action(v, (value *)current);
warning:       |              ^
warning:       |              |
warning:       |              value {aka long int}
warning: vendor/boxroot/boxroot.c:821:14: note: expected ‘void *’ but argument is of type ‘value’ {aka ‘long int’}
warning: vendor/boxroot/boxroot.c:821:17: warning: passing argument 2 of ‘action’ makes integer from pointer without a cast [-Wint-conversion]
warning:   821 |       action(v, (value *)current);
warning:       |                 ^~~~~~~~~~~~~~~~
warning:       |                 |
warning:       |                 value * {aka long int *}
warning: vendor/boxroot/boxroot.c:821:17: note: expected ‘value’ {aka ‘long int’} but argument is of type ‘value *’ {aka ‘long int *’}
warning: vendor/boxroot/boxroot.c:821:7: error: too few arguments to function ‘action’
warning:   821 |       action(v, (value *)current);
warning:       |       ^~~~~~
warning: vendor/boxroot/boxroot.c: In function ‘boxroot_setup’:
warning: vendor/boxroot/boxroot.c:1043:31: warning: unused variable ‘cl’ [-Wunused-variable]
warning:  1043 |   FOREACH_GLOBAL_RING(global, cl, { *global = NULL; });
warning:       |                               ^~
warning: vendor/boxroot/boxroot.c:164:13: note: in definition of macro ‘FOREACH_GLOBAL_RING’
warning:   164 |       class cl = global_ring_classes[b__i - b__st];                     \
warning:       |             ^~
warning: vendor/boxroot/boxroot.c:1045:24: warning: assignment to ‘void (*)(void (*)(void *, value,  volatile value *))’ {aka ‘void (*)(void (*)(void *, long int,  volatile long int *))’} from incompatible pointer type ‘scan_roots_hook’ {aka ‘void (*)(void (*)(void *, long int,  volatile long int *), scanning_action_flags,  void *, caml_domain_state *)’} [-Wincompatible-pointer-types]
warning:  1045 |   prev_scan_roots_hook = caml_scan_roots_hook;
warning:       |                        ^
warning: vendor/boxroot/boxroot.c:1049:24: warning: assignment to ‘scan_roots_hook’ {aka ‘void (*)(void (*)(void *, long int,  volatile long int *), scanning_action_flags,  void *, caml_domain_state *)’} from incompatible pointer type ‘void (*)(void (*)(void *, value,  volatile value *))’ {aka ‘void (*)(void (*)(void *, long int,  volatile long int *))’} [-Wincompatible-pointer-types]
warning:  1049 |   caml_scan_roots_hook = scanning_callback;
warning:       |                        ^
warning: vendor/boxroot/boxroot.c: In function ‘boxroot_teardown’:
warning: vendor/boxroot/boxroot.c:1061:24: warning: assignment to ‘scan_roots_hook’ {aka ‘void (*)(void (*)(void *, long int,  volatile long int *), scanning_action_flags,  void *, caml_domain_state *)’} from incompatible pointer type ‘void (*)(void (*)(void *, value,  volatile value *))’ {aka ‘void (*)(void (*)(void *, long int,  volatile long int *))’} [-Wincompatible-pointer-types]
warning:  1061 |   caml_scan_roots_hook = prev_scan_roots_hook;
warning:       |                        ^

error: failed to run custom build command for `ocaml-boxroot-sys v0.2.0`

Might be related to ocaml-boxroot version.
It is not a priority right now as Mina uses OCaml 4.14.

@dannywillems
Copy link
Member Author

Keeping an eye on zshipko/ocaml-rs#127

@dannywillems dannywillems self-assigned this May 9, 2023
@dannywillems
Copy link
Member Author

And also related to zshipko/ocaml-rs#125

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

No branches or pull requests

1 participant