|
79 | 79 |
|
80 | 80 | typeModuleName(varT::Type{<:InferenceVariable}) = typeModuleName(varT())
|
81 | 81 |
|
| 82 | +""" |
| 83 | + $(SIGNATURES) |
| 84 | +Get a type from the serialization module. |
| 85 | +""" |
82 | 86 | function getTypeFromSerializationModule(_typeString::AbstractString)
|
83 | 87 | @debug "DFG converting type string to Julia type" _typeString
|
84 | 88 | try
|
@@ -112,24 +116,6 @@ function getTypeFromSerializationModule(_typeString::AbstractString)
|
112 | 116 | nothing
|
113 | 117 | end
|
114 | 118 |
|
115 |
| -""" |
116 |
| - $(SIGNATURES) |
117 |
| -Get a type from the serialization module inside DFG. |
118 |
| -""" |
119 |
| -function getTypeFromSerializationModule(dfg::G, moduleType::Symbol) where G <: AbstractDFG |
120 |
| - @warn "Deprecating getTypeFromSerializationModule(dfg,symbol), use getTypeFromSerializationModule(string) instead." maxlog=10 |
121 |
| - st = nothing |
122 |
| - try |
123 |
| - st = getfield(Main, Symbol(moduleType)) |
124 |
| - catch ex |
125 |
| - @error "Unable to deserialize packed variableType $(moduleType)" |
126 |
| - io = IOBuffer() |
127 |
| - showerror(io, ex, catch_backtrace()) |
128 |
| - err = String(take!(io)) |
129 |
| - @error(err) |
130 |
| - end |
131 |
| - return st |
132 |
| -end |
133 | 119 |
|
134 | 120 | ##==============================================================================
|
135 | 121 | ## Variable Packing and unpacking
|
@@ -495,7 +481,7 @@ function unpackFactor(dfg::G, packedProps::Dict{String, Any}) where G <: Abstrac
|
495 | 481 | data = packedProps["data"]
|
496 | 482 | datatype = packedProps["fnctype"]
|
497 | 483 | @debug "DECODING factor type = '$(datatype)' for factor '$label'"
|
498 |
| - packtype = getTypeFromSerializationModule(dfg, Symbol("Packed"*datatype)) |
| 484 | + packtype = getTypeFromSerializationModule("Packed"*datatype) |
499 | 485 |
|
500 | 486 | # FIXME type instability from nothing to T
|
501 | 487 | packed = nothing
|
|
0 commit comments