Skip to content

Commit

Permalink
fix depwarns
Browse files Browse the repository at this point in the history
  • Loading branch information
jClugstor committed Dec 13, 2024
1 parent c23e54e commit 78b1a97
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/OrdinaryDiffEqCore/src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,21 @@ function DiffEqBase.__init(
if use_old_kwargs
aliases = ODEAliasSpecifier()
if haskey(kwargs, :alias_u0)
Base.depwarn("alias_u0 keyword argument is deprecated, to set `alias_u0`,
please use an ODEAliasSpecifier, e.g. `solve(prob, alias = ODEAliasSpecifier(alias_u0 = true))", :alias_u0)
message = "`alias_u0` keyword argument is deprecated, to set `alias_u0`,
please use an ODEAliasSpecifier, e.g. `solve(prob, alias = ODEAliasSpecifier(alias_u0 = true))"
Base.depwarn(message, :init)
Base.depwarn(message, :solve)
@reset aliases.alias_u0 = values(kwargs).alias_u0
else
@reset aliases.alias_u0 = false

end

if haskey(kwargs, :alias_du0)
Base.depwarn("alias_du0 keyword argument is deprecated, to set `alias_du0`,
please use an ODEAliasSpecifier, e.g. `solve(prob, alias = ODEAliasSpecifier(alias_du0 = true))", :alias_du0)
message = "`alias_du0` keyword argument is deprecated, to set `alias_du0`,
please use an ODEAliasSpecifier, e.g. `solve(prob, alias = ODEAliasSpecifier(alias_du0 = true))"
Base.depwarn(message, :init)
Base.depwarn(message, :solve)
@reset aliases.alias_du0 = values(kwargs).alias_du0
else
@reset aliases.alias_du0 = false
Expand Down

0 comments on commit 78b1a97

Please sign in to comment.