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

James E. King III commented on THRIFT-3384:
-------------------------------------------

Still present in CI builds.
{noformat}
namespaced generation
/thrift/src/lib/rb/spec/gen-rb/other_namespace/referenced_types.rb:11: warning: 
already initialized constant OtherNamespace::SomeEnum::ONE
/thrift/src/lib/rb/spec/gen-rb/flat/referenced_types.rb:11: warning: previous 
definition of ONE was here
/thrift/src/lib/rb/spec/gen-rb/other_namespace/referenced_types.rb:12: warning: 
already initialized constant OtherNamespace::SomeEnum::TWO
/thrift/src/lib/rb/spec/gen-rb/flat/referenced_types.rb:12: warning: previous 
definition of TWO was here
/thrift/src/lib/rb/spec/gen-rb/other_namespace/referenced_types.rb:13: warning: 
already initialized constant OtherNamespace::SomeEnum::VALUE_MAP
/thrift/src/lib/rb/spec/gen-rb/flat/referenced_types.rb:13: warning: previous 
definition of VALUE_MAP was here
/thrift/src/lib/rb/spec/gen-rb/other_namespace/referenced_types.rb:14: warning: 
already initialized constant OtherNamespace::SomeEnum::VALID_VALUES
/thrift/src/lib/rb/spec/gen-rb/flat/referenced_types.rb:14: warning: previous 
definition of VALID_VALUES was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_types.rb:14:
 warning: already initialized constant NamespacedSpecNamespace::Hello::GREETING
/thrift/src/lib/rb/spec/gen-rb/flat/thrift_namespaced_spec_types.rb:14: 
warning: previous definition of GREETING was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_types.rb:16:
 warning: already initialized constant NamespacedSpecNamespace::Hello::FIELDS
/thrift/src/lib/rb/spec/gen-rb/flat/thrift_namespaced_spec_types.rb:16: 
warning: previous definition of FIELDS was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:117:
 warning: already initialized constant 
NamespacedSpecNamespace::NamespacedNonblockingService::Greeting_args::ENGLISH
/thrift/src/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:117: 
warning: previous definition of ENGLISH was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:119:
 warning: already initialized constant 
NamespacedSpecNamespace::NamespacedNonblockingService::Greeting_args::FIELDS
/thrift/src/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:119: 
warning: previous definition of FIELDS was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:133:
 warning: already initialized constant 
NamespacedSpecNamespace::NamespacedNonblockingService::Greeting_result::SUCCESS
/thrift/src/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:133: 
warning: previous definition of SUCCESS was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:135:
 warning: already initialized constant 
NamespacedSpecNamespace::NamespacedNonblockingService::Greeting_result::FIELDS
/thrift/src/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:135: 
warning: previous definition of FIELDS was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:150:
 warning: already initialized constant 
NamespacedSpecNamespace::NamespacedNonblockingService::Block_args::FIELDS
/thrift/src/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:150: 
warning: previous definition of FIELDS was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:164:
 warning: already initialized constant 
NamespacedSpecNamespace::NamespacedNonblockingService::Block_result::SUCCESS
/thrift/src/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:164: 
warning: previous definition of SUCCESS was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:166:
 warning: already initialized constant 
NamespacedSpecNamespace::NamespacedNonblockingService::Block_result::FIELDS
/thrift/src/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:166: 
warning: previous definition of FIELDS was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:180:
 warning: already initialized constant 
NamespacedSpecNamespace::NamespacedNonblockingService::Unblock_args::N
/thrift/src/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:180: 
warning: previous definition of N was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:182:
 warning: already initialized constant 
NamespacedSpecNamespace::NamespacedNonblockingService::Unblock_args::FIELDS
/thrift/src/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:182: 
warning: previous definition of FIELDS was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:197:
 warning: already initialized constant 
NamespacedSpecNamespace::NamespacedNonblockingService::Unblock_result::FIELDS
/thrift/src/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:197: 
warning: previous definition of FIELDS was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:212:
 warning: already initialized constant 
NamespacedSpecNamespace::NamespacedNonblockingService::Shutdown_args::FIELDS
/thrift/src/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:212: 
warning: previous definition of FIELDS was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:227:
 warning: already initialized constant 
NamespacedSpecNamespace::NamespacedNonblockingService::Shutdown_result::FIELDS
/thrift/src/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:227: 
warning: previous definition of FIELDS was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:241:
 warning: already initialized constant 
NamespacedSpecNamespace::NamespacedNonblockingService::Sleep_args::SECONDS
/thrift/src/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:241: 
warning: previous definition of SECONDS was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:243:
 warning: already initialized constant 
NamespacedSpecNamespace::NamespacedNonblockingService::Sleep_args::FIELDS
/thrift/src/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:243: 
warning: previous definition of FIELDS was here
/thrift/src/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:258:
 warning: already initialized constant 
NamespacedSpecNamespace::NamespacedNonblockingService::Sleep_result::FIELDS
/thrift/src/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:258: 
warning: previous definition of FIELDS was here
{noformat}

> generated code produces warning: already initialized constant
> -------------------------------------------------------------
>
>                 Key: THRIFT-3384
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3384
>             Project: Thrift
>          Issue Type: Bug
>          Components: Ruby - Compiler
>    Affects Versions: 0.10.0, 0.11.0
>         Environment: openSUSE 
> ruby 2.1.3p242 (2014-09-19 revision 47630) [i586-linux-gnu]
>            Reporter: Jens Geyer
>            Priority: Minor
>
> This is an excerpt from {{make check}}
> {code}
>    should read string with unicode characters
>     should read binary
>     should read long binary
>   Thrift::JsonProtocolFactory
>     should create a JsonProtocol
> namespaced generation
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/other_namespace/referenced_types.rb:11:
>  warning: already initialized constant OtherNamespace::SomeEnum::ONE
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/referenced_types.rb:11:
>  warning: previous definition of ONE was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/other_namespace/referenced_types.rb:12:
>  warning: already initialized constant OtherNamespace::SomeEnum::TWO
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/referenced_types.rb:12:
>  warning: previous definition of TWO was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/other_namespace/referenced_types.rb:13:
>  warning: already initialized constant OtherNamespace::SomeEnum::VALUE_MAP
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/referenced_types.rb:13:
>  warning: previous definition of VALUE_MAP was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/other_namespace/referenced_types.rb:14:
>  warning: already initialized constant OtherNamespace::SomeEnum::VALID_VALUES
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/referenced_types.rb:14:
>  warning: previous definition of VALID_VALUES was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_types.rb:14:
>  warning: already initialized constant 
> NamespacedSpecNamespace::Hello::GREETING
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/thrift_namespaced_spec_types.rb:14:
>  warning: previous definition of GREETING was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/thrift_namespaced_spec_types.rb:16:
>  warning: already initialized constant NamespacedSpecNamespace::Hello::FIELDS
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/thrift_namespaced_spec_types.rb:16:
>  warning: previous definition of FIELDS was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:117:
>  warning: already initialized constant 
> NamespacedSpecNamespace::NamespacedNonblockingService::Greeting_args::ENGLISH
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:117:
>  warning: previous definition of ENGLISH was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:119:
>  warning: already initialized constant 
> NamespacedSpecNamespace::NamespacedNonblockingService::Greeting_args::FIELDS
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:119:
>  warning: previous definition of FIELDS was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:133:
>  warning: already initialized constant 
> NamespacedSpecNamespace::NamespacedNonblockingService::Greeting_result::SUCCESS
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:133:
>  warning: previous definition of SUCCESS was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:135:
>  warning: already initialized constant 
> NamespacedSpecNamespace::NamespacedNonblockingService::Greeting_result::FIELDS
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:135:
>  warning: previous definition of FIELDS was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:150:
>  warning: already initialized constant 
> NamespacedSpecNamespace::NamespacedNonblockingService::Block_args::FIELDS
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:150:
>  warning: previous definition of FIELDS was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:164:
>  warning: already initialized constant 
> NamespacedSpecNamespace::NamespacedNonblockingService::Block_result::SUCCESS
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:164:
>  warning: previous definition of SUCCESS was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:166:
>  warning: already initialized constant 
> NamespacedSpecNamespace::NamespacedNonblockingService::Block_result::FIELDS
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:166:
>  warning: previous definition of FIELDS was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:180:
>  warning: already initialized constant 
> NamespacedSpecNamespace::NamespacedNonblockingService::Unblock_args::N
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:180:
>  warning: previous definition of N was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:182:
>  warning: already initialized constant 
> NamespacedSpecNamespace::NamespacedNonblockingService::Unblock_args::FIELDS
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:182:
>  warning: previous definition of FIELDS was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:197:
>  warning: already initialized constant 
> NamespacedSpecNamespace::NamespacedNonblockingService::Unblock_result::FIELDS
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:197:
>  warning: previous definition of FIELDS was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:212:
>  warning: already initialized constant 
> NamespacedSpecNamespace::NamespacedNonblockingService::Shutdown_args::FIELDS
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:212:
>  warning: previous definition of FIELDS was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:227:
>  warning: already initialized constant 
> NamespacedSpecNamespace::NamespacedNonblockingService::Shutdown_result::FIELDS
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:227:
>  warning: previous definition of FIELDS was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:241:
>  warning: already initialized constant 
> NamespacedSpecNamespace::NamespacedNonblockingService::Sleep_args::SECONDS
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:241:
>  warning: previous definition of SECONDS was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:243:
>  warning: already initialized constant 
> NamespacedSpecNamespace::NamespacedNonblockingService::Sleep_args::FIELDS
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:243:
>  warning: previous definition of FIELDS was here
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/namespaced_spec_namespace/namespaced_nonblocking_service.rb:258:
>  warning: already initialized constant 
> NamespacedSpecNamespace::NamespacedNonblockingService::Sleep_result::FIELDS
> /home/jens/Arbeitsfläche/Thrift/lib/rb/spec/gen-rb/flat/namespaced_nonblocking_service.rb:258:
>  warning: previous definition of FIELDS was here
>   generated the right files
>   did not generate the wrong files
>   has a service class in the right place
>   has a struct in the right place
>   required an included file
>   extended a service
> {code}



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

Reply via email to