<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [Upgrading](#upgrading)
  - [v2.0.0](#v200)
    - [`Retort.Client.Generic.start_link`](#retortclientgenericstart_link)
    - [`Retort.Resource.client_start_link`](#retortresourceclient_start_link)
    - [`Retort.Resources` timeout configuration](#retortresources-timeout-configuration)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# Upgrading

## v2.0.0

### `Retort.Client.Generic.start_link`

`Retort.Client.Generic.start_link` calls where the
`:ecto_schema_module_by_type` `ecto_schema_module`s are database-backed
will now require `:ecto_repo_module` to check if the `Ecto.Repo.t` is
sandboxed, which will be checked using the equivalent of

```elixir
ecto_repo_module.config()[:pool] == Ecto.Adapters.SQL.Sandbox
```

### `Retort.Resource.client_start_link`

`Retort.Resources`'s `client_start_link` arity changed from `0` to `1`,
so that it accept the `Retort.Resources.client_start_link_options/0` as
an argument.

If you previously did

```elixir
defmodule MyRPC.Authors do
  use Retort.Resources

  # ...

  def client_start_link do
    __MODULE__
    |> Retort.Resources.client_start_link_options()
    |> MyRPC.Clients.Author.start_link()
  end
end
```

Your `client_start_link` should now accept an `options` `Keyword.t`.

```elixir
defmodule MyRPC.Authors do
  use Retort.Resources

  # ...

  def client_start_link(options) do
    MyRPC.Clients.Author.start_link(options)
  end
end
```

The format (either being `[]` when not sandboxed or `[meta: ...]` when
sandboxed) of `options` is the same as previously returned by
`Retort.Resources.client_start_link_options`.

### `Retort.Resources` timeout configuration

There was a bug where `Retort.Resources.timeout/1` would look up the
timeout overrides using the pre-open-sourcing `:interpreter_server_rpc`
`Application` name instead of the correct `:retort` name, so if you
depended on that bug, you'll need to change your `config` or
`Application.put_env` calls.

If you previously had something like

```elixir
config :interpreter_server_rpc, MyRPC.Authors,
  timeout: 10_000 # milliseconds
```

You now need to do

```elixir
config :retort, MyRPC.Authors,
  timeout: 10_000 # milliseconds
```

### `Retort.Server.Generic.Resources` state

`changeset_render` is no longer needed for `Retort.Server.Generic.Resources`, so `Retort.Server.Generic.Resources.t` has been removed and the `Calcinator.t` that was at `:calcinator` in `Retort.Server.Generic.Resources.t` should be used as the state instead.
