Skip to content
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

fix: support Elixir 1.17 #575

Merged
merged 3 commits into from
Dec 19, 2024
Merged

fix: support Elixir 1.17 #575

merged 3 commits into from
Dec 19, 2024

Conversation

joshuap
Copy link
Member

@joshuap joshuap commented Dec 18, 2024

@joshuap joshuap changed the title Test Elixir 1.14-1.17 Support Elixir 1.14-1.17 Dec 18, 2024
@joshuap
Copy link
Member Author

joshuap commented Dec 18, 2024

Regarding 038ee22, here is the diff between the Elixir 1.15 and 1.17 events that are being passed to handle_event/2 as a part of the Logger message object:

def handle_event({:error, _gl, {Logger, message, _ts, metadata}}, state) do

details = extract_details(message)

GenServer extract_details args: [
  [
    "GenServer ",
    "MyGenServer",
    " terminating",
    [
      [10 | "** (KeyError) key :bad_key not found in: %{}"],
      ["\n    " | ":erlang.map_get(:bad_key, %{})"],
      ["\n    " |
       "test/honeybadger/logger_test.exs:25: Honeybadger.LoggerTest.MyGenServer.handle_cast/2"],
      ["\n    " |
       "(stdlib 6.1.1) gen_server.erl:2371: :gen_server.try_handle_cast/3"],
      ["\n    " |
       "(stdlib 6.1.1) gen_server.erl:2433: :gen_server.handle_msg/6"],
      ["\n    " |
       "(stdlib 6.1.1) proc_lib.erl:329: :proc_lib.init_p_do_apply/3"]
    ],
+    [],
    "\nLast message",
    [],
    ": ",
    "{:\"$gen_cast\", :raise_error}"
  ],
  "\nState: ",
  "%{}"
]
:gen_event handler extract_details args: [
  [
    ":gen_event handler ",
    "Honeybadger.LoggerTest.MyEventHandler",
    " installed in ",
    "#PID<0.7227.0>",
    " terminating",
    [
      [10 | "** (RuntimeError) Oops"],
      ["\n    " |
       "test/honeybadger/logger_test.exs:58: Honeybadger.LoggerTest.MyEventHandler.handle_event/2"],
      ["\n    " |
       "(stdlib 6.1.1) gen_event.erl:1921: :gen_event.server_update/4"],
      ["\n    " |
       "(stdlib 6.1.1) gen_event.erl:1903: :gen_event.server_notify/4"],
      ["\n    " | "(stdlib 6.1.1) gen_event.erl:1640: :gen_event.handle_msg/6"],
      ["\n    " |
       "(stdlib 6.1.1) proc_lib.erl:329: :proc_lib.init_p_do_apply/3"]
    ],
+    [],
    "\nLast message: ",
    ":raise_error"
  ],
  "\nState: ",
  "{}"
]

@joshuap
Copy link
Member Author

joshuap commented Dec 18, 2024

Hey @sorentwo! Are you around and is there any chance you could give this a quick look?

Copy link
Collaborator

@sorentwo sorentwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One minor suggestion to maximize the test matrix, but this looks good otherwise. Note that Elixir v1.18 will also be released soon (it's in an RC currently).

.github/workflows/elixir.yml Outdated Show resolved Hide resolved
@joshuap
Copy link
Member Author

joshuap commented Dec 19, 2024

Thanks!

@joshuap joshuap changed the title Support Elixir 1.14-1.17 fix: support Elixir 1.17 Dec 19, 2024
@joshuap joshuap merged commit 785ea1c into master Dec 19, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants