Skip to content

Commit

Permalink
Merge pull request #9556 from ntkme/ruby-suppress-warning
Browse files Browse the repository at this point in the history
Suppress warning for intentional circular require
  • Loading branch information
haberman committed Mar 1, 2022
2 parents 020e4e3 + 6c8bda8 commit 2a001f7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ruby/lib/google/protobuf/descriptor_dsl.rb
Expand Up @@ -2,7 +2,14 @@
#
# Code that implements the DSL for defining proto messages.

require 'google/protobuf/descriptor_pb'
# Suppress warning: loading in progress, circular require considered harmful.
# This circular require is intentional to avoid missing dependency.
begin
old_verbose, $VERBOSE = $VERBOSE, nil
require 'google/protobuf/descriptor_pb'
ensure
$VERBOSE = old_verbose
end

module Google
module Protobuf
Expand Down

0 comments on commit 2a001f7

Please sign in to comment.