Skip to content

Commit

Permalink
Suppress warning for intentional circular require
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme committed Feb 27, 2022
1 parent cbc9826 commit 6c8bda8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ruby/lib/google/protobuf/descriptor_dsl.rb
Original file line number Diff line number Diff line change
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 6c8bda8

Please sign in to comment.