Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler partially generating #137

Closed
trickster opened this issue Feb 25, 2020 · 1 comment
Closed

Compiler partially generating #137

trickster opened this issue Feb 25, 2020 · 1 comment

Comments

@trickster
Copy link

This file https://github.com/googleapis/googleapis/blob/master/google/firestore/v1/query.proto

StructuredQuery_Direction is generated but StructuredQuery_FieldFilter, StructuredQuery_UnaryFilter, StructuredQuery_Projection, StructuredQuery_Order etc. are not generated

# syntax: proto3
using ProtoBuf
import ProtoBuf.meta
import ProtoBuf.google.protobuf
import ._ProtoBuf_Top_.google

mutable struct Cursor <: ProtoType
    values::Base.Vector{Value}
    before::Bool
    Cursor(; kwargs...) = (o=new(); fillunset(o); isempty(kwargs) || ProtoBuf._protobuild(o, kwargs); o)
end #mutable struct Cursor

struct __enum_StructuredQuery_Direction <: ProtoEnum
    DIRECTION_UNSPECIFIED::Int32
    ASCENDING::Int32
    DESCENDING::Int32
    __enum_StructuredQuery_Direction() = new(0,1,2)
end #struct __enum_StructuredQuery_Direction
const StructuredQuery_Direction = __enum_StructuredQuery_Direction()

mutable struct StructuredQuery_Filter <: ProtoType
    composite_filter::Base.Any
    field_filter::StructuredQuery_FieldFilter
    unary_filter::StructuredQuery_UnaryFilter
    StructuredQuery_Filter(; kwargs...) = (o=new(); fillunset(o); isempty(kwargs) || ProtoBuf._protobuild(o, kwargs); o)
end #mutable struct StructuredQuery_Filter (has cyclic type dependency)
const __ftype_StructuredQuery_Filter = Dict(:composite_filter => "StructuredQuery_CompositeFilter")
const __oneofs_StructuredQuery_Filter = Int[1,1,1]
const __oneof_names_StructuredQuery_Filter = [Symbol("filter_type")]
meta(t::Type{StructuredQuery_Filter}) = meta(t, ProtoBuf.DEF_REQ, ProtoBuf.DEF_FNUM, ProtoBuf.DEF_VAL, true, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, __oneofs_StructuredQuery_Filter, __oneof_names_StructuredQuery_Filter, __ftype_StructuredQuery_Filter)

struct __enum_StructuredQuery_CompositeFilter_Operator <: ProtoEnum
    OPERATOR_UNSPECIFIED::Int32
    AND::Int32
    __enum_StructuredQuery_CompositeFilter_Operator() = new(0,1)
end #struct __enum_StructuredQuery_CompositeFilter_Operator
const StructuredQuery_CompositeFilter_Operator = __enum_StructuredQuery_CompositeFilter_Operator()

mutable struct StructuredQuery_CompositeFilter <: ProtoType
    op::Int32
    filters::Base.Vector{StructuredQuery_Filter}
    StructuredQuery_CompositeFilter(; kwargs...) = (o=new(); fillunset(o); isempty(kwargs) || ProtoBuf._protobuild(o, kwargs); o)
end #mutable struct StructuredQuery_CompositeFilter (has cyclic type dependency)

mutable struct StructuredQuery <: ProtoType
    select::StructuredQuery_Projection
    from::Base.Vector{StructuredQuery_CollectionSelector}
    where::StructuredQuery_Filter
    order_by::Base.Vector{StructuredQuery_Order}
    start_at::Cursor
    end_at::Cursor
    offset::Int32
    limit::ProtoBuf.google.protobuf.Int32Value
    StructuredQuery(; kwargs...) = (o=new(); fillunset(o); isempty(kwargs) || ProtoBuf._protobuild(o, kwargs); o)
end #mutable struct StructuredQuery (has cyclic type dependency)
const __fnum_StructuredQuery = Int[1,2,3,4,7,8,6,5]
meta(t::Type{StructuredQuery}) = meta(t, ProtoBuf.DEF_REQ, __fnum_StructuredQuery, ProtoBuf.DEF_VAL, true, ProtoBuf.DEF_PACK, ProtoBuf.DEF_WTYPES, ProtoBuf.DEF_ONEOFS, ProtoBuf.DEF_ONEOF_NAMES, ProtoBuf.DEF_FIELD_TYPES)

export StructuredQuery_Direction, StructuredQuery_CollectionSelector, StructuredQuery_Filter, StructuredQuery_CompositeFilter_Operator, StructuredQuery_CompositeFilter, StructuredQuery_FieldFilter_Operator, StructuredQuery_FieldFilter, StructuredQuery_UnaryFilter_Operator, StructuredQuery_UnaryFilter, StructuredQuery_Order, StructuredQuery_FieldReference, StructuredQuery_Projection, StructuredQuery, Cursor, StructuredQuery_Direction, StructuredQuery_Filter, StructuredQuery_CompositeFilter_Operator, StructuredQuery_CompositeFilter, StructuredQuery
@Drvi Drvi mentioned this issue Aug 16, 2022
@Drvi
Copy link
Member

Drvi commented Aug 18, 2022

The good news is that I think the new 1.0 release of this package should generate valid code for all of googleapis (apart from devtools which seems to be too big for Julia to include?). The bad news is that 1.0 does not support services and RPC, these are planned for 1.X release, there will be a separate issue for that.

Closing for now, but feel free to reopen if you find some other problems with googleapis translations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants