Skip to content

Fix @spec mismatches and remove unused private-function parameters - #4817

Merged
josevalim merged 2 commits into
elixir-ecto:masterfrom
manuel-rubio:prisma-support
Nov 17, 2026
Merged

josevalim merged 2 commits into
elixir-ecto:masterfrom
manuel-rubio:prisma-support

Conversation

@manuel-rubio

@manuel-rubio manuel-rubio commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Updated to keep only the @spec fixes and unused private-function parameter cleanups (without adding any dependency or .pplt artifact).

Summary of Changes

  1. Typespec fixes (@spec vs implementation):

    • Ecto.Query.Builder.From.build/5 (lib/ecto/query/builder/from.ex): widen as spec from atom to atom | Macro.t() (macro calls pass {:^, _, [as]}).
    • Ecto.Query.Builder.Join.build/10 (lib/ecto/query/builder/join.ex): widen as spec from atom to atom | Macro.t().
    • Ecto.Repo.Assoc.query/4 (lib/ecto/repo/assoc.ex): fix return spec from [Ecto.Schema.t] to [list] (matching all clauses and Ecto.Repo.Preloader.query/7).
  2. Unused private-function parameters removed without changing any public API:

    • Ecto.Multi.apply_operation/4 -> /3 (lib/ecto/multi.ex): drop unused _apply_args across all 7 clauses (and mark _wrap in apply_operation/5).
    • Ecto.Query.Builder.Windows.build_runtime_window/2 -> /1 (lib/ecto/query/builder/windows.ex): drop unused _env.
    • Ecto.Changeset.put_relation/5 -> /4 (lib/ecto/changeset.ex): drop unused _opts (public put_assoc/4 and put_embed/4 signatures unchanged).
    • Ecto.Repo.Preloader.maybe_pmap/3 -> /2 (lib/ecto/repo/preloader.ex): drop unused _repo_name.
    • Ecto.Repo.Schema (lib/ecto/repo/schema.ex): drop unused _name in private do_insert_all/7 -> /6, do_insert/4 -> /3, and do_update/4 -> /3 (public insert_all/5, insert/4, update/4 signatures unchanged).

Verification

  • mix test: 1649 passed (97 doctests, 1552 tests).

@josevalim

Copy link
Copy Markdown
Member

Thank y8ou @manuel-rubio! The fixes are welcome but we don't plan to add a new dependency for now. So can you please remove it and the PLTX? Thanks!

@manuel-rubio manuel-rubio changed the title Add Prisma support, pre-built .pplt, and fix @spec / unused private params Fix @spec mismatches and remove unused private-function parameters Nov 16, 2026
@manuel-rubio

Copy link
Copy Markdown
Contributor Author

Thank y8ou @manuel-rubio! The fixes are welcome but we don't plan to add a new dependency for now. So can you please remove it and the PLTX? Thanks!

Done. You're welcome.

@josevalim
josevalim merged commit f6792db into elixir-ecto:master Nov 17, 2026
6 of 8 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