Skip to content

Commit ff56034

Browse files
authored
Merge pull request #620 from JuliaRobotics/depr/20Q3/leave_depr_longer
Put back some deprecated for a bit longer and backward compat for loadDFG
2 parents ff27aa4 + d5df251 commit ff56034

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

src/Deprecated.jl

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
##==============================================================================
22
# deprecation staging area
33
##==============================================================================
4-
54
##==============================================================================
6-
## Remove in 0.11
5+
## Deprecated in v0.9 Remove in the v0.10 cycle
76
##==============================================================================
87

9-
@deprecate listSolvekeys(x...; kwargs...) listSolveKeys(x...;kwargs...)
8+
Base.promote_rule(::Type{DateTime}, ::Type{ZonedDateTime}) = DateTime
9+
function Base.convert(::Type{DateTime}, ts::ZonedDateTime)
10+
@warn "DFG now uses ZonedDateTime, temporary promoting and converting to DateTime local time"
11+
return DateTime(ts, Local)
12+
end
13+
14+
@deprecate listSolvekeys(x...) listSolveKeys(x...)
15+
16+
##==============================================================================
17+
## Deprecated in v0.10 Remove in 0.11
18+
##==============================================================================
1019

1120
@deprecate addVariableSolverData!(dfg::AbstractDFG, variablekey::Symbol, vnd::VariableNodeData, solveKey::Symbol) addVariableSolverData!(dfg, variablekey, vnd)
1221

src/services/Serialization.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ function unpackVariableNodeData(dfg::G, d::PackedVariableNodeData)::VariableNode
190190

191191
@debug "Dispatching conversion packed variable -> variable for type $(string(d.softtype))"
192192
# Figuring out the softtype
193-
st = getTypeFromSerializationModule(d.softtype)
193+
# TODO deprecated remove in v0.11 - for backward compatibility for saved softtypes.
194+
ststring = string(split(d.softtype, "(")[1])
195+
st = getTypeFromSerializationModule(ststring)
194196
isnothing(st) && error("The variable doesn't seem to have a softtype. It needs to set up with an InferenceVariable from IIF. This will happen if you use DFG to add serialized variables directly and try use them. Please use IncrementalInference.addVariable().")
195197

196198
return VariableNodeData{st}(M3,M4, d.BayesNetOutVertIDs,

0 commit comments

Comments
 (0)