kwmiebach
kwmiebach
AEAsh Elixir
Created by kwmiebach on 2/18/2023 in #support
How to get rid of ellipsis and see everything in IO.inspect()
When we look at the examples there are lines with only '...' that replace some data, see https://www.ash-hq.org/docs/guides/ash/latest/tutorials/get-started#try-our-first-resource-out The truncation seems some behaviour of IO.inspect(). I would like to use IO.inspect() and see everything, even it uses a lot of space. I tried the following code in an exs script with Elixir 1.14.1 (compiled with Erlang/OTP 25) :
Helpdesk.Support.Ticket
|> Ash.Changeset.for_create(:create)
|> IO.inspect(limit: :infinity, printable_limit: :infinity)
|> Helpdesk.Support.create!()
|> IO.inspect(limit: :infinity, printable_limit: :infinity)
Helpdesk.Support.Ticket
|> Ash.Changeset.for_create(:create)
|> IO.inspect(limit: :infinity, printable_limit: :infinity)
|> Helpdesk.Support.create!()
|> IO.inspect(limit: :infinity, printable_limit: :infinity)
The Output is still truncated. I inserted the :limit and :printable_limit options but it does not help. My output:
#Ash.Changeset<
action_type: :create,
action: :create,
attributes: %{},
relationships: %{},
errors: [],
data: #Helpdesk.Support.Ticket<
__meta__: #Ecto.Schema.Metadata<:built, "">,
id: nil,
subject: nil,
aggregates: %{},
calculations: %{},
__order__: nil,
...
>,
valid?: true
>
#Ash.Changeset<
action_type: :create,
action: :create,
attributes: %{},
relationships: %{},
errors: [],
data: #Helpdesk.Support.Ticket<
__meta__: #Ecto.Schema.Metadata<:built, "">,
id: nil,
subject: nil,
aggregates: %{},
calculations: %{},
__order__: nil,
...
>,
valid?: true
>
#Helpdesk.Support.Ticket<
__meta__: #Ecto.Schema.Metadata<:built, "">,
id: "a5f8986c-1c13-42e1-9b41-66649e89ed11",
subject: nil,
aggregates: %{},
calculations: %{},
__order__: nil,
...
>
#Helpdesk.Support.Ticket<
__meta__: #Ecto.Schema.Metadata<:built, "">,
id: "a5f8986c-1c13-42e1-9b41-66649e89ed11",
subject: nil,
aggregates: %{},
calculations: %{},
__order__: nil,
...
>
10 replies