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

Michael Stockton commented on THRIFT-1204:
------------------------------------------

Yeah, it would be a pain to do an exact version match. Though, we could perform 
a pessimistic match to make sure the stubs are from the same minor family or 
greater (e.g. gem 'thrift', '~> 0.6'). The version number doesn't have to be 
dynamic either -- we could update it whenever an incompatibility is introduced. 
Users could avoid the extra scrutiny by setting an environment variable we 
could check for before specifying versions. 

This is just another idea. RUBY_API_VERSION would probably work fine too.

{code}
if defined?(Gem) and !ENV.has_key?("SOME_VAR_TO_SIGNAL_INCOMPAT_OK")
  gem "thrift", "~> 0.6"
end
{code}

> Ruby autogenerated files should require 'thrift' gem
> ----------------------------------------------------
>
>                 Key: THRIFT-1204
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1204
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Ruby - Compiler
>    Affects Versions: 0.6.1
>         Environment: All
>            Reporter: Ilya Maykov
>            Assignee: Ilya Maykov
>            Priority: Minor
>         Attachments: THRIFT-1204-require-thrift-in-gen-rb-files.patch
>
>
> The gen-rb files currently don't require the thrift gem. This means that the 
> user of such a file must explicitly require 'thrift' in his code before 
> requiring a gen-rb file, which can be a bit annoying (especially when 
> debugging / experimenting in IRB). I propose that we change the compiler to 
> add the require at the top of every gen-rb file.
> Patch coming shortly.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to