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

v1.4.41 regression: module :string_lexer is not available #468

Closed
tercenya opened this issue Sep 19, 2023 · 18 comments
Closed

v1.4.41 regression: module :string_lexer is not available #468

tercenya opened this issue Sep 19, 2023 · 18 comments
Assignees

Comments

@tercenya
Copy link

With v1.4.41, I get

** (exit) an exception was raised:
    ** (UndefinedFunctionError) function :string_lexer.string/1 is undefined (module :string_lexer is not available)
        :string_lexer.string(~c"this is an example string")
        (earmark 1.4.41) lib/earmark_parser/helpers/leex_helpers.ex:20: EarmarkParser.Helpers.LeexHelpers.tokenize/2
        (earmark 1.4.41) lib/earmark_parser/helpers/lookahead_helpers.ex:17: EarmarkParser.Helpers.LookaheadHelpers.opens_inline_code/1
        (earmark 1.4.41) lib/earmark_parser/parser.ex:658: EarmarkParser.Parser._inline_or_text?/2
        (earmark 1.4.41) lib/earmark_parser/parser.ex:486: EarmarkParser.Parser._consolidate_para/4
        (earmark 1.4.41) lib/earmark_parser/parser.ex:215: EarmarkParser.Parser._parse/4
        (earmark 1.4.41) lib/earmark_parser/parser.ex:68: EarmarkParser.Parser.lines_to_blocks/3
        (earmark 1.4.41) lib/earmark_parser/parser.ex:60: EarmarkParser.Parser.parse_lines/3
        (earmark 1.4.41) lib/earmark_parser/parser.ex:26: EarmarkParser.Parser.parse_markdown/2
        (earmark 1.4.41) lib/earmark_parser.ex:621: EarmarkParser._as_ast/2
        (earmark 1.4.41) lib/earmark_parser.ex:592: EarmarkParser.as_ast/2
        (earmark 1.4.41) lib/earmark/transform.ex:249: Earmark.Transform.postprocessed_ast/2
        (earmark 1.4.41) lib/earmark/internal.ex:42: Earmark.Internal.as_html/2
        (earmark 1.4.41) lib/earmark/internal.ex:48: Earmark.Internal.as_html!/2
        ...
        (phoenix_live_view 0.19.5) lib/phoenix_live_view/engine.ex:150: Phoenix.HTML.Safe.Phoenix.LiveView.Rendered.to_iodata/1
        (phoenix_live_view 0.19.5) lib/phoenix_live_view/engine.ex:166: Phoenix.HTML.Safe.Phoenix.LiveView.Rendered.to_iodata/3
        (phoenix 1.7.7) lib/phoenix/controller.ex:1008: anonymous fn/5 in Phoenix.Controller.template_render_to_iodata/4
        (phoenix 1.7.7) lib/phoenix/controller.ex:974: Phoenix.Controller.render_and_send/4

I'm sorry I don't have a quick reproduction case, as I'm calling Earmark as a LiveView component and haven't isolated this issue out yet. Given the size/scope of the v1.4.41 merge that still not on master, figured I would give a heads up if this makes sense to someone in the know.

Other things I tried:

Version info:

  • elixir 1.15.4-otp-26
  • erlang 26.0.2
@RobertDober
Copy link
Collaborator

Thank you for reporting this

@RobertDober
Copy link
Collaborator

I'm sorry I don't have a quick reproduction case, as I'm calling Earmark as a LiveView component and haven't isolated this issue out yet. Given the size/scope of the v1.4.41 merge that still not on master, figured I would give a heads up if this makes sense to someone in the know.

You reported this very nicely, I can see the stupid misstake I made, just that I am on leave and cannot really investigate why the tests did not check this.
Hopefully fixed with the just released 1.4.42

@Robert-Janeczek
Copy link

Not fixed in 1.4.42 on Elixir 1.15.5 (compiled with Erlang/OTP 26) I'm afraid

@RobertDober
Copy link
Collaborator

RobertDober commented Sep 20, 2023

Sorry about that, will need some time to check this out, time I do not have right now.
Thank you for your patience.

How stupid can one get (please do not answer) @tercenya very nicely identified the problem by referring to #80, now I just checked #80 so this should do the trick

😊 😊 😊

@nathany-copia
Copy link

nathany-copia commented Sep 26, 2023

Thank you. It may be worth yanking 1.4.41/42 from Hex?

@RobertDober
Copy link
Collaborator

Thank you. It may be worth yanking 1.4.41/42 from Hex?

Completely agree, however can this still be done?

@nathany-copia
Copy link

Yes, it's possible to retire a specific version

https://hexdocs.pm/hex/Mix.Tasks.Hex.Retire.html

@RobertDober
Copy link
Collaborator

Ty for your reply, I have looked at the hex.retire and it is my understanding that it retires the whole package not a version (although I wonder why we need a version in the command, then)

So I get cold feet, honestly.

But thank you for your time.

@RobertDober
Copy link
Collaborator

RobertDober commented Sep 26, 2023

I'll be a little bit more precise, I quote the doc

mix hex.retire

Retires a package version.

Great so far

Mark a package as retired when you no longer recommend its usage.

I beg you pardon 😨

I will test with a dummy package when I have some time; probably not soon, sorry

@nathany-copia
Copy link

Yeah, I found it confusing too.

@nathany-copia
Copy link

Here's an example though:

Timex 3.6.2
https://hex.pm/packages/timex/versions

@Robert-Janeczek
Copy link

Robert-Janeczek commented Sep 27, 2023

During one of the recent Thinking Elixir podcast it was mentioned that it can be done by asking Hex maintainers, but they have a policy limiting it to 48h after release if I'm not mistaken.

@RobertDober
Copy link
Collaborator

During one of the recent Thinking Elixir podcast it was mentioned that it can be done by asking Hex maintainers, but they have a policy limiting it to 48h after release if I'm not mistaken.

Is that not for overwriting the same version, which also can be done during 1h IIRC with the CLI.

Maybe this is one of the areas where documentation could be improved.

@RobertDober
Copy link
Collaborator

Here's an example though:

Timex 3.6.2
https://hex.pm/packages/timex/versions

Well are we sure there was ever a version 3.7.10 ? I have occasonally skipped patch version numbers.

Ty all for your participation, but I'll just test with a dummy package. ;)

@RobertDober RobertDober reopened this Sep 27, 2023
@RobertDober
Copy link
Collaborator

Action : Retire versions 1.4.4[12] if savely possible.

@RobertDober
Copy link
Collaborator

DONE

@RobertDober
Copy link
Collaborator

Ty all for your help

@nathany-copia
Copy link

Thank you 👍🏻

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

No branches or pull requests

4 participants