Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid circular require in generated Ruby code (sigstore#243)
By only loading the generated protobuf ruby files and not the "sigstore_protobuf_specs" file Before: ```sh $ chruby-exec ruby-2.7 -- ruby -w -rbundler/inline -e 'gemfile { source "https://rubygems.org"; gemspec }; require "sigstore_protobuf_specs"' /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:38: warning: /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:38: warning: loading in progress, circular require considered harmful - /Users/segiddins/Development/github.com/sigstore/protobuf-specs/gen/pb-ruby/lib/sigstore_protobuf_specs.rb from -e:1:in `<main>' from /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/bundler/inline.rb:42:in `gemfile' from /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/bundler.rb:411:in `with_unbundled_env' from /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/bundler.rb:657:in `with_env' from /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/bundler.rb:411:in `block in with_unbundled_env' from /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/bundler/inline.rb:51:in `block in gemfile' from /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/bundler/settings.rb:130:in `temporary' from /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/bundler/inline.rb:66:in `block (2 levels) in gemfile' from /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:44:in `require' from /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:44:in `each' from /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:55:in `block in require' from /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:55:in `each' from /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:60:in `block (2 levels) in require' from /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:60:in `require' from /Users/segiddins/Development/github.com/sigstore/protobuf-specs/gen/pb-ruby/lib/sigstore_protobuf_specs.rb:18:in `<top (required)>' from /Users/segiddins/Development/github.com/sigstore/protobuf-specs/gen/pb-ruby/lib/sigstore_protobuf_specs.rb:18:in `each' from /Users/segiddins/Development/github.com/sigstore/protobuf-specs/gen/pb-ruby/lib/sigstore_protobuf_specs.rb:18:in `block in <top (required)>' from /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:38:in `require' from /Users/segiddins/.rubies/ruby-2.7.5/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:38:in `require' ``` Signed-off-by: Samuel Giddins <[email protected]>
- Loading branch information