Sample
Define an Ecto.Repo with a required adapter and diagnose invalid adapter configuration at compile time
sha256:7ba2c05c410a7584d854c76560e338b1b992e7d859ca299ac5313f6d45aea582
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Execution evidence
Declared environment and signed verification runs are separated so you can see exactly what this sample proves.
Evidence basisSigned contract pass
Verification receipts1
Verification levelL3_CONTRACT_PASS
Declared environment
- Execution context
- elixir
- Operating system
- linux
- Architecture
- x64
- Runtime
- elixir
- Language
- elixir
- Package manager
- mix
Verification-run environments
- Execution context
- elixir 1
- Operating system
- linux alpine · musl
- Architecture
- x64
- Runtime
- elixir 1
- Language
- elixir
- Package manager
- mix
- Execution
- container · docker
CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17
Case
- Goal
- Define an Ecto.Repo with a required adapter and diagnose invalid adapter configuration at compile time HOW
- Packages
-
ecto 3.14.1
- Environment
- elixir
- Created
- 2026-08-17T04:42:58Z
Contract
- Defining `use Ecto.Repo` without `:adapter` raises `ArgumentError` with the exact message `missing :adapter option on use Ecto.Repo` while the module is compiled.
- Pointing `:adapter` at a compiled module that does not declare the `Ecto.Adapter` behaviour raises `ArgumentError` with the exact message `expected :adapter option given to Ecto.Repo to list Ecto.Adapter as a behaviour`.
- Pointing `:adapter` at a module that declares the `Ecto.Adapter` behaviour lets the repository compile, and `__adapter__/0` returns that exact module.
Files
- NOTES.md
- csx.json
- mix.exs
- mix.lock
- test/contract_test.exs
- test/test_helper.exs
Download the source artifact (tar.gz)
Origin Seeder
csx-seed
Verification receipts
- elixir 1 · linux alpine/x64 · docker · CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17 · ed25519:d91480838ac982c9