StructTypes.jl icon indicating copy to clipboard operation
StructTypes.jl copied to clipboard

`StructTypes.x` is not defined

Open lgeissbauer-btig opened this issue 3 years ago • 3 comments

@kshyatt

│┌ @ C:\.julia\packages\JSON3\CpNms\src\structs.jl:32 JSON3.:(var"#read#16")(false, pairs(NamedTuple()::NamedTuple{(), Tuple{}})::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, #self#::typeof(JSON3.read), str::String, _3::Type{TrinityApi._PipeCommunication.Data})
││┌ @ C:\.julia\packages\JSON3\CpNms\src\structs.jl:40  = JSON3.read(JSON3.StructType(T::Type{TrinityApi._PipeCommunication.Data})::StructTypes.UnorderedStruct, buf::Base.CodeUnits{UInt8, String}, pos::Int64, len::Int64, b::UInt8, T::Type{TrinityApi._PipeCommunication.Data})
│││┌ @ C:\.julia\packages\JSON3\CpNms\src\structs.jl:566 JSON3.:(var"#read#50")(pairs(NamedTuple()::NamedTuple{(), Tuple{}})::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, #self#::typeof(JSON3.read), _2::StructTypes.UnorderedStruct, buf::Base.CodeUnits{UInt8, String}, pos::Int64, len::Int64, b::UInt8, _7::Type{TrinityApi._PipeCommunication.Data})
││││┌ @ C:\.julia\packages\JSON3\CpNms\src\structs.jl:617 (JSON3.StructTypes).applyfield::typeof(StructTypes.applyfield)(c, T::Type{TrinityApi._PipeCommunication.Data}, key::Symbol)
│││││┌ @ C:\.julia\packages\StructTypes\AK4aM\src\StructTypes.jl:891 StructTypes.x
││││││ `StructTypes.x` is not defined
│││││└──────────────────────────────────────────────────────────────

lgeissbauer-btig avatar Jan 20 '23 14:01 lgeissbauer-btig

Ah thanks for calling this out. I'll take a look.

kshyatt avatar Jan 22 '23 00:01 kshyatt

What did you do to trigger this? Can you show a larger example, ideally including the commits/tags of JSON3 and StructTypes?

kshyatt avatar Jan 22 '23 00:01 kshyatt

I used JET.jl to analyse my code. I just use JSON3 and StructTypes in there

lgeissbauer-btig avatar Jan 23 '23 09:01 lgeissbauer-btig