Skip to content

Unique Title Request #566

@akchaudhary6532

Description

@akchaudhary6532
defmodule Admin.Onboarding do
  defmodule ListResponse do
       
  end
end

and

defmodule User.Onboarding do
  defmodule ListResponse do
       
  end
end

Current Behaviour:

We usually define modules like this. which creates duplicates and ends up overriding each other, giving unexpected results. Finding duplicates manually during PR reviews is also a pain.

Issue:

  1. I wasn't aware that the title should always be unique and that we are using module |> Module.split() |> List.last() to create a title. We should add this in the hexdoc.

  2. We should, at compile time raise an error if there are duplicate titles found in the code.

  3. If point 2 is not possible, then we should use the Absolute path as a title to avoid duplicates.

Hi guys, This is my first time raising a ticket in any open-source project so please ignore the lack of structure above.

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