Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

"A.b.C" raises error in autolinker #1285

Conversation

maartenvanvliet
Copy link
Contributor

Generating the docs for a https://github.com/aws-beam/aws-elixir/ triggered an error.

I was able to reproduce it in a test with

assert_unchanged("A.b.C")

With the following error:

  1) test doc/3 unknown module (ExDoc.AutolinkTest)
     test/ex_doc/autolink_test.exs:33
     ** (FunctionClauseError) no function clause matching in :elixir_aliases.do_concat/2

     The following arguments were given to :elixir_aliases.do_concat/2:
     
         # 1
         [{{:., [line: 1], [{:__aliases__, [line: 1], [:A]}, :b]}, [no_parens: true, line: 1], []}, :C]
     
         # 2
         "Elixir"
     
     code: assert_unchanged("A.b.C")
     stacktrace:
       (elixir 1.10.1) src/elixir_aliases.erl:120: :elixir_aliases.do_concat/2
       (elixir 1.10.1) src/elixir_aliases.erl:108: :elixir_aliases.concat/1
       (ex_doc 0.22.6) lib/ex_doc/autolink.ex:296: ExDoc.Autolink.do_parse_module/1
       (ex_doc 0.22.6) lib/ex_doc/autolink.ex:216: ExDoc.Autolink.url/3
       (ex_doc 0.22.6) lib/ex_doc/autolink.ex:80: ExDoc.Autolink.walk/2
       test/ex_doc/autolink_test.exs:444: ExDoc.AutolinkTest.assert_unchanged/2
       test/ex_doc/autolink_test.exs:36: (test)

Note that "A.B.C", "A.B.c", "A.b.c" all didnt' raise an error.

@wojtekmach
Copy link
Member

Thank you for the report and the test case, the fix is out in v0.23.0!

@maartenvanvliet maartenvanvliet deleted the issues/invalid_module branch October 12, 2020 17:27
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants