Skip to content

Fix code to let Erlang server codegen work #7319

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

Open
wants to merge 4 commits into
base: 3.0.0
Choose a base branch
from

Conversation

x0id
Copy link

@x0id x0id commented Jan 5, 2018

Trying to gen erlang-server v3 I found it just not working due to numerous problems.

  1. Some legitimate {{ and }} Erlang braces wrongly interpreted as mustaches in templates (it would be wise to select custom delimiter for Erlang templates from the beginning)

  2. It seems that templates were initially made for jmustache extensions, but for some reason default template machine used is handlebars, so instead of -last one should use @last etc.

  3. Somehow isQueryParam was not working, but I got it to work using vendorExtensions.x-is-query-param instead. Not sure if this is right solution though.

  4. Intentionally or not, but hasMore was not properly populated, so I quick-fixed it using {{^@last}} in templates instead.

Finally I did manage to generate and compile some code from the v3 spec, but have not yet chance to review and test it thoroughly.

Please let me know if my fixes are not following design ideas or guidelines, or consider to apply otherwise. Thanks.

@x0id
Copy link
Author

x0id commented Jan 5, 2018

Note that continues integration check failed due to last commit to 3.0.0 done couple hours ago. My fixes didn't break any tests...

@wing328 wing328 added this to the v3.0.0 milestone Jan 7, 2018
@wing328
Copy link
Contributor

wing328 commented Jan 7, 2018

@x0id did you check the latest stable version 2.3.0 to see if there are similar issues with the Erlang server generator?

@x0id
Copy link
Author

x0id commented Jan 7, 2018

@wing328 no, when I played with v2.3 a month ago or so I didn't notice similar issues.

@ten0s
Copy link

ten0s commented Jan 17, 2018

Please review @tsloughter

@tsloughter
Copy link
Contributor

Thanks, I'll need to compare this with fixes I have that I haven't made a PR for yet. Will get back to you soon.

@tsloughter
Copy link
Contributor

@x0id I have an open PR that should get merged today, then this should be rebased on it. Will let you know when it is merged.

@wing328
Copy link
Contributor

wing328 commented Jan 22, 2018

#7257 by @tsloughter has been merged into master.

@ten0s
Copy link

ten0s commented Jan 22, 2018

@tsloughter, your PR is about erlang-client 2.x , but this is erlang-server 3.0.0.

@wing328
Copy link
Contributor

wing328 commented Jan 22, 2018

@ten0s enhancements in the master will be sync'd to 3.0.0 branch later. I believe @HugoMario will do that later when he has time.

@frantuma frantuma force-pushed the 3.0.0 branch 6 times, most recently from c824674 to 7e5274a Compare June 23, 2025 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants