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

Prevent crash on sigil_prefix and sigil_suffix (OTP 27) #83

Merged
merged 7 commits into from
Jul 1, 2024

Conversation

paulo-ferraz-oliveira
Copy link
Collaborator

@paulo-ferraz-oliveira paulo-ferraz-oliveira commented Jun 29, 2024

Motivation

rebar3_hank crashes when trying to analyse a file that contains

~"""
This is a string
"""

Missing tests

I can't seem to be able to create a test for this. It's possible there's some type of pre-processing on the input. Please advise.

Further considerations

We're using rebar3_hank in this lib., but that's also crashing due to this lib. We could create a task to re-incorporate it later, if you think it worth it. The same can be done for the formatter, since that's also crashing, even with the -format ignore that I just removed.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

paulo-ferraz-oliveira commented Jun 29, 2024

I was able to conjure up a test 🧙‍♂️, though this is a very strange occurrence (it's late so I guess I must be sleepy). Without the ?assertMatch there's no issue (I got this from our failing test suite). With it there's an issue. I could probably simply change our test and move on, but it seems more appropriate to update katana_code.

Before it start analysis hank already tries to read
files, and is crashing at that moment

Since the "wholly ignored" section of the code
comes later that the initial analysis that crashes
we're left with not using Hank for the time being
@@ -8,7 +8,7 @@
{profiles,
[{test, [{cover_enabled, true}, {cover_opts, [verbose]}, {ct_opts, [{verbose, true}]}]}]}.

{alias, [{test, [compile, format, hank, lint, xref, dialyzer, ct, cover, ex_doc]}]}.
{alias, [{test, [compile, lint, xref, dialyzer, ct, cover, ex_doc]}]}.
Copy link
Member

Choose a reason for hiding this comment

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

We should definitely write up a ticket to recover these 2 tools once they incorporate the new katana version we'll create with these changes.

@elbrujohalcon elbrujohalcon merged commit f897f5c into inaka:main Jul 1, 2024
4 checks passed
@paulo-ferraz-oliveira paulo-ferraz-oliveira deleted the fix/for-otp27 branch July 1, 2024 21:38
@paulo-ferraz-oliveira
Copy link
Collaborator Author

Any chance this gets released soon so we can update tools depending on katana_code? Thanks.

@elbrujohalcon
Copy link
Member

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.

2 participants