I believe there’s a bug in the type for add_cascade_opts():
@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():
@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:
@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.


















