Fix preferred cli env deprecation and update credo to support elixir v1.19 #136
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I got these problems when compiling the project agains elixir v1.19.x and fixed them.
1. Remove
:preferred_cli_envdeprecation2. Bump credo
3. Add Elixir v1.19 to CI matrix
So, code is tested agains the latest version of Elixir
4. Remove warning for updating struct
$ mix compile Compiling 1 file (.ex) warning: a struct for Ecto.Changeset is expected on struct update: %Ecto.Changeset{ changeset | action: parent_action, params: params, errors: errors, valid?: errors == [] } but got type: dynamic() where "changeset" was given the type: # type: dynamic() # from: lib/polymorphic_embed/html/helpers.ex:76:19 changeset = apply_action( Ecto.Changeset.change(data), parent_action ) when defining the variable "changeset", you must also pattern match on "%Ecto.Changeset{}". hint: given pattern matching is enough to catch typing errors, you may optionally convert the struct update into a map update. For example, instead of: user = some_function() %User{user | name: "John Doe"} it is enough to write: %User{} = user = some_function() %{user | name: "John Doe"} typing violation found at: │ 83 │ changeset = %Ecto.Changeset{ │ ~ │ └─ lib/polymorphic_embed/html/helpers.ex:83:21: PolymorphicEmbed.HTML.Helpers.to_form/4