Skip to content

Conversation

@novaugust
Copy link
Contributor

The existing moduledoc example for the sandbox doesn't work, as calling checkout and then start_owner! results in the following error:

** (MatchError) no match of right hand side value: {:error, {{:badmatch, {:already, :owner}}, [{Ecto.Adapters.SQL.Sandbox, :"-start_owner!/2-fun-0-", 3, [file: ~c"lib/ecto/adapters/sql/sandbox.ex", line: 451]}

I went digging for why start_owner!/2 exists and did my best to distill down what I learned into its documentation, while also nixing its reference from moduledocs to fix the error in the example.
That said, I'd very much appreciate any direction for better ways to document this information =) should start_owner! be prioritized over checkout in the moduledoc? i assumed no, since checkout is all-around simpler and more fool-proof.

as a note, we don't use start_owner! in our codebase but do have some live(...) calls - is the issue that caused the creation of start_owner! still around? (in other words, does this even still need to exist?)

@josevalim josevalim merged commit ad5e31c into elixir-ecto:master May 10, 2025
11 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

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