improve version config scheme
goertzenator opened this issue · 3 comments
goertzenator commented
After PR #6, it is now evident that the version selection scheme in gen_api.erl is going to start looking ugly before too many more NIF revisions.
Quick ideas to think more about later when I have time...
- Use
when X>Y
logic to select APIs. - Add an intermediate layer that explodes a NIF version number into a set of flags for selecting APIs.
tsloughter commented
I was about to point out 18.2.1 fails because the NIF version is 2.9 :).
Can I send a patch that just checks Version is > 2.7 for now?
tatsuya6502 commented
@tsloughter Just FYI, You can take my code from PR #6 for OTP 18.2.x. It does not do when X>Y
but when X=:=W; X=:=Y; X=:=Z
. (I followed the conversion in the current code base.)
tsloughter commented
Oh, I didn't notice #6 had that. I simply quickly forked and did >= {2.7}
.