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

Support Elixir 1.18 #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kianmeng
Copy link
Contributor

@kianmeng kianmeng commented Jan 3, 2025

📖 Description and reason

Support and resolves issues related to Elixir 1.18.

👷 Work done

Tasks

List of changes:

  • add Elixir 1.18 to CI build matrix
  • bump GitHub actions
  • migrate Mix.Config to Config
  • resolve test error with overriden field_constructor env value
  • use shorter version in build matrix

Additional notes

🎉 Result

🦀 Dispatch

#dispatch/elixir

List of changes:
- add Elixir 1.18 to CI build matrix
- bump GitHub actions
- migrate Mix.Config to Config
- resolve test error with overriden field_constructor env value
- use shorter version in build matrix
Comment on lines +65 to +70
original_field_constructor = Application.get_env(:absinthe_error_payload, :field_constructor)
Application.put_env(:absinthe_error_payload, :field_constructor, CustomFieldConstructor)

on_exit(fn ->
Application.put_env(:absinthe_error_payload, :field_constructor, original_field_constructor)
end)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Running ExUnit with seed: 554479, max_cases: 16

..........................

  1) test multiples multiple fields with errors (AbsintheErrorPayload.ChangesetParserTest)
     test/changeset_parser_test.exs:88
     match (=) failed
     code:  assert %ValidationMessage{field: "author.name", key: :name} = first
     left:  %AbsintheErrorPayload.ValidationMessage{field: "author.name", key: :name}
     right: %AbsintheErrorPayload.ValidationMessage{
              field: "author›name",
              key: :name,
              code: :required,
              options: [],
              template: "can't be blank",
              message: "can't be blank"
            }
     stacktrace:
       test/changeset_parser_test.exs:104: (test)

..

  2) test nested nested fields with errors on replaced embeds_many (AbsintheErrorPayload.ChangesetParserTest)
     test/changeset_parser_test.exs:154
     match (=) failed
     code:  assert %ValidationMessage{
              message: "can't be blank",
              code: :required,
              field: "embedded_tags.0.name",
              key: :name
            } = first
     left:  %AbsintheErrorPayload.ValidationMessage{
              message: "can't be blank",
              code: :required,
              field: "embedded_tags.0.name",
              key: :name
            }
     right: %AbsintheErrorPayload.ValidationMessage{
              field: "embedded_tags@0›name",
              key: :name,
              code: :required,
              options: [],
              template: "can't be blank",
              message: "can't be blank"
            }
     stacktrace:
       test/changeset_parser_test.exs:168: (test)

...

  3) test nested nested has many fields with errors (AbsintheErrorPayload.ChangesetParserTest)
     test/changeset_parser_test.exs:172
     match (=) failed
     code:  assert %ValidationMessage{code: :required, field: "tags.0.name", key: :name} = first
     left:  %AbsintheErrorPayload.ValidationMessage{code: :required, field: "tags.0.name", key: :name}
     right: %AbsintheErrorPayload.ValidationMessage{
              field: "tags@0›name",
              key: :name,
              code: :required,
              options: [],
              template: "can't be blank",
              message: "can't be blank"
            }
     stacktrace:
       test/changeset_parser_test.exs:186: (test)

....

  4) test nested nested fields with errors (AbsintheErrorPayload.ChangesetParserTest)
     test/changeset_parser_test.exs:137
     match (=) failed
     code:  assert %ValidationMessage{code: :required, field: "author.name", key: :name} = first
     left:  %AbsintheErrorPayload.ValidationMessage{code: :required, field: "author.name", key: :name}
     right: %AbsintheErrorPayload.ValidationMessage{
              field: "author›name",
              key: :name,
              code: :required,
              options: [],
              template: "can't be blank",
              message: "can't be blank"
            }
     stacktrace:
       test/changeset_parser_test.exs:151: (test)

..

  5) test construct_message/2 creates expected struct (AbsintheErrorPayload.ChangesetParserTest)
     test/changeset_parser_test.exs:192
     Assertion with == failed
     code:  assert message.field == :title
     left:  "@root›title"
     right: :title
     stacktrace:
       test/changeset_parser_test.exs:201: (test)

........
Finished in 0.6 seconds (0.00s async, 0.6s sync)
1 doctest, 49 tests, 5 failures

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.

1 participant