From 7a81df8f588dd645cdf9f1053838b4d7ac732106 Mon Sep 17 00:00:00 2001 From: takakiNG Date: Mon, 9 Feb 2026 21:27:37 +0900 Subject: [PATCH 1/2] =?UTF-8?q?Elixir=201.19.0=20=E4=BB=A5=E9=99=8D?= =?UTF-8?q?=E3=81=A7=E3=81=AF=20Inspect.Map.inspect=5Fas=5Fstruct/4=20?= =?UTF-8?q?=E3=82=92=E5=88=A9=E7=94=A8=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .tool-versions | 4 ++-- lib/yacto/migration/structure.ex | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.tool-versions b/.tool-versions index b7c4c5b..3d664e3 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -elixir 1.17.2-otp-27 -erlang 27.0.1 +elixir 1.19.5-otp-28 +erlang 28.3.1 diff --git a/lib/yacto/migration/structure.ex b/lib/yacto/migration/structure.ex index d20f817..161690a 100644 --- a/lib/yacto/migration/structure.ex +++ b/lib/yacto/migration/structure.ex @@ -226,12 +226,23 @@ defimpl Inspect, for: Yacto.Migration.Structure do # マップをソートするオプションを付ける(Elixir 1.14 以上) opts = put_in(opts.custom_options[:sort_maps], true) - apply(Inspect.Map, :inspect, [ + # Elixir 1.19.0 以降: Inspect.Map.inspect_as_struct/4 を使用、結果は {doc, opts} + # Elixir 1.18.4 まで: Inspect.Map.inspect/4 を使用、結果は doc + function_name = + if function_exported?(Inspect.Map, :inspect, 4), + do: :inspect, + else: :inspect_as_struct + + apply(Inspect.Map, function_name, [ value, Inspect.Atom.inspect(Yacto.Migration.Structure, opts), infos, opts ]) + |> case do + {doc, _opts} -> doc + doc -> doc + end end end end From 4db7dba910f722f96c6985a7a12b2d2197c6b091 Mon Sep 17 00:00:00 2001 From: takakiNG Date: Thu, 12 Feb 2026 11:03:31 +0900 Subject: [PATCH 2/2] =?UTF-8?q?Inspect=20=E3=81=AE=E7=9C=81=E7=95=A5?= =?UTF-8?q?=E3=81=8C=E7=84=A1=E3=81=84=E3=82=88=E3=81=86=E3=81=AB=E3=80=81?= =?UTF-8?q?=20limit:=20:infinity=20=E3=82=92=E6=8C=87=E5=AE=9A=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/yacto/migration/structure.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/yacto/migration/structure.ex b/lib/yacto/migration/structure.ex index 161690a..3b844fc 100644 --- a/lib/yacto/migration/structure.ex +++ b/lib/yacto/migration/structure.ex @@ -191,7 +191,7 @@ defmodule Yacto.Migration.Structure do def to_string(value) do value - |> Inspect.Yacto.Migration.Structure.inspect(%Inspect.Opts{}) + |> Inspect.Yacto.Migration.Structure.inspect(%Inspect.Opts{limit: :infinity}) |> Inspect.Algebra.format(:infinity) |> IO.iodata_to_binary() end