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

Fix #263: Support OTP24 #300

Merged
merged 5 commits into from
Apr 11, 2022
Merged

Fix #263: Support OTP24 #300

merged 5 commits into from
Apr 11, 2022

Conversation

elbrujohalcon
Copy link
Collaborator

Fix #263: Support OTP24

@elbrujohalcon elbrujohalcon added this to the 1.1.0 milestone Apr 11, 2022
Comment on lines +512 to +515
{_, PrecR} = preop_prec('catch'),
D = lay(erl_syntax:catch_expr_body(Node), set_prec(Ctxt, PrecR)),
D1 = follow(text("catch"), D, Ctxt#ctxt.break_indent),
maybe_parentheses(D1, Prec, Ctxt);
maybe_parentheses(D1, 0, Ctxt);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I basically preserved OTP23 and prior value here. Using the one in OTP24 would work, too, but nobody actually complained about the extra parentheses and maintaining a formatter that formats the code consistently is better than maintaining one that produces different output depending on the OTP version with which it was compiled.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Once we stop supporting OTP23… we can revisit this.

@elbrujohalcon elbrujohalcon merged commit aa42852 into main Apr 11, 2022
@elbrujohalcon elbrujohalcon deleted the RTI-11441-OTP24 branch April 11, 2022 14:57
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.

Support OTP 24
2 participants