JuliaData / StructTypes.jl

Abstract definitions and convenience methods for describing, processing, and constructing Julia objects
https://juliadata.github.io/StructTypes.jl/stable/
MIT License
80 stars 22 forks source link

`StructTypes.x` is not defined #92

Open lgeissbauer-btig opened 1 year ago

lgeissbauer-btig commented 1 year ago

@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
│││││└──────────────────────────────────────────────────────────────
kshyatt commented 1 year ago

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

kshyatt commented 1 year ago

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

lgeissbauer-btig commented 1 year ago

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