joedevivo / chatterbox

HTTP/2 Server for Erlang. Boy, that guy was a real chatterbox waddn't he? I didn't think he was ever going to stop with the story.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't compile for erlang versions older than 17

slezakattack opened this issue · comments

Hello, I'm on Erlang R16B03 and was not able to compile this project. I found a fix and would like to submit a fix. What is the best way to go about this?

The issue comes from src/http2_connection.erl. Within the connection record, settings_sent is identified as a queue:queue() but this syntax is only available for 17 and later. I have a fix that should work for both 17 and older versions.

Is that all it takes? I know I'm using ssl:negotiated_protocol/1 for ALPN, which wasn't available until 18.0, but i suppose that would be a runtime error. It it makes your life easier, go ahead and submit the compilation fix, but I don't think that's where your problems will end.

Hey Joe, thank you for the response. Yeah, I think it's a bit naive of me to think the problem ends there... I don't think the readme specified what version of Erlang this runs on (or at least has been tested in). Is it only compatible for 18?

As of now, yes.

I think 17 compatibility will be easier to achieve than R16 because as far as I know, that problem with ssl:negotiated_protocol/1 exists, but it can be switched to ssl:next_negotiated_protocol/1 and it will work, just using NPN instead of ALPN. I was never really motivated to ensure backwards compatibility with 17, but that should be all it takes.

There's definitely some Maps in here now, so support for R16 isn't going to happen. Right now, it's only compatible with 18, although if there's a strong case for supporting 17, it should be possible, but won't work as is.

We can close this issue. I just decided to upgrade to 18.3. ;-)