From 309830f6b8c09347db305acf3b05fca333030989 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 5 Feb 2016 11:30:00 -0800 Subject: Replace 'long' with 'int64_t' in public core headers --- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/ruby') diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index 45e9b47574..618ae5e7fc 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -655,22 +655,22 @@ extern gpr_time_add_type gpr_time_add_import; typedef gpr_timespec(*gpr_time_sub_type)(gpr_timespec a, gpr_timespec b); extern gpr_time_sub_type gpr_time_sub_import; #define gpr_time_sub gpr_time_sub_import -typedef gpr_timespec(*gpr_time_from_micros_type)(long x, gpr_clock_type clock_type); +typedef gpr_timespec(*gpr_time_from_micros_type)(int64_t x, gpr_clock_type clock_type); extern gpr_time_from_micros_type gpr_time_from_micros_import; #define gpr_time_from_micros gpr_time_from_micros_import -typedef gpr_timespec(*gpr_time_from_nanos_type)(long x, gpr_clock_type clock_type); +typedef gpr_timespec(*gpr_time_from_nanos_type)(int64_t x, gpr_clock_type clock_type); extern gpr_time_from_nanos_type gpr_time_from_nanos_import; #define gpr_time_from_nanos gpr_time_from_nanos_import -typedef gpr_timespec(*gpr_time_from_millis_type)(long x, gpr_clock_type clock_type); +typedef gpr_timespec(*gpr_time_from_millis_type)(int64_t x, gpr_clock_type clock_type); extern gpr_time_from_millis_type gpr_time_from_millis_import; #define gpr_time_from_millis gpr_time_from_millis_import -typedef gpr_timespec(*gpr_time_from_seconds_type)(long x, gpr_clock_type clock_type); +typedef gpr_timespec(*gpr_time_from_seconds_type)(int64_t x, gpr_clock_type clock_type); extern gpr_time_from_seconds_type gpr_time_from_seconds_import; #define gpr_time_from_seconds gpr_time_from_seconds_import -typedef gpr_timespec(*gpr_time_from_minutes_type)(long x, gpr_clock_type clock_type); +typedef gpr_timespec(*gpr_time_from_minutes_type)(int64_t x, gpr_clock_type clock_type); extern gpr_time_from_minutes_type gpr_time_from_minutes_import; #define gpr_time_from_minutes gpr_time_from_minutes_import -typedef gpr_timespec(*gpr_time_from_hours_type)(long x, gpr_clock_type clock_type); +typedef gpr_timespec(*gpr_time_from_hours_type)(int64_t x, gpr_clock_type clock_type); extern gpr_time_from_hours_type gpr_time_from_hours_import; #define gpr_time_from_hours gpr_time_from_hours_import typedef int32_t(*gpr_time_to_millis_type)(gpr_timespec timespec); -- cgit v1.2.3 From 5219c6d8e8ae0c584b0014166b7cf73dbfc8d456 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 5 Feb 2016 22:22:29 +0100 Subject: Properly compiling distributable native gems. --- Rakefile | 16 ++++++++++++---- src/ruby/ext/grpc/extconf.rb | 1 + third_party/rake-compiler-dock/Dockerfile | 15 ++++++++++++++- 3 files changed, 27 insertions(+), 5 deletions(-) (limited to 'src/ruby') diff --git a/Rakefile b/Rakefile index 3a30920fea..7040696947 100755 --- a/Rakefile +++ b/Rakefile @@ -23,7 +23,15 @@ Rake::ExtensionTask.new('grpc_c', spec) do |ext| ext.ext_dir = File.join('src', 'ruby', 'ext', 'grpc') ext.lib_dir = File.join('src', 'ruby', 'lib', 'grpc') ext.cross_compile = true - ext.cross_platform = ['x86-mingw32', 'x64-mingw32'] + ext.cross_platform = [ + 'x86-mingw32', 'x64-mingw32', + 'x86_64-linux', 'x86-linux', + 'x86_64-darwin-11', + 'x86_64-darwin-12', + 'x86_64-darwin-13', + 'x86_64-darwin-14', + 'x86_64-darwin-15' + ] ext.cross_compiling do |spec| spec.files = %w( etc/roots.pem grpc_c.32.ruby grpc_c.64.ruby ) spec.files += Dir.glob('src/ruby/bin/**/*') @@ -91,8 +99,8 @@ task 'dlls' do end -desc 'Build the gem file under rake_compiler_dock' -task 'gem:windows' do +desc 'Build the native gem file under rake_compiler_dock' +task 'gem:native' do verbose = ENV['V'] || '0' docker_for_windows "bundle && rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.6:2.0.0 V=#{verbose}" @@ -105,7 +113,7 @@ task 'suite:bidi' => 'suite:wrapper' task 'suite:server' => 'suite:wrapper' task 'suite:pb' => 'suite:server' -task 'gem:windows' => 'dlls' +task 'gem:native' => 'dlls' desc 'Compiles the gRPC extension then runs all the tests' task all: ['suite:idiomatic', 'suite:bidi', 'suite:pb', 'suite:server'] diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb index 426a6e67a0..503403392d 100644 --- a/src/ruby/ext/grpc/extconf.rb +++ b/src/ruby/ext/grpc/extconf.rb @@ -75,6 +75,7 @@ unless File.exist?(File.join(grpc_lib_dir, 'libgrpc.a')) or windows ENV['EMBED_OPENSSL'] = 'true' ENV['EMBED_ZLIB'] = 'true' + ENV['ARCH_FLAGS'] = RbConfig::CONFIG['ARCH_FLAG'] ENV['ARCH_FLAGS'] = '-arch i386 -arch x86_64' if RUBY_PLATFORM =~ /darwin/ output_dir = File.expand_path(RbConfig::CONFIG['topdir']) diff --git a/third_party/rake-compiler-dock/Dockerfile b/third_party/rake-compiler-dock/Dockerfile index 28623c3028..be73e2d8f4 100644 --- a/third_party/rake-compiler-dock/Dockerfile +++ b/third_party/rake-compiler-dock/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:14.04 RUN apt-get -y update && \ - apt-get install -y curl git-core mingw-w64 xz-utils build-essential wget unzip + apt-get install -y curl git-core mingw-w64 xz-utils build-essential gcc-multilib wget unzip RUN mkdir -p /opt/mingw && \ curl -SL http://downloads.sourceforge.net/mingw-w64/i686-w64-mingw32-gcc-4.7.2-release-linux64_rubenvb.tar.xz | \ @@ -103,12 +103,25 @@ RUN bash -c "rvm use 2.3.0 --default && \ export MAKE=\"make -j`nproc`\" CFLAGS='-s -O1 -fno-omit-frame-pointer -fno-fast-math' && \ rake-compiler cross-ruby VERSION=2.3.0 HOST=i686-w64-mingw32 && \ rake-compiler cross-ruby VERSION=2.3.0 HOST=x86_64-w64-mingw32 && \ + rake-compiler cross-ruby VERSION=2.3.0 HOST=x86_64-linux-gnu && \ rake-compiler cross-ruby VERSION=2.2.2 HOST=i686-w64-mingw32 && \ rake-compiler cross-ruby VERSION=2.2.2 HOST=x86_64-w64-mingw32 && \ + rake-compiler cross-ruby VERSION=2.2.2 HOST=x86_64-linux-gnu && \ rake-compiler cross-ruby VERSION=2.1.6 HOST=i686-w64-mingw32 && \ rake-compiler cross-ruby VERSION=2.1.6 HOST=x86_64-w64-mingw32 && \ + rake-compiler cross-ruby VERSION=2.1.6 HOST=x86_64-linux-gnu && \ rake-compiler cross-ruby VERSION=2.0.0-p645 HOST=i686-w64-mingw32 && \ rake-compiler cross-ruby VERSION=2.0.0-p645 HOST=x86_64-w64-mingw32 && \ + rake-compiler cross-ruby VERSION=2.0.0-p645 HOST=x86_64-linux-gnu && \ + rm -rf ~/.rake-compiler/tmp/builds ~/.rake-compiler/sources && \ + find /usr/local/rvm -type d -print0 | sudo xargs -0 chmod g+sw " + +RUN bash -c "rvm use 2.3.0 --default && \ + export MAKE=\"make -j`nproc`\" CFLAGS='-m32 -s -O1 -fno-omit-frame-pointer -fno-fast-math' LDFLAGS='-m32' && \ + rake-compiler cross-ruby VERSION=2.3.0 HOST=i686-linux-gnu && \ + rake-compiler cross-ruby VERSION=2.2.2 HOST=i686-linux-gnu && \ + rake-compiler cross-ruby VERSION=2.1.6 HOST=i686-linux-gnu && \ + rake-compiler cross-ruby VERSION=2.0.0-p645 HOST=i686-linux-gnu && \ rm -rf ~/.rake-compiler/tmp/builds ~/.rake-compiler/sources && \ find /usr/local/rvm -type d -print0 | sudo xargs -0 chmod g+sw " -- cgit v1.2.3 From 86cbe3087ca5817416f9045047c9bb478dff8cb6 Mon Sep 17 00:00:00 2001 From: Nicolas Noble Date: Fri, 5 Feb 2016 15:08:12 -0800 Subject: Fixing Mac build for Ruby. --- Rakefile | 18 ++++++++++-------- src/ruby/ext/grpc/extconf.rb | 2 ++ src/ruby/ext/grpc/rb_channel.c | 2 +- src/ruby/ext/grpc/rb_server_credentials.c | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) (limited to 'src/ruby') diff --git a/Rakefile b/Rakefile index 7040696947..1f9bbcf7f6 100755 --- a/Rakefile +++ b/Rakefile @@ -3,6 +3,7 @@ require 'rake/extensiontask' require 'rspec/core/rake_task' require 'rubocop/rake_task' require 'bundler/gem_tasks' +require 'fileutils' load 'tools/distrib/docker_for_windows.rb' @@ -26,11 +27,7 @@ Rake::ExtensionTask.new('grpc_c', spec) do |ext| ext.cross_platform = [ 'x86-mingw32', 'x64-mingw32', 'x86_64-linux', 'x86-linux', - 'x86_64-darwin-11', - 'x86_64-darwin-12', - 'x86_64-darwin-13', - 'x86_64-darwin-14', - 'x86_64-darwin-15' + 'universal-darwin' ] ext.cross_compiling do |spec| spec.files = %w( etc/roots.pem grpc_c.32.ruby grpc_c.64.ruby ) @@ -103,7 +100,14 @@ desc 'Build the native gem file under rake_compiler_dock' task 'gem:native' do verbose = ENV['V'] || '0' - docker_for_windows "bundle && rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.6:2.0.0 V=#{verbose}" + if RUBY_PLATFORM =~ /darwin/ + FileUtils.touch 'grpc_c.32.ruby' + FileUtils.touch 'grpc_c.64.ruby' + system "rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.6:2.0.0 V=#{verbose}" + else + Rake::Task['dlls'].execute + docker_for_windows "bundle && rake cross native gem RUBY_CC_VERSION=2.3.0:2.2.2:2.1.6:2.0.0 V=#{verbose}" + end end # Define dependencies between the suites. @@ -113,8 +117,6 @@ task 'suite:bidi' => 'suite:wrapper' task 'suite:server' => 'suite:wrapper' task 'suite:pb' => 'suite:server' -task 'gem:native' => 'dlls' - desc 'Compiles the gRPC extension then runs all the tests' task all: ['suite:idiomatic', 'suite:bidi', 'suite:pb', 'suite:server'] task default: :all diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb index 503403392d..b7c6cb3d7e 100644 --- a/src/ruby/ext/grpc/extconf.rb +++ b/src/ruby/ext/grpc/extconf.rb @@ -66,6 +66,8 @@ else grpc_lib_dir = File.join(grpc_root, 'libs', grpc_config) end +ENV['MACOSX_DEPLOYMENT_TARGET'] = '10.7' + unless File.exist?(File.join(grpc_lib_dir, 'libgrpc.a')) or windows ENV['AR'] = RbConfig::CONFIG['AR'] + ' rcs' ENV['CC'] = RbConfig::CONFIG['CC'] diff --git a/src/ruby/ext/grpc/rb_channel.c b/src/ruby/ext/grpc/rb_channel.c index d1e48753f2..0e6badbdaf 100644 --- a/src/ruby/ext/grpc/rb_channel.c +++ b/src/ruby/ext/grpc/rb_channel.c @@ -229,7 +229,7 @@ static VALUE grpc_rb_channel_watch_connectivity_state(VALUE self, } grpc_channel_watch_connectivity_state( ch, - NUM2LONG(last_state), + (grpc_connectivity_state)NUM2LONG(last_state), grpc_rb_time_timeval(deadline, /* absolute time */ 0), cq, ROBJECT(tag)); diff --git a/src/ruby/ext/grpc/rb_server_credentials.c b/src/ruby/ext/grpc/rb_server_credentials.c index f866aecd28..4ea59b6b27 100644 --- a/src/ruby/ext/grpc/rb_server_credentials.c +++ b/src/ruby/ext/grpc/rb_server_credentials.c @@ -177,7 +177,7 @@ static VALUE grpc_rb_server_credentials_init(VALUE self, VALUE pem_root_certs, VALUE key = Qnil; VALUE key_cert = Qnil; int auth_client = 0; - int num_key_certs = 0; + long num_key_certs = 0; int i; if (NIL_P(force_client_auth) || -- cgit v1.2.3 From 1be92658ef0a66108fa997b2f8b857f387fb8662 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 6 Feb 2016 09:30:19 +0100 Subject: Versionning Ruby from build.yaml, and regenerating broken files after census merge. --- src/python/grpcio/grpc/_cython/imports.generated.c | 36 ++++++-------- src/python/grpcio/grpc/_cython/imports.generated.h | 58 ++++++++++------------ src/ruby/lib/grpc/version.rb | 2 +- templates/src/ruby/lib/grpc/version.rb.template | 35 +++++++++++++ 4 files changed, 78 insertions(+), 53 deletions(-) create mode 100644 templates/src/ruby/lib/grpc/version.rb.template (limited to 'src/ruby') diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index b818f3491b..817303c8a4 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -41,7 +41,14 @@ census_initialize_type census_initialize_import; census_shutdown_type census_shutdown_import; census_supported_type census_supported_import; census_enabled_type census_enabled_import; -census_context_serialize_type census_context_serialize_import; +census_context_create_type census_context_create_import; +census_context_destroy_type census_context_destroy_import; +census_context_get_status_type census_context_get_status_import; +census_context_initialize_iterator_type census_context_initialize_iterator_import; +census_context_next_tag_type census_context_next_tag_import; +census_context_get_tag_type census_context_get_tag_import; +census_context_encode_type census_context_encode_import; +census_context_decode_type census_context_decode_import; census_trace_mask_type census_trace_mask_import; census_set_trace_mask_type census_set_trace_mask_import; census_start_rpc_op_timestamp_type census_start_rpc_op_timestamp_import; @@ -54,15 +61,6 @@ census_trace_print_type census_trace_print_import; census_trace_scan_start_type census_trace_scan_start_import; census_get_trace_record_type census_get_trace_record_import; census_trace_scan_end_type census_trace_scan_end_import; -census_tag_set_create_type census_tag_set_create_import; -census_tag_set_destroy_type census_tag_set_destroy_import; -census_tag_set_get_create_status_type census_tag_set_get_create_status_import; -census_tag_set_initialize_iterator_type census_tag_set_initialize_iterator_import; -census_tag_set_next_tag_type census_tag_set_next_tag_import; -census_tag_set_get_tag_by_key_type census_tag_set_get_tag_by_key_import; -census_tag_set_encode_type census_tag_set_encode_import; -census_tag_set_decode_type census_tag_set_decode_import; -census_context_tag_set_type census_context_tag_set_import; census_record_values_type census_record_values_import; census_view_create_type census_view_create_import; census_view_delete_type census_view_delete_import; @@ -303,7 +301,14 @@ void pygrpc_load_imports(HMODULE library) { census_shutdown_import = (census_shutdown_type) GetProcAddress(library, "census_shutdown"); census_supported_import = (census_supported_type) GetProcAddress(library, "census_supported"); census_enabled_import = (census_enabled_type) GetProcAddress(library, "census_enabled"); - census_context_serialize_import = (census_context_serialize_type) GetProcAddress(library, "census_context_serialize"); + census_context_create_import = (census_context_create_type) GetProcAddress(library, "census_context_create"); + census_context_destroy_import = (census_context_destroy_type) GetProcAddress(library, "census_context_destroy"); + census_context_get_status_import = (census_context_get_status_type) GetProcAddress(library, "census_context_get_status"); + census_context_initialize_iterator_import = (census_context_initialize_iterator_type) GetProcAddress(library, "census_context_initialize_iterator"); + census_context_next_tag_import = (census_context_next_tag_type) GetProcAddress(library, "census_context_next_tag"); + census_context_get_tag_import = (census_context_get_tag_type) GetProcAddress(library, "census_context_get_tag"); + census_context_encode_import = (census_context_encode_type) GetProcAddress(library, "census_context_encode"); + census_context_decode_import = (census_context_decode_type) GetProcAddress(library, "census_context_decode"); census_trace_mask_import = (census_trace_mask_type) GetProcAddress(library, "census_trace_mask"); census_set_trace_mask_import = (census_set_trace_mask_type) GetProcAddress(library, "census_set_trace_mask"); census_start_rpc_op_timestamp_import = (census_start_rpc_op_timestamp_type) GetProcAddress(library, "census_start_rpc_op_timestamp"); @@ -316,15 +321,6 @@ void pygrpc_load_imports(HMODULE library) { census_trace_scan_start_import = (census_trace_scan_start_type) GetProcAddress(library, "census_trace_scan_start"); census_get_trace_record_import = (census_get_trace_record_type) GetProcAddress(library, "census_get_trace_record"); census_trace_scan_end_import = (census_trace_scan_end_type) GetProcAddress(library, "census_trace_scan_end"); - census_tag_set_create_import = (census_tag_set_create_type) GetProcAddress(library, "census_tag_set_create"); - census_tag_set_destroy_import = (census_tag_set_destroy_type) GetProcAddress(library, "census_tag_set_destroy"); - census_tag_set_get_create_status_import = (census_tag_set_get_create_status_type) GetProcAddress(library, "census_tag_set_get_create_status"); - census_tag_set_initialize_iterator_import = (census_tag_set_initialize_iterator_type) GetProcAddress(library, "census_tag_set_initialize_iterator"); - census_tag_set_next_tag_import = (census_tag_set_next_tag_type) GetProcAddress(library, "census_tag_set_next_tag"); - census_tag_set_get_tag_by_key_import = (census_tag_set_get_tag_by_key_type) GetProcAddress(library, "census_tag_set_get_tag_by_key"); - census_tag_set_encode_import = (census_tag_set_encode_type) GetProcAddress(library, "census_tag_set_encode"); - census_tag_set_decode_import = (census_tag_set_decode_type) GetProcAddress(library, "census_tag_set_decode"); - census_context_tag_set_import = (census_context_tag_set_type) GetProcAddress(library, "census_context_tag_set"); census_record_values_import = (census_record_values_type) GetProcAddress(library, "census_record_values"); census_view_create_import = (census_view_create_type) GetProcAddress(library, "census_view_create"); census_view_delete_import = (census_view_delete_type) GetProcAddress(library, "census_view_delete"); diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index 2a8a910055..f85d416db8 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -73,9 +73,30 @@ extern census_supported_type census_supported_import; typedef int(*census_enabled_type)(void); extern census_enabled_type census_enabled_import; #define census_enabled census_enabled_import -typedef size_t(*census_context_serialize_type)(const census_context *context, char *buffer, size_t buf_size); -extern census_context_serialize_type census_context_serialize_import; -#define census_context_serialize census_context_serialize_import +typedef census_context *(*census_context_create_type)(const census_context *base, const census_tag *tags, int ntags, census_context_status const **status); +extern census_context_create_type census_context_create_import; +#define census_context_create census_context_create_import +typedef void(*census_context_destroy_type)(census_context *context); +extern census_context_destroy_type census_context_destroy_import; +#define census_context_destroy census_context_destroy_import +typedef const census_context_status *(*census_context_get_status_type)(const census_context *context); +extern census_context_get_status_type census_context_get_status_import; +#define census_context_get_status census_context_get_status_import +typedef void(*census_context_initialize_iterator_type)(const census_context *context, census_context_iterator *iterator); +extern census_context_initialize_iterator_type census_context_initialize_iterator_import; +#define census_context_initialize_iterator census_context_initialize_iterator_import +typedef int(*census_context_next_tag_type)(census_context_iterator *iterator, census_tag *tag); +extern census_context_next_tag_type census_context_next_tag_import; +#define census_context_next_tag census_context_next_tag_import +typedef int(*census_context_get_tag_type)(const census_context *context, const char *key, census_tag *tag); +extern census_context_get_tag_type census_context_get_tag_import; +#define census_context_get_tag census_context_get_tag_import +typedef char *(*census_context_encode_type)(const census_context *context, char *buffer, size_t buf_size, size_t *print_buf_size, size_t *bin_buf_size); +extern census_context_encode_type census_context_encode_import; +#define census_context_encode census_context_encode_import +typedef census_context *(*census_context_decode_type)(const char *buffer, size_t size, const char *bin_buffer, size_t bin_size); +extern census_context_decode_type census_context_decode_import; +#define census_context_decode census_context_decode_import typedef int(*census_trace_mask_type)(const census_context *context); extern census_trace_mask_type census_trace_mask_import; #define census_trace_mask census_trace_mask_import @@ -112,37 +133,10 @@ extern census_get_trace_record_type census_get_trace_record_import; typedef void(*census_trace_scan_end_type)(); extern census_trace_scan_end_type census_trace_scan_end_import; #define census_trace_scan_end census_trace_scan_end_import -typedef census_tag_set *(*census_tag_set_create_type)(const census_tag_set *base, const census_tag *tags, int ntags, census_tag_set_create_status const **status); -extern census_tag_set_create_type census_tag_set_create_import; -#define census_tag_set_create census_tag_set_create_import -typedef void(*census_tag_set_destroy_type)(census_tag_set *tags); -extern census_tag_set_destroy_type census_tag_set_destroy_import; -#define census_tag_set_destroy census_tag_set_destroy_import -typedef const census_tag_set_create_status *(*census_tag_set_get_create_status_type)(const census_tag_set *tags); -extern census_tag_set_get_create_status_type census_tag_set_get_create_status_import; -#define census_tag_set_get_create_status census_tag_set_get_create_status_import -typedef void(*census_tag_set_initialize_iterator_type)(const census_tag_set *tags, census_tag_set_iterator *iterator); -extern census_tag_set_initialize_iterator_type census_tag_set_initialize_iterator_import; -#define census_tag_set_initialize_iterator census_tag_set_initialize_iterator_import -typedef int(*census_tag_set_next_tag_type)(census_tag_set_iterator *iterator, census_tag *tag); -extern census_tag_set_next_tag_type census_tag_set_next_tag_import; -#define census_tag_set_next_tag census_tag_set_next_tag_import -typedef int(*census_tag_set_get_tag_by_key_type)(const census_tag_set *tags, const char *key, census_tag *tag); -extern census_tag_set_get_tag_by_key_type census_tag_set_get_tag_by_key_import; -#define census_tag_set_get_tag_by_key census_tag_set_get_tag_by_key_import -typedef char *(*census_tag_set_encode_type)(const census_tag_set *tags, char *buffer, size_t buf_size, size_t *print_buf_size, size_t *bin_buf_size); -extern census_tag_set_encode_type census_tag_set_encode_import; -#define census_tag_set_encode census_tag_set_encode_import -typedef census_tag_set *(*census_tag_set_decode_type)(const char *buffer, size_t size, const char *bin_buffer, size_t bin_size); -extern census_tag_set_decode_type census_tag_set_decode_import; -#define census_tag_set_decode census_tag_set_decode_import -typedef census_tag_set *(*census_context_tag_set_type)(census_context *context); -extern census_context_tag_set_type census_context_tag_set_import; -#define census_context_tag_set census_context_tag_set_import typedef void(*census_record_values_type)(census_context *context, census_value *values, size_t nvalues); extern census_record_values_type census_record_values_import; #define census_record_values census_record_values_import -typedef census_view *(*census_view_create_type)(uint32_t metric_id, const census_tag_set *tags, const census_aggregation *aggregations, size_t naggregations); +typedef census_view *(*census_view_create_type)(uint32_t metric_id, const census_context *tags, const census_aggregation *aggregations, size_t naggregations); extern census_view_create_type census_view_create_import; #define census_view_create census_view_create_import typedef void(*census_view_delete_type)(census_view *view); @@ -154,7 +148,7 @@ extern census_view_metric_type census_view_metric_import; typedef size_t(*census_view_naggregations_type)(const census_view *view); extern census_view_naggregations_type census_view_naggregations_import; #define census_view_naggregations census_view_naggregations_import -typedef const census_tag_set *(*census_view_tags_type)(const census_view *view); +typedef const census_context *(*census_view_tags_type)(const census_view *view); extern census_view_tags_type census_view_tags_import; #define census_view_tags census_view_tags_import typedef const census_aggregation *(*census_view_aggregrations_type)(const census_view *view); diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 956e0222df..89ff882916 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.12.0' + VERSION = '0.13.0.0' end diff --git a/templates/src/ruby/lib/grpc/version.rb.template b/templates/src/ruby/lib/grpc/version.rb.template new file mode 100644 index 0000000000..4859d2f883 --- /dev/null +++ b/templates/src/ruby/lib/grpc/version.rb.template @@ -0,0 +1,35 @@ +%YAML 1.2 +--- | + # Copyright 2015-2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + # GRPC contains the General RPC module. + module GRPC + VERSION = '${settings.version.major}.${settings.version.minor}.${settings.version.micro}.${settings.version.build}' + end -- cgit v1.2.3 From f008f067f82d88cbcd70a104e20479d4ed3a3386 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 8 Feb 2016 12:48:03 -0800 Subject: build.yaml centric versioning --- Makefile | 2 +- build.yaml | 12 +-- setup.py | 3 +- src/core/surface/version.c | 2 +- src/csharp/Grpc.Core/VersionInfo.cs | 2 +- src/csharp/build_packages.bat | 2 +- src/python/grpcio/grpc_version.py | 32 ++++++++ src/ruby/lib/grpc/version.rb | 2 +- templates/Makefile.template | 12 +-- templates/src/core/surface/version.c.template | 3 +- .../src/csharp/Grpc.Core/VersionInfo.cs.template | 2 +- templates/src/csharp/build_packages.bat.template | 2 +- .../src/python/grpcio/grpc_version.py.template | 34 ++++++++ templates/src/ruby/lib/grpc/version.rb.template | 2 +- templates/tools/doxygen/Doxyfile.include | 2 +- tools/buildgen/build-cleaner.py | 3 - tools/buildgen/plugins/expand_version.py | 94 ++++++++++++++++++++++ tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- 21 files changed, 188 insertions(+), 31 deletions(-) create mode 100644 src/python/grpcio/grpc_version.py create mode 100644 templates/src/python/grpcio/grpc_version.py.template create mode 100755 tools/buildgen/plugins/expand_version.py (limited to 'src/ruby') diff --git a/Makefile b/Makefile index 16e6b32eba..c023ee9603 100644 --- a/Makefile +++ b/Makefile @@ -361,7 +361,7 @@ E = @echo Q = @ endif -VERSION = 0.13.0.0 +VERSION = 0.13.0-dev CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index b615945198..6c42ec8269 100644 --- a/build.yaml +++ b/build.yaml @@ -2,12 +2,12 @@ '#2': It is used among other things to generate all of our project files. '#3': Please refer to the templates directory for more information. settings: - '#': The public version number of the library. - version: - major: 0 - minor: 13 - micro: 0 - build: 0 + '#1': The public version number of the library. + '#2': Master always has a "-dev" suffix + '#3': Use "-preN" suffixes to identify pre-release versions + '#4': Per-language overrides are possible with (eg) ruby_version security_connector_test + '#5': See the expand_version.py for all the quirks here + version: 0.13.0-dev filegroups: - name: census public_headers: diff --git a/setup.py b/setup.py index 80828a3b4a..f8450a7677 100644 --- a/setup.py +++ b/setup.py @@ -54,6 +54,7 @@ sys.path.insert(0, os.path.abspath(PYTHON_STEM)) # Break import-style to ensure we can actually find our in-repo dependencies. import commands import grpc_core_dependencies +import grpc_version LICENSE = '3-clause BSD' @@ -218,7 +219,7 @@ else: setuptools.setup( name='grpcio', - version='0.12.0b8', + version=grpc_version.VERSION, license=LICENSE, ext_modules=CYTHON_EXTENSION_MODULES, packages=list(PACKAGES), diff --git a/src/core/surface/version.c b/src/core/surface/version.c index 262a13f184..b33c99ab19 100644 --- a/src/core/surface/version.c +++ b/src/core/surface/version.c @@ -36,4 +36,4 @@ #include -const char *grpc_version_string(void) { return "0.13.0.0"; } +const char *grpc_version_string(void) { return "0.13.0-dev"; } diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index 65813909de..7124ec85d3 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -41,6 +41,6 @@ namespace Grpc.Core /// /// Current version of gRPC C# /// - public const string CurrentVersion = "0.13.0"; + public const string CurrentVersion = "0.13.0-dev"; } } diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat index e423545ef8..2c4e4e514d 100644 --- a/src/csharp/build_packages.bat +++ b/src/csharp/build_packages.bat @@ -1,7 +1,7 @@ @rem Builds gRPC NuGet packages @rem Current package versions -set VERSION=0.13.0 +set VERSION=0.13.0-dev set PROTOBUF_VERSION=3.0.0-beta2 @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py new file mode 100644 index 0000000000..8a40544981 --- /dev/null +++ b/src/python/grpcio/grpc_version.py @@ -0,0 +1,32 @@ +# Copyright 2015-2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! + +VERSION='0.13.0.dev0' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 89ff882916..e701d58478 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.13.0.0' + VERSION = '0.13.0-dev' end diff --git a/templates/Makefile.template b/templates/Makefile.template index 1a38e267a7..9942514211 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -276,7 +276,7 @@ Q = @ endif - VERSION = ${settings.version.major}.${settings.version.minor}.${settings.version.micro}.${settings.version.build} + VERSION = ${settings.core_version} CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) @@ -320,7 +320,7 @@ ifeq ($(SYSTEM),MINGW32) SHARED_EXT = dll SHARED_PREFIX = - SHARED_VERSION = -${settings.version.major} + SHARED_VERSION = -${settings.core_version.major} else ifeq ($(SYSTEM),Darwin) SHARED_EXT = dylib SHARED_PREFIX = lib @@ -1286,7 +1286,7 @@ ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/lib${lib.name}-imp.a $(prefix)/lib/lib${lib.name}-imp.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so.${settings.version.major} + $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so.${settings.core_version.major} $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so endif % endif @@ -1304,7 +1304,7 @@ ifeq ($(SYSTEM),MINGW32) $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/lib${lib.name}-imp.a $(prefix)/lib/lib${lib.name}-imp.a else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so.${settings.version.major} + $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so.${settings.core_version.major} $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so endif % endif @@ -1578,8 +1578,8 @@ ifeq ($(SYSTEM),Darwin) $(Q) ${ld} ${ldflags} -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o ${out_libbase}.$(SHARED_EXT) ${common}${libs} else - $(Q) ${ld} ${ldflags} -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,lib${lib.name}.so.${settings.version.major} -o ${out_libbase}.$(SHARED_EXT) ${common}${libs} - $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) ${out_libbase}.so.${settings.version.major} + $(Q) ${ld} ${ldflags} -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,lib${lib.name}.so.${settings.core_version.major} -o ${out_libbase}.$(SHARED_EXT) ${common}${libs} + $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) ${out_libbase}.so.${settings.core_version.major} $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) ${out_libbase}.so endif endif diff --git a/templates/src/core/surface/version.c.template b/templates/src/core/surface/version.c.template index 4788dc47d9..f2b3cfdc58 100644 --- a/templates/src/core/surface/version.c.template +++ b/templates/src/core/surface/version.c.template @@ -38,5 +38,4 @@ #include - const char *grpc_version_string(void) { \ - return "${settings.version.major}.${settings.version.minor}.${settings.version.micro}.${settings.version.build}"; } + const char *grpc_version_string(void) { return "${settings.core_version}"; } diff --git a/templates/src/csharp/Grpc.Core/VersionInfo.cs.template b/templates/src/csharp/Grpc.Core/VersionInfo.cs.template index 48197baf7d..578f01f079 100644 --- a/templates/src/csharp/Grpc.Core/VersionInfo.cs.template +++ b/templates/src/csharp/Grpc.Core/VersionInfo.cs.template @@ -43,6 +43,6 @@ /// /// Current version of gRPC C# /// - public const string CurrentVersion = "${settings.version.major}.${settings.version.minor}.${settings.version.micro}"; + public const string CurrentVersion = "${settings.csharp_version}"; } } diff --git a/templates/src/csharp/build_packages.bat.template b/templates/src/csharp/build_packages.bat.template index 847653bdcf..b855126ae6 100644 --- a/templates/src/csharp/build_packages.bat.template +++ b/templates/src/csharp/build_packages.bat.template @@ -3,7 +3,7 @@ @rem Builds gRPC NuGet packages @rem Current package versions - set VERSION=${settings.version.major}.${settings.version.minor}.${settings.version.micro} + set VERSION=${settings.csharp_version} set PROTOBUF_VERSION=3.0.0-beta2 @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. diff --git a/templates/src/python/grpcio/grpc_version.py.template b/templates/src/python/grpcio/grpc_version.py.template new file mode 100644 index 0000000000..aaacab1a50 --- /dev/null +++ b/templates/src/python/grpcio/grpc_version.py.template @@ -0,0 +1,34 @@ +%YAML 1.2 +--- | + # Copyright 2015-2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! + + VERSION='${settings.python_version.pep440()}' diff --git a/templates/src/ruby/lib/grpc/version.rb.template b/templates/src/ruby/lib/grpc/version.rb.template index 4859d2f883..a47d2d8548 100644 --- a/templates/src/ruby/lib/grpc/version.rb.template +++ b/templates/src/ruby/lib/grpc/version.rb.template @@ -31,5 +31,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '${settings.version.major}.${settings.version.minor}.${settings.version.micro}.${settings.version.build}' + VERSION = '${settings.ruby_version}' end diff --git a/templates/tools/doxygen/Doxyfile.include b/templates/tools/doxygen/Doxyfile.include index 21ef8a8ecd..8b0c528c1f 100644 --- a/templates/tools/doxygen/Doxyfile.include +++ b/templates/tools/doxygen/Doxyfile.include @@ -57,7 +57,7 @@ PROJECT_NAME = "GRPC ${packagename}" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = ${settings.version.major}.${settings.version.minor}.${settings.version.micro}.${settings.version.build} +PROJECT_NUMBER = ${settings.core_version if packagename=='Core' else settings.cpp_version} # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/buildgen/build-cleaner.py b/tools/buildgen/build-cleaner.py index 37fedec6ad..49a3644123 100755 --- a/tools/buildgen/build-cleaner.py +++ b/tools/buildgen/build-cleaner.py @@ -38,7 +38,6 @@ import yaml TEST = (os.environ.get('TEST', 'false') == 'true') _TOP_LEVEL_KEYS = ['settings', 'proto_deps', 'filegroups', 'libs', 'targets', 'vspackages'] -_VERSION_KEYS = ['major', 'minor', 'micro', 'build'] _ELEM_KEYS = [ 'name', 'cpu_cost', @@ -83,8 +82,6 @@ for filename in sys.argv[1:]: with open(filename) as f: js = yaml.load(f) js = rebuild_as_ordered_dict(js, _TOP_LEVEL_KEYS) - js['settings']['version'] = rebuild_as_ordered_dict( - js['settings']['version'], _VERSION_KEYS) for grp in ['filegroups', 'libs', 'targets']: if grp not in js: continue js[grp] = sorted([clean_elem(x) for x in js[grp]], diff --git a/tools/buildgen/plugins/expand_version.py b/tools/buildgen/plugins/expand_version.py new file mode 100755 index 0000000000..9f9c7c71fa --- /dev/null +++ b/tools/buildgen/plugins/expand_version.py @@ -0,0 +1,94 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Buildgen .proto files list plugin. + +This parses the list of targets from the yaml build file, and creates +a list called "protos" that contains all of the proto file names. + +""" + + +import re + +LANGUAGES = [ + 'core', + 'cpp', + 'csharp', + 'node', + 'objc', + 'php', + 'python', + 'ruby', + ] + +class Version: + + def __init__(self, s): + if '-' in s: + s, self.tag = s.split('-') + self.major, self.minor, self.patch = [int(x) for x in s.split('.')] + + def __str__(self): + """Version string in a somewhat idiomatic style for most languages""" + s = '%d.%d.%d' % (self.major, self.minor, self.patch) + if self.tag: + s += '-%s' % self.tag + return s + + def pep440(self): + """Version string in Python PEP440 style""" + s = '%d.%d.%d' % (self.major, self.minor, self.patch) + if self.tag: + # we need to translate from grpc version tags to pep440 version + # tags; this code is likely to be a little ad-hoc + if self.tag == 'dev': + s += '.dev0' + elif len(self.tag) >= 3 and self.tag[0:3] == 'pre': + s += 'rc%d' % int(self.tag[3:]) + else: + raise Exception('Don\'t know how to translate version tag "%s" to pep440' % self.tag) + return s + +def mako_plugin(dictionary): + """Expand version numbers: + - for each language, ensure there's a language_version tag in + settings (defaulting to the master version tag) + - expand version strings to major, minor, patch, and tag + """ + + settings = dictionary['settings'] + master_version = Version(settings['version']) + settings['version'] = master_version + for language in LANGUAGES: + version_tag = '%s_version' % language + if version_tag in settings: + settings[version_tag] = Version(settings[version_tag]) + else: + settings[version_tag] = master_version diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index cdb998d59c..5bc38a9aec 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.0.0 +PROJECT_NUMBER = 0.13.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 558ec9d394..ec71d2e9cd 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.0.0 +PROJECT_NUMBER = 0.13.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index a3b458163c..0f22620686 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.0.0 +PROJECT_NUMBER = 0.13.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index e91b47c6f4..a3540778c1 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.0.0 +PROJECT_NUMBER = 0.13.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a -- cgit v1.2.3 From cda4bad582c1a30883f4590f239caaf86828689a Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 9 Feb 2016 00:44:23 +0100 Subject: Flagging 0.13 as pre1. --- Makefile | 2 +- build.yaml | 2 +- src/core/surface/version.c | 2 +- src/csharp/Grpc.Core/VersionInfo.cs | 2 +- src/csharp/build_packages.bat | 2 +- src/python/grpcio/grpc_version.py | 2 +- src/ruby/lib/grpc/version.rb | 2 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/ruby') diff --git a/Makefile b/Makefile index c023ee9603..e86e8f15e5 100644 --- a/Makefile +++ b/Makefile @@ -361,7 +361,7 @@ E = @echo Q = @ endif -VERSION = 0.13.0-dev +VERSION = 0.13.0-pre1 CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index 292ce7d943..0e9dc89d42 100644 --- a/build.yaml +++ b/build.yaml @@ -7,7 +7,7 @@ settings: '#3': Use "-preN" suffixes to identify pre-release versions '#4': Per-language overrides are possible with (eg) ruby_version tag here '#5': See the expand_version.py for all the quirks here - version: 0.13.0-dev + version: 0.13.0-pre1 filegroups: - name: census public_headers: diff --git a/src/core/surface/version.c b/src/core/surface/version.c index b33c99ab19..fc883da189 100644 --- a/src/core/surface/version.c +++ b/src/core/surface/version.c @@ -36,4 +36,4 @@ #include -const char *grpc_version_string(void) { return "0.13.0-dev"; } +const char *grpc_version_string(void) { return "0.13.0-pre1"; } diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index 7124ec85d3..6b114eaf0e 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -41,6 +41,6 @@ namespace Grpc.Core /// /// Current version of gRPC C# /// - public const string CurrentVersion = "0.13.0-dev"; + public const string CurrentVersion = "0.13.0-pre1"; } } diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat index 2c4e4e514d..8ffd671011 100644 --- a/src/csharp/build_packages.bat +++ b/src/csharp/build_packages.bat @@ -1,7 +1,7 @@ @rem Builds gRPC NuGet packages @rem Current package versions -set VERSION=0.13.0-dev +set VERSION=0.13.0-pre1 set PROTOBUF_VERSION=3.0.0-beta2 @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index 8a40544981..b256871bd5 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='0.13.0.dev0' +VERSION='0.13.0rc1' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index e701d58478..e98073c057 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.13.0-dev' + VERSION = '0.13.0-pre1' end diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 5bc38a9aec..1a15e3972c 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.0-dev +PROJECT_NUMBER = 0.13.0-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index ec71d2e9cd..41a0547a5c 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.0-dev +PROJECT_NUMBER = 0.13.0-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 0f22620686..a94970c65e 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.0-dev +PROJECT_NUMBER = 0.13.0-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index a3540778c1..0ab8208a9b 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.0-dev +PROJECT_NUMBER = 0.13.0-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a -- cgit v1.2.3 From 1935c3655c3cb92ac31c802fc613392888cb3482 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 9 Feb 2016 01:54:56 +0100 Subject: Flagging master as 0.14.0-dev. --- Makefile | 2 +- build.yaml | 2 +- package.json | 2 +- src/core/surface/version.c | 2 +- src/csharp/Grpc.Core/VersionInfo.cs | 4 ++-- src/csharp/build_packages.bat | 2 +- src/python/grpcio/grpc_version.py | 2 +- src/ruby/lib/grpc/version.rb | 2 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/ruby') diff --git a/Makefile b/Makefile index e86e8f15e5..d9cc89d9d0 100644 --- a/Makefile +++ b/Makefile @@ -361,7 +361,7 @@ E = @echo Q = @ endif -VERSION = 0.13.0-pre1 +VERSION = 0.14.0-dev CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index 0e9dc89d42..630a49410f 100644 --- a/build.yaml +++ b/build.yaml @@ -7,7 +7,7 @@ settings: '#3': Use "-preN" suffixes to identify pre-release versions '#4': Per-language overrides are possible with (eg) ruby_version tag here '#5': See the expand_version.py for all the quirks here - version: 0.13.0-pre1 + version: 0.14.0-dev filegroups: - name: census public_headers: diff --git a/package.json b/package.json index 8a5f13bc49..9a86f4d998 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "0.13.0-pre1", + "version": "0.14.0-dev", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "http://www.grpc.io/", diff --git a/src/core/surface/version.c b/src/core/surface/version.c index fc883da189..7723f39401 100644 --- a/src/core/surface/version.c +++ b/src/core/surface/version.c @@ -36,4 +36,4 @@ #include -const char *grpc_version_string(void) { return "0.13.0-pre1"; } +const char *grpc_version_string(void) { return "0.14.0-dev"; } diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index 1460995fc3..4bd4f204dd 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -41,11 +41,11 @@ namespace Grpc.Core /// /// Current version of gRPC C# assemblies /// - public const string CurrentAssemblyVersion = "0.13.0.0"; + public const string CurrentAssemblyVersion = "0.14.0.0"; /// /// Current version of gRPC C# /// - public const string CurrentVersion = "0.13.0-pre1"; + public const string CurrentVersion = "0.14.0-dev"; } } diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat index 8ffd671011..b7768f7821 100644 --- a/src/csharp/build_packages.bat +++ b/src/csharp/build_packages.bat @@ -1,7 +1,7 @@ @rem Builds gRPC NuGet packages @rem Current package versions -set VERSION=0.13.0-pre1 +set VERSION=0.14.0-dev set PROTOBUF_VERSION=3.0.0-beta2 @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index b256871bd5..75b88cfd61 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='0.13.0rc1' +VERSION='0.14.0.dev0' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index e98073c057..9cbd36a355 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.13.0-pre1' + VERSION = '0.14.0-dev' end diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 1a15e3972c..5de1a15604 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.0-pre1 +PROJECT_NUMBER = 0.14.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 41a0547a5c..bd724d8bda 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.0-pre1 +PROJECT_NUMBER = 0.14.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index a94970c65e..e00fcfc999 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.0-pre1 +PROJECT_NUMBER = 0.14.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 0ab8208a9b..c7b5be758b 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.13.0-pre1 +PROJECT_NUMBER = 0.14.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a -- cgit v1.2.3 From f9e3c23fe8d54d1587afe163d38214c94907a336 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 9 Feb 2016 03:33:40 +0100 Subject: Fixing ruby versionning. --- grpc.gemspec | 2 +- src/ruby/lib/grpc/version.rb | 2 +- templates/grpc.gemspec.template | 2 +- templates/src/ruby/lib/grpc/version.rb.template | 2 +- tools/buildgen/plugins/expand_version.py | 4 ++++ 5 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/ruby') diff --git a/grpc.gemspec b/grpc.gemspec index e990948edf..fb4361b2f9 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |s| s.require_paths = %w( src/ruby/bin src/ruby/lib src/ruby/pb ) s.platform = Gem::Platform::RUBY - s.add_dependency 'google-protobuf', '~> 3.0.0alpha.1.1' + s.add_dependency 'google-protobuf', '~> 3.0.0.alpha.5.0' s.add_dependency 'googleauth', '~> 0.5.1' s.add_development_dependency 'bundler', '~> 1.9' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index e98073c057..d7aa18be3e 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.13.0-pre1' + VERSION = '0.13.0.pre1' end diff --git a/templates/grpc.gemspec.template b/templates/grpc.gemspec.template index c4987a6725..20408613a8 100644 --- a/templates/grpc.gemspec.template +++ b/templates/grpc.gemspec.template @@ -33,7 +33,7 @@ s.require_paths = %w( src/ruby/bin src/ruby/lib src/ruby/pb ) s.platform = Gem::Platform::RUBY - s.add_dependency 'google-protobuf', '~> 3.0.0alpha.1.1' + s.add_dependency 'google-protobuf', '~> 3.0.0.alpha.5.0' s.add_dependency 'googleauth', '~> 0.5.1' s.add_development_dependency 'bundler', '~> 1.9' diff --git a/templates/src/ruby/lib/grpc/version.rb.template b/templates/src/ruby/lib/grpc/version.rb.template index a47d2d8548..6488614aed 100644 --- a/templates/src/ruby/lib/grpc/version.rb.template +++ b/templates/src/ruby/lib/grpc/version.rb.template @@ -31,5 +31,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '${settings.ruby_version}' + VERSION = '${settings.ruby_version.ruby()}' end diff --git a/tools/buildgen/plugins/expand_version.py b/tools/buildgen/plugins/expand_version.py index 4600c3224e..a103618c01 100755 --- a/tools/buildgen/plugins/expand_version.py +++ b/tools/buildgen/plugins/expand_version.py @@ -76,6 +76,10 @@ class Version: raise Exception('Don\'t know how to translate version tag "%s" to pep440' % self.tag) return s + def ruby(self): + """Version string in Ruby style""" + return '%d.%d.%d.%s' % (self.major, self.minor, self.patch, self.tag) + def mako_plugin(dictionary): """Expand version numbers: - for each language, ensure there's a language_version tag in -- cgit v1.2.3 From ca144fd1e82ba0d72f2aa788f3bec3a32ec1d9e2 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 9 Feb 2016 03:33:40 +0100 Subject: Fixing Ruby binary build (again). --- build.yaml | 1 + grpc.gemspec | 4 +- src/ruby/lib/grpc/version.rb | 2 +- templates/grpc.gemspec.template | 4 +- third_party/rake-compiler-dock/Dockerfile | 120 +++++++++++++-------- third_party/rake-compiler-dock/build.sh | 2 +- .../rake-compiler-0.9.5/compat-with-bundler.diff | 105 ++++++++++++++++++ 7 files changed, 188 insertions(+), 50 deletions(-) create mode 100644 third_party/rake-compiler-dock/build/patches/rake-compiler-0.9.5/compat-with-bundler.diff (limited to 'src/ruby') diff --git a/build.yaml b/build.yaml index 0e9dc89d42..0aaef67cac 100644 --- a/build.yaml +++ b/build.yaml @@ -7,6 +7,7 @@ settings: '#3': Use "-preN" suffixes to identify pre-release versions '#4': Per-language overrides are possible with (eg) ruby_version tag here '#5': See the expand_version.py for all the quirks here + ruby_version: 0.13.0-pre1.1 version: 0.13.0-pre1 filegroups: - name: census diff --git a/grpc.gemspec b/grpc.gemspec index fb4361b2f9..5955bdaede 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -31,7 +31,7 @@ Gem::Specification.new do |s| s.require_paths = %w( src/ruby/bin src/ruby/lib src/ruby/pb ) s.platform = Gem::Platform::RUBY - s.add_dependency 'google-protobuf', '~> 3.0.0.alpha.5.0' + s.add_dependency 'google-protobuf', '~> 3.0.0.alpha.5.0.2' s.add_dependency 'googleauth', '~> 0.5.1' s.add_development_dependency 'bundler', '~> 1.9' @@ -39,7 +39,7 @@ Gem::Specification.new do |s| s.add_development_dependency 'simplecov', '~> 0.9' s.add_development_dependency 'rake', '~> 10.4' s.add_development_dependency 'rake-compiler', '~> 0.9' - s.add_development_dependency 'rake-compiler-dock', '~> 0.5' + s.add_development_dependency 'rake-compiler-dock', '~> 0.5.1' s.add_development_dependency 'rspec', '~> 3.2' s.add_development_dependency 'rubocop', '~> 0.30.0' s.add_development_dependency 'signet', '~> 0.7.0' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index d7aa18be3e..992991d8e1 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.13.0.pre1' + VERSION = '0.13.0.pre1.1' end diff --git a/templates/grpc.gemspec.template b/templates/grpc.gemspec.template index 20408613a8..6cc3e964a3 100644 --- a/templates/grpc.gemspec.template +++ b/templates/grpc.gemspec.template @@ -33,7 +33,7 @@ s.require_paths = %w( src/ruby/bin src/ruby/lib src/ruby/pb ) s.platform = Gem::Platform::RUBY - s.add_dependency 'google-protobuf', '~> 3.0.0.alpha.5.0' + s.add_dependency 'google-protobuf', '~> 3.0.0.alpha.5.0.2' s.add_dependency 'googleauth', '~> 0.5.1' s.add_development_dependency 'bundler', '~> 1.9' @@ -41,7 +41,7 @@ s.add_development_dependency 'simplecov', '~> 0.9' s.add_development_dependency 'rake', '~> 10.4' s.add_development_dependency 'rake-compiler', '~> 0.9' - s.add_development_dependency 'rake-compiler-dock', '~> 0.5' + s.add_development_dependency 'rake-compiler-dock', '~> 0.5.1' s.add_development_dependency 'rspec', '~> 3.2' s.add_development_dependency 'rubocop', '~> 0.30.0' s.add_development_dependency 'signet', '~> 0.7.0' diff --git a/third_party/rake-compiler-dock/Dockerfile b/third_party/rake-compiler-dock/Dockerfile index a8f5b8a116..c7a6657246 100644 --- a/third_party/rake-compiler-dock/Dockerfile +++ b/third_party/rake-compiler-dock/Dockerfile @@ -27,46 +27,75 @@ RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3 && \ # Regenerate the following using build.sh if the build folder changes. RUN echo \ -H4sIAByxrVYAA+1ae1PbSBLPv6dP0SeoxYAlWX7IkEAuBBziqgRSPJK7SnLasTSydJYl3cwIQwH7\ -2a9nJAMmIYTb4K3s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qd4OZb//jP1Ytxf3wjHXfn/ZqN77fc/rca/Wf7vT5r/PyySxzNbNXFGnCewtQ8lsglOIuKL\ +y8w85HV/1npycKhT7c7Szltpzneabj1+9ezFEaxk5dc3P/51Jd//SgSJMxUsSb5BjvuO97+2bfdW\ +7382Ouv3fw9SNr6rp1LoN290mY18HMNAv4AUInMu0C2hmCZEpyz0dGJbKrpIppOJ7wNByVN0ByB7\ +LZaPQhAY9+vMNtPX6zA2RWeknw7mnsZ0OrUms/lWLAZ1Fbgjrurb7W7LMGY+g+LjhEgpz5voMVVB\ +KMuGoZUXYwp0BrWn12eSk5tX2WxUryxcWckwdOISxzw7efEenVxyND6i8wf+/j/qfzXrcGWNWaI9\ +QiYGFLpSWnMfznLMFv3SuawRlbNOyw1jyY3MuXxHlFgYr+Hkmu4ljxQ7f8V6jVo/GOQEGnnqqCAk\ +u1S4TAhs5VlWJOjjJ1WLP1EUiODgyjDSCHskXYNEnlRAE1SDxwVY8r35Bfp9drOnEbqxxxHZ5g8W\ +NWe/NM6ZYXGG7qN2lYnGWAR63fPliLFuXF1isbpsSrYsjZNwrQ35H61k9h9DOPatvL+77/+026v3\ +/5qtxtr/e5CC9p9sP9rMoWEM0FQn9HrBHEBp88XxIV3QfXHy5t3bkjHWt6jNBOpoAerDeMyNVHKx\ +PNpMsfZO116AmIxrFFjQpBK29OdTwRzTwNOjE7TNdIFjf7NCJMDe3h6U9C3jf2TdVSOMwJSgTyl9\ +Di1HowiG5pfq1lIzngoac1qgwRhZcmVq5NlN7Z+enf7sHL1+v1/nytU3X4kC4ebdGM+VNn9cu6br\ +si7rsi7r8qcs/w8AInVFAFAAAA==\ | base64 -d | tar xzC /tmp # Import patch files for ruby and gems @@ -86,7 +115,7 @@ RUN bash -c " \ # do not generate documentation for gems RUN echo "gem: --no-ri --no-rdoc" >> ~/.gemrc && \ bash -c " \ - rvm all do gem install bundler rake-compiler hoe mini_portile rubygems-tasks json && \ + rvm all do gem install bundler rake-compiler hoe mini_portile rubygems-tasks && \ rvm 2.3.0 do gem install mini_portile2 && \ find /usr/local/rvm -type d -print0 | sudo xargs -0 chmod g+sw " @@ -96,7 +125,7 @@ RUN sudo mkdir -p /usr/local/rake-compiler && \ ln -s /usr/local/rake-compiler ~/.rake-compiler # Patch rake-compiler to avoid build of ruby extensions -RUN cd /usr/local/rvm/gems/ruby-2.3.0/gems/rake-compiler-0.9.5 && patch -p1 < /home/rvm/patches/rake-compiler-0.9.5/without-exts.diff ; \ +RUN cd /usr/local/rvm/gems/ruby-2.3.0/gems/rake-compiler-0.9.5 && git apply /home/rvm/patches/rake-compiler-0.9.5/*.diff ; \ true RUN bash -c "rvm use 2.3.0 --default && \ @@ -150,9 +179,12 @@ RUN mv /opt/mingw/mingw32/bin/i686-w64-mingw32-strip /opt/mingw/mingw32/bin/i686 RUN find / -name rbconfig.rb | while read f ; do sed -i 's/0x0501/0x0600/' $f ; done RUN find / -name win32.h | while read f ; do sed -i 's/gettimeofday/rb_gettimeofday/' $f ; done RUN sed -i 's/defined.__MINGW64__.$/1/' /usr/local/rake-compiler/ruby/i686-w64-mingw32/ruby-2.0.0-p645/include/ruby-2.0.0/ruby/win32.h -RUN find / -name libwinpthread.dll.a | while read f ; do rm $f ; done -RUN find / -name libwinpthread-1.dll | while read f ; do rm $f ; done +RUN find / -name libwinpthread.dll.a | xargs rm +RUN find / -name libwinpthread-1.dll | xargs rm RUN find / -name *msvcrt-ruby*.dll.a | while read f ; do n=`echo $f | sed s/.dll//` ; mv $f $n ; done +RUN find /usr/local/rake-compiler/ruby -name libruby.so | xargs rm +RUN find /usr/local/rake-compiler/ruby -name libruby-static.a | while read f ; do ar t $f | xargs ar d $f ; done +RUN find /usr/local/rake-compiler/ruby -name libruby-static.a | while read f ; do mv $f `echo $f | sed s/-static//` ; done # Install SIGINT forwarder RUN cp /tmp/build/sigfw.c /root/ diff --git a/third_party/rake-compiler-dock/build.sh b/third_party/rake-compiler-dock/build.sh index 22ffd18cac..ca01fa6d4d 100755 --- a/third_party/rake-compiler-dock/build.sh +++ b/third_party/rake-compiler-dock/build.sh @@ -4,4 +4,4 @@ echo 'RUN echo \\' tar cz build | base64 | sed 's/$/\\/' -echo '| base64 -d | tar xzC /' +echo '| base64 -d | tar xzC /tmp' diff --git a/third_party/rake-compiler-dock/build/patches/rake-compiler-0.9.5/compat-with-bundler.diff b/third_party/rake-compiler-dock/build/patches/rake-compiler-0.9.5/compat-with-bundler.diff new file mode 100644 index 0000000000..ea22bd928e --- /dev/null +++ b/third_party/rake-compiler-dock/build/patches/rake-compiler-0.9.5/compat-with-bundler.diff @@ -0,0 +1,105 @@ +From 41f834449fc4323b2f995e8715aa5842d9fd9334 Mon Sep 17 00:00:00 2001 +From: Lars Kanis +Date: Sat, 30 Jan 2016 08:08:07 +0100 +Subject: [PATCH] Change the fake mechanism to be compatible with bundler. + +The previous fake mechanism worked by hooking onto the +"require 'rbconfig'" call. +This is problematic because bundler internally requires rbconfig, but doesn't +work corretly in a faked environment. +It then fails to load gems that are also part of the standard library, like +json and rdoc. +This results in issues like https://github.com/rake-compiler/rake-compiler-dock/issues/8 + +The fake mechanism is now changed to hook onto the "require 'mkrb'" call, +which is typically part of the extconf file, and it is where the faked platform +values are actually needed. +That way it is loaded after bundler/setup, so that the library paths are +set according to the Gemfile.lock, to the native Linux libraries, before +the fake environment is active. + +Please note, that the build directory of a given gem needs to be cleared, +in order to get updated fake files. So do a "rm tmp pkg -rf". +--- + lib/rake/extensiontask.rb | 35 ++++++++++++++--------------------- + 1 file changed, 14 insertions(+), 21 deletions(-) + +diff --git a/lib/rake/extensiontask.rb b/lib/rake/extensiontask.rb +index 030af96..f914919 100644 +--- a/lib/rake/extensiontask.rb ++++ b/lib/rake/extensiontask.rb +@@ -169,8 +169,8 @@ Java extension should be preferred. + # now add the extconf script + cmd << abs_extconf.relative_path_from(abs_tmp_path) + +- # rbconfig.rb will be present if we are cross compiling +- if t.prerequisites.include?("#{tmp_path}/rbconfig.rb") then ++ # fake.rb will be present if we are cross compiling ++ if t.prerequisites.include?("#{tmp_path}/fake.rb") then + options.push(*cross_config_options(platf)) + end + +@@ -365,39 +365,30 @@ Java extension should be preferred. + # define compilation tasks for cross platform! + define_compile_tasks(for_platform, ruby_ver) + +- # chain fake.rb, rbconfig.rb and mkmf.rb to Makefile generation ++ # chain fake.rb and mkmf.rb to Makefile generation + file "#{tmp_path}/Makefile" => ["#{tmp_path}/fake.rb", +- "#{tmp_path}/rbconfig.rb", + "#{tmp_path}/mkmf.rb"] + +- # copy the file from the cross-ruby location +- file "#{tmp_path}/rbconfig.rb" => [rbconfig_file] do |t| ++ # copy the rbconfig from the cross-ruby location and ++ # genearte fake.rb for different ruby versions ++ file "#{tmp_path}/fake.rb" => [rbconfig_file] do |t| + File.open(t.name, 'w') do |f| +- f.write "require 'fake.rb'\n\n" ++ f.write fake_rb(for_platform, ruby_ver) + f.write File.read(t.prerequisites.first) + end + end + + # copy mkmf from cross-ruby location + file "#{tmp_path}/mkmf.rb" => [mkmf_file] do |t| +- cp t.prerequisites.first, t.name +- if ruby_ver < "1.9" && "1.9" <= RUBY_VERSION +- File.open(t.name, 'r+t') do |f| +- content = f.read ++ File.open(t.name, 'w') do |f| ++ content = File.read(t.prerequisites.first) ++ content.sub!(/^(require ')rbconfig(')$/, '\\1fake\\2') ++ if ruby_ver < "1.9" && "1.9" <= RUBY_VERSION + content.sub!(/^( break )\*(defaults)$/, '\\1\\2.first') + content.sub!(/^( return )\*(defaults)$/, '\\1\\2.first') + content.sub!(/^( mfile\.)print( configuration\(srcprefix\))$/, '\\1puts\\2') +- f.rewind +- f.write content +- f.truncate(f.tell) + end +- end +- end +- +- # genearte fake.rb for different ruby versions +- file "#{tmp_path}/fake.rb" do |t| +- File.open(t.name, 'w') do |f| +- f.write fake_rb(for_platform, ruby_ver) ++ f.write content + end + end + +@@ -495,8 +486,10 @@ Java extension should be preferred. + # "cannot load such file -- win32/resolv" when it is required later on. + # See also: https://github.com/tjschuck/rake-compiler-dev-box/issues/5 + require 'resolv' ++ require 'rbconfig' + + class Object ++ remove_const :RbConfig + remove_const :RUBY_PLATFORM + remove_const :RUBY_VERSION + remove_const :RUBY_DESCRIPTION if defined?(RUBY_DESCRIPTION) +-- +2.5.0.windows.1 + -- cgit v1.2.3