Skip to content

Cannot upgrade past 1.2.0 due to TypedStruct conflict #356

@neilberkman

Description

@neilberkman

Provider (if applicable): N/A

Model (if applicable): N/A

Bug Description

Cannot upgrade from req_llm 1.2.0 to 1.3.0+ due to duplicate TypedStruct module conflict. The reversion to typed_struct in PR #315 causes production build failures for projects using typedstruct (the maintained fork) alongside req_llm.

Reproduction Code

# mix.exs
defp deps do
  [
    {:req_llm, "~> 1.3"},
    {:typedstruct, "~> 0.5", override: true},  # or via transitive deps
    # ... other deps
  ]
end

Then run:

MIX_ENV=prod mix release

Expected Behavior

Production release should build successfully with req_llm 1.3.0+.

Actual Behavior

Build fails with:

** (Mix) Duplicated modules: 
    'Elixir.TypedStruct.Plugin' specified in typed_struct and typedstruct
    'Elixir.TypedStruct' specified in typed_struct and typedstruct

Both typed_struct (from req_llm 1.3.0) and typedstruct (maintained fork, from other deps) export identical modules, causing the conflict.

Environment

  • ReqLLM: 1.3.0
  • Elixir: 1.19.5
  • OTP: 28

Additional Context

Our project uses TypedStruct directly in application code. We have typedstruct in our dependency tree for compatibility with other packages. When req_llm 1.3.0 added typed_struct (via PR #315 to fix jido ecosystem conflicts), it introduced this duplicate module issue.

Currently pinned to req_llm 1.2.0 which uses typedstruct and doesn't conflict. I understand PR #315 was necessary for jido ecosystem compatibility, but it creates issues for standalone req_llm users. The Zoi migration would resolve this permanently.

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