-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No case clause matching when using IEx.break! #13133
Comments
@deviprsd can you reproduce it outside of an Ash module? If you cannot, this may be an Ash bug, so I would appreciate help isolating the bug so it doesn't depend on Ash. Thank you! |
It seems interesting…I’m not sure if any of our metaprogramming would come into play here as all we ultimately do is call that module. I agree though, Ash should be eliminated as a factor here, although I’m not sure how that could be done. What even produces |
@deviprsd are you calling the action using the code interface? Perhaps trying using a query/api call directly if so. |
@zachdaniel I'm using code interface, it looks something like this. code_interface do
define :get_by_codename, action: :by_codename, args: [...args]
end
read :by_codename do
get? true
# ...args
manual GetByCodename
end I tried this, still the same error. Space |> Ash.Query.for_read(:by_codename, %{codename: id}) |> Data.Account.read() |
So that eliminates any code generation as the culprit then. 🤔 try this. In iex do the following before trying to set your break: |
Well I'm guessing you mean my ManualRead module here, but just to be sure I did that for the api and resource as well Code.ensure_compiled!(Data.Account.Space.Action.GetByCodename)
Code.ensure_compiled!(Data.Account.Space)
Code.ensure_compiled!(Data.Account)
break! Data.Account.Space.Action.GetByCodename.read/4 Same error |
Here is a minimal reproduction not using any libraries at all.
So I don't have a working version of this actually. But the issue is pretty clearly reproduced I think. Using this project, do the following in ex iex(1)> break! AnAdopter.read
1
iex(2)> Break.break
** (CaseClauseError) no case clause matching: {:line, :infinity}
(iex 1.15.4) lib/iex/pry.ex:84: IEx.Pry.pry/2
(iex 1.15.4) lib/iex/pry.ex:89: IEx.Pry.pry_with_next/3
(break 0.1.0) AnAdopter.read/0 https://github.com/zachdaniel/breakpoint-broken-example/blob/main/lib/break.ex |
This minimal example is perfect and exactly what I needed. Thank you. |
Elixir and Erlang/OTP versions
Operating system
MacOS
Current behavior
I'm setting a break point in
iex -S mix phx.server
, this is happening in a liveview process and while I'm using Ash, it might have to do more with elixir.When I trigger the break by opening the appropriate view, I'm getting this error.
Module code,
Expected behavior
Not throw this error and enter pry session
The text was updated successfully, but these errors were encountered: