Skip to content

MFA marked as undefined with a warning when it is defined and the same MFA is suggested as a solution #296

@probably-not

Description

@probably-not

On a fairly large project (170K lines of Elixir code), I've been experimenting with adding Expert in order to upgrade us to the latest Elixir versions.

After adding Expert and forcing a full compile and build of the project, deps, and indexes, I am receiving hundreds of the following error (MFAs are anonymized since this is in our production codebase):

MyApp.MyProtocol.function/1 is undefined (module MyApp.MyProtocol is not available or is yet to be defined). Did you mean:

      * MyApp.MyProtocol.function/1

More information to assist in debugging:

  • Elixir version 1.19.5
  • Erlang version 28.3
  • MyApp.MyProtocol is aliased at the top of the file (alias MyApp.MyProtocol) so the code that is causing the warning is MyProtocol.function(xxx)
  • When I force a save within this file, it removes the warning, however if I move to a different file and then force a save in that file, the warning comes back
  • I have consolidate_protocols: Mix.env() not in [:dev, :test] set in the mix.exs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions