Skip to content

Failure to render links for specs when using Elixir 1.17 or later #1925

Closed
@garazdawi

Description

@garazdawi

The code in ExDoc.Language.Erlang.autolink_spec has started to break for certain modules when ex_doc uses Elixir 1.17 or later.

When building the docs in Erlang/OTP for mnesia I get the error below.

I did a git bisect of elixir to figure out what caused the regression and it is this commit: elixir-lang/elixir@d68c8d6

I'm unsure if the fault is with the change that was introduced in Elixir or if it is how ExDoc uses the type parser...

      warning: internal inconsistency, please submit bug: "atom" != "'...'"
      │
 1035 │ -spec activity(AccessContext, Fun, [Arg::_], Mod) -> t_result(Res) | Res when
      │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      │
      └─ (mnesia 4.23.2) /home/eluklar/git/otp/lib/mnesia/src/mnesia.erl:1035: :mnesia.activity/4

      warning: spec references type ".../0" but it is undefined or private
      │
 1035 │ -spec activity(AccessContext, Fun, [Arg::_], Mod) -> t_result(Res) | Res when
      │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      │
      └─ (mnesia 4.23.2) /home/eluklar/git/otp/lib/mnesia/src/mnesia.erl:1035: :mnesia.activity/4

     warning: internal inconsistency, please submit bug: "non_neg_integer" != "'...'"
     │
 799 │ -spec sync_transaction(Fun, Retries) -> t_result(Res) when
     │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     │
     └─ (mnesia 4.23.2) /home/eluklar/git/otp/lib/mnesia/src/mnesia.erl:799: :mnesia.sync_transaction/2

     warning: spec references type ".../0" but it is undefined or private
     │
 799 │ -spec sync_transaction(Fun, Retries) -> t_result(Res) when
     │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     │
     └─ (mnesia 4.23.2) /home/eluklar/git/otp/lib/mnesia/src/mnesia.erl:799: :mnesia.sync_transaction/2

     warning: internal inconsistency, please submit bug: "t_result" != "non_neg_integer"
     │
 799 │ -spec sync_transaction(Fun, Retries) -> t_result(Res) when
     │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     │
     └─ (mnesia 4.23.2) /home/eluklar/git/otp/lib/mnesia/src/mnesia.erl:799: :mnesia.sync_transaction/2

     warning: internal inconsistency, please submit bug: "non_neg_integer" != "'...'"
     │
 821 │ -spec sync_transaction(Fun, [Arg::_], Retries) -> t_result(Res) when
     │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     │
     └─ (mnesia 4.23.2) /home/eluklar/git/otp/lib/mnesia/src/mnesia.erl:821: :mnesia.sync_transaction/3

     warning: spec references type ".../0" but it is undefined or private
     │
 821 │ -spec sync_transaction(Fun, [Arg::_], Retries) -> t_result(Res) when
     │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     │
     └─ (mnesia 4.23.2) /home/eluklar/git/otp/lib/mnesia/src/mnesia.erl:821: :mnesia.sync_transaction/3

     warning: internal inconsistency, please submit bug: "non_neg_integer" != "'...'"
     │
 786 │ -spec transaction(Fun, [Arg::_], Retries) -> t_result(Res) when
     │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     │
     └─ (mnesia 4.23.2) /home/eluklar/git/otp/lib/mnesia/src/mnesia.erl:786: :mnesia.transaction/3

     warning: spec references type ".../0" but it is undefined or private
     │
 786 │ -spec transaction(Fun, [Arg::_], Retries) -> t_result(Res) when
     │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     │
     └─ (mnesia 4.23.2) /home/eluklar/git/otp/lib/mnesia/src/mnesia.erl:786: :mnesia.transaction/3

View "html" docs at "html/index.html"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions