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

Add support for OTP-22 #212

Merged
merged 6 commits into from
May 31, 2019
Merged

Add support for OTP-22 #212

merged 6 commits into from
May 31, 2019

Conversation

filmor
Copy link
Member

@filmor filmor commented May 21, 2019

Fixes #211.

erl_nif_sys/gen_api.erl Outdated Show resolved Hide resolved
@filmor
Copy link
Member Author

filmor commented May 21, 2019

I'll have a look into the failing tests, most of them seem to relate to an issue with copied binaries.

@filmor
Copy link
Member Author

filmor commented May 21, 2019

Actually, I see those exact same panics on master, and they have been there forever, so the issue was not introduced in this PR. Are those intentionally being ignored?

I'll have a look at the failing resource cleanup test.

Apparently we have to yield explicitly after triggering the GC to
actually see all resources being released on OTP-22.
@filmor
Copy link
Member Author

filmor commented May 22, 2019

Just for future reference, I haven't bisected it, but I think the responsible merge is this one: erlang/otp@bc3de71, a fix for bug https://bugs.erlang.org/browse/ERL-863. In particular commit erlang/otp@7a0a52a, which changes how resource destructors are scheduled.

Copy link
Member

@scrogson scrogson left a comment

Choose a reason for hiding this comment

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

@filmor Thank you so much for putting this together! This all looks good to me. But I'd like @hansihe to have a final look over.

nif_2_14, nif_2_15];
version_opts(Ver) ->
io:format(
"This OTP release uses the unsupported Erlang NIF version ~p.\n\n"
Copy link
Member

Choose a reason for hiding this comment

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

s/the/an

This OTP release uses an unsupported...

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, the message contains the version, so it reads This OTP release uses the unsupported Erlang NIF version 2.15 ;)

end ++
case proplists:get_bool(nif_2_15, Opts) of
true -> [
{"ErlNifTermType", "enif_term_type", "env: *mut ErlNifEnv, term: *const ERL_NIF_TERM"},
Copy link
Member

Choose a reason for hiding this comment

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

This is nice!

@scrogson scrogson requested a review from hansihe May 24, 2019 14:26
@hansihe hansihe merged commit 7f40f98 into rusterlium:master May 31, 2019
@hansihe
Copy link
Member

hansihe commented May 31, 2019

Thanks!

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.

Add support for OTP 22
4 participants