thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James E. King, III (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (THRIFT-3847) thrift/config.h includes a #define for VERSION which will likely conflict with existing user environment or code
Date Wed, 04 Oct 2017 14:01:00 GMT

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

James E. King, III reopened THRIFT-3847:
----------------------------------------

This is happening in the THRIFT-4351 ubuntu-artful CI builds:
{noformat}
../../../lib/cpp/src/thrift/config.h:370:17: error: expected unqualified-id before string
constant
 #define VERSION "1.0.0-dev"
{noformat}

Reopening...

> thrift/config.h includes a #define for VERSION which will likely conflict with existing
user environment or code
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-3847
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3847
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>    Affects Versions: 0.10.0
>         Environment: Ubuntu 14.04, used docker environment to build debian packages with
"dpkg-buildpackage -d -tc" inside the docker environment.
>            Reporter: James E. King, III
>            Assignee: James E. King, III
>            Priority: Minor
>             Fix For: 0.11.0
>
>
> The built debian package installs /usr/include/thrift/config.h which has a #define VERSION
in it.  This is likely to conflict with third party packages or end-user code.  It should
be changed to THRIFT_VERSION as soon as possible.  I recognize this is a breaking change but
also an easy one for people to absorb.  It just bit me on a project where VERSION was used
as a variable name in some tests, and in some generated code where VERSION was used as the
name of a string in a thrift structure, i.e.
> struct SomeStruct { 1: string VERSION }
> This won't build because the compiler will see VERSION in the generated code and change
it to a string constant from thrift/config.h, which won't compile.
> Follow-up: THRIFT-3873 changed from "VERSION" to "PACKAGE_VERSION", not "THRIFT_VERSION"
which was prescribed here.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message