File tree Expand file tree Collapse file tree 2 files changed +29
-5
lines changed Expand file tree Collapse file tree 2 files changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -55,9 +55,21 @@ function parseVariableType(_typeString::AbstractString)
55
55
typeString = _typeString
56
56
end
57
57
58
- all_subtypes = Dict ( map (s -> nameof (s) => s, subtypes (InferenceVariable) ))
58
+ split_typeSyms = Symbol .( split (typeString, " . " ))
59
59
60
- subtype = get (all_subtypes, Symbol (split (typeString, " ." )[end ]), nothing )
60
+ subtype = nothing
61
+
62
+ if length (split_typeSyms) == 1
63
+ @warn " Module not found in variable '$typeString '." maxlog = 1
64
+ subtype = getfield (Main, split_typeSyms[1 ]) # no module specified, use Main
65
+ # FIXME interm fallback for backwards compatibility in IIFTypes and RoMETypes
66
+ elseif split_typeSyms[1 ] in Symbol .(values (Base. loaded_modules))
67
+ m = getfield (Main, split_typeSyms[1 ])
68
+ subtype = getfield (m, split_typeSyms[end ])
69
+ else
70
+ @warn " Module not found in Main, using Main for type '$typeString '." maxlog = 1
71
+ subtype = getfield (Main, split_typeSyms[end ])
72
+ end
61
73
62
74
if isnothing (subtype)
63
75
throw (SerializationError (" Unable to deserialize type $(_typeString) , not found" ))
Original file line number Diff line number Diff line change 63
63
if get (ENV , " IIF_TEST" , " true" ) == " true"
64
64
65
65
# Switch to our upstream test branch.
66
+ # FIXME This is a temporary fix to use the develop branch of IIF.
67
+ # Pkg.add(PackageSpec(; name = "IncrementalInference", rev = "upstream/dfg_integration_test"))
68
+ # Pkg.add(PackageSpec(; name = "IncrementalInference", rev = "develop"))
66
69
Pkg. add (
67
- # FIXME This is a temporary fix to use the refactored factor branch.
68
- # PackageSpec(; name = "IncrementalInference", rev = "upstream/dfg_integration_test"),
69
- PackageSpec (; name = " IncrementalInference" , rev = " develop" ),
70
+ PackageSpec (;
71
+ url = " https://github.com/JuliaRobotics/IncrementalInference.jl.git" ,
72
+ subdir = " IncrementalInferenceTypes" ,
73
+ rev = " develop" ,
74
+ ),
75
+ )
76
+ Pkg. add (
77
+ PackageSpec (;
78
+ url = " https://github.com/JuliaRobotics/IncrementalInference.jl.git" ,
79
+ subdir = " IncrementalInference" ,
80
+ rev = " develop" ,
81
+ ),
70
82
)
71
83
@info " ------------------------------------------------------------------------"
72
84
@info " These tests are using IncrementalInference to do additional driver tests"
You can’t perform that action at this time.
0 commit comments