# \`Workflow.add\_cascade\` dialyzer error when adding deps

**URL:** <https://forum.elixirforum.com/t/workflow-add-cascade-dialyzer-error-when-adding-deps/71439>\
**Category:** Questions\
**Tags:** oban, oban-pro, oban-workflow\
**Created:** [June 26, 2025, 5:56pm UTC](https://forum.elixirforum.com/t/workflow-add-cascade-dialyzer-error-when-adding-deps/71439 "2025-06-26T17:56:01Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![al2o3cr](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/al2o3cr/32/3457_2.png) [@al2o3cr](https://forum.elixirforum.com/u/al2o3cr)\
**Post date:** [June 27, 2025, 1:58am UTC](https://forum.elixirforum.com/t/workflow-add-cascade-dialyzer-error-when-adding-deps/71439/2 "2025-06-27T01:58:42Z")

</div>

I believe there’s a bug in the type for `add_cascade_opts()`:

> **[add\_cascade\_opts() - Oban.Pro.Workflow — Oban Pro v1.7.7](https://oban.pro/docs/pro/1.6.0-rc.5/Oban.Pro.Workflow.html#t:add_cascade_opts/0)**
>
> Add a named job to the workflow along with optional dependencies.

```elixir
@type add_cascade_opts() :: [Oban.Job.option() | add_opts()]

@type add_opts() :: [
  deps: name() | [name()],
  ignore_cancelled: boolean(),
  ignore_deleted: boolean(),
  ignore_discarded: boolean()
]

```

The `|` operator normally expects options also separated with `|`, like `Oban.Job.option()`:

```elixir
@type option() ::
  {:args, args()}
  | {:max_attempts, pos_integer()}
  | {:meta, map()}
  | {:priority, 0..9}
  | etc

```

As currently written, the type means “a list where elements are either tuples from `Oban.Job.option()` or a keyword list shaped like `add_opts()`”, so something like `[[deps: :init]]` would match the current spec. (but presumably fail catastrophically where options are parsed)

I don’t currently have access to Oban Pro, but updating the definition of `add_cascade_opts` would likely remove the error you’re seeing:

```elixir
@type add_cascade_opts() :: [Oban.Job.option() | add_opt()]

@type add_opts() :: [add_opt()]

@type add_opt() ::
  {:deps, name() | [name()]}
  | {:ignore_cancelled, boolean()}
  | {:ignore_deleted, boolean()}
  | {:ignore_discarded, boolean()}

```

Beware that changes to files in `deps/` won’t get picked up by Dialyzer until you nuke `_build` and any cached PLTs.

---

_[View the full topic](https://forum.elixirforum.com/t/workflow-add-cascade-dialyzer-error-when-adding-deps/71439)._
