fsmx icon indicating copy to clipboard operation
fsmx copied to clipboard

States as an :atom

Open xantrac opened this issue 3 years ago • 1 comments

Hey team, thank you for the work you are doing here.

Quick question, any specific reason why atoms are not valid states in the type spec? image

This works just fine but I'm getting mismatching type in the dialyzer

  def submit_order(order, order_params) do
    {:ok, %{new: new}} =
      Multi.new()
      |> Fsmx.transition_multi(order, :new, :submitted, order_params)
      |> Repo.transaction()

    {:ok, Repo.reload(new)}
  end

xantrac avatar Nov 15 '22 20:11 xantrac

Hi @xantrac I believe this has been fixed in #3 , but never actually release to the package manager

I'm no longer actively working on Elixir, so that's why I ended up forgetting that when merging those fixes In the meantime, you can use the direct git repo as a dependency, and it should fix your issue

naps62 avatar Nov 16 '22 09:11 naps62

@xantrac I just pushed a new release. apologies for the huge delay

naps62 avatar Feb 11 '23 09:02 naps62