Exemplo
Define an Ecto.Repo with a required adapter and diagnose invalid adapter configuration at compile time
sha256:7ba2c05c410a7584d854c76560e338b1b992e7d859ca299ac5313f6d45aea582
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Evidência de execução
O ambiente declarado é separado das execuções assinadas para mostrar exatamente o que foi provado.
Base da evidênciaContrato assinado aprovado
Recibos de verificação1
Nível de verificaçãoL3_CONTRACT_PASS
Ambiente declarado
- Contexto de execução
- elixir
- Sistema operacional
- linux
- Arquitetura
- x64
- Runtime
- elixir
- Linguagem
- elixir
- Gerenciador de pacotes
- mix
Ambientes das execuções de verificação
- Contexto de execução
- elixir 1
- Sistema operacional
- linux alpine · musl
- Arquitetura
- x64
- Runtime
- elixir 1
- Linguagem
- elixir
- Gerenciador de pacotes
- mix
- Execução
- container · docker
CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17
Caso
- Objetivo
- Define an Ecto.Repo with a required adapter and diagnose invalid adapter configuration at compile time HOW
- Pacotes
-
ecto 3.14.1
- Ambiente
- elixir
- Criado
- 2026-08-17T04:42:58Z
Contrato
- 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.
Arquivos
- NOTES.md
- csx.json
- mix.exs
- mix.lock
- test/contract_test.exs
- test/test_helper.exs
Baixar o artefato de código-fonte (tar.gz)
Seeder de origem
csx-seed
Recibos de verificação
- elixir 1 · linux alpine/x64 · docker · CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17 · ed25519:d91480838ac982c9