thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon South (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (THRIFT-4648) c_glib namespaces incorrect includes
Date Sun, 07 Oct 2018 11:15:00 GMT

     [ https://issues.apache.org/jira/browse/THRIFT-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Simon South reassigned THRIFT-4648:
-----------------------------------

    Assignee: Simon South

> c_glib namespaces incorrect includes
> ------------------------------------
>
>                 Key: THRIFT-4648
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4648
>             Project: Thrift
>          Issue Type: Bug
>          Components: C glib - Compiler
>    Affects Versions: 1.0
>         Environment: Thrift from GIT
> {noformat}
> $ ../build/compiler/cpp/bin/thrift --version
> Thrift version 1.0.0-dev
> {noformat}
> OS:
> {noformat}
> $ cat /etc/lsb-release 
> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=18.04
> DISTRIB_CODENAME=bionic
> DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"
> {noformat}
>            Reporter: Matej Kupljen
>            Assignee: Simon South
>            Priority: Major
>         Attachments: first.thrift, second.thrift
>
>
> When using namespaces for c_glib compiler generates incorrect code for #includes.
> Example:
> first.thrift
> {code:c}
> namespace c_glib F
>   
> struct first {
>         1: i32 test
> }
> {code}
> and second.thrift
> {code:c}
> namespace c_glib S
>   
> include "first.thrift"
> struct second {
>         1: first.first second
> }
> {code}
> As you can see, we use namespace F in first.thrift and namespace S in second.thrift.
> The compiler generates correct file names for those thrifts:
> {noformat}
> $ ls gen-c_glib/
> f_first_types.c  f_first_types.h  s_second_types.c  s_second_types.h
> {noformat}
> However, when generating s_second_types.h it uses namespace from second.thrift instead
of the one defined for first.thrift when generating #include statement.
> {code:c}
> /* base includes */
> #include <glib-object.h>
> #include <thrift/c_glib/thrift_struct.h>
> #include <thrift/c_glib/protocol/thrift_protocol.h>
> /* other thrift includes */
> #include "s_first_types.h"
> {code}
> It should use #include "f_first_types.h"



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message