thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (THRIFT-4648) c_glib namespaces incorrect includes
Date Fri, 12 Oct 2018 11:36:00 GMT

    [ https://issues.apache.org/jira/browse/THRIFT-4648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16647801#comment-16647801
] 

ASF GitHub Bot commented on THRIFT-4648:
----------------------------------------

jeking3 commented on issue #1609: THRIFT-4648: Use correct namespace in type names
URL: https://github.com/apache/thrift/pull/1609#issuecomment-429296340
 
 
   Build failure was unrelated.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> 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: 0.11.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