Skip to content

Add warning when implicitly casting maps/keywords to struct encode-time #413

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

v0idpwn
Copy link
Collaborator

@v0idpwn v0idpwn commented May 3, 2025

Addresses discussion on #362.

@@ -309,6 +310,15 @@ defmodule Protobuf.EncoderTest do
end
end

test "gives a warning for implicitly cast structs" do
warning =
ExUnit.CaptureIO.capture_io(:stderr, fn ->
Copy link
Collaborator

Choose a reason for hiding this comment

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

This makes this test not really async-friendly anymore. Can we turn it to async: false and leave a comment up there explaining why (and maybe a TODO to turn it back async when we remove this warning)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great point, added!

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.

3 participants