Skip to content

Commit

Permalink
Remove redundant include
Browse files Browse the repository at this point in the history
This `include` is not actually there in message classes at runtime.

The only methods defined on this module are singleton class methods,
which means that even if it were included on these modules somehow, it
wouldn't add any new methods to the class, because singleton class
methods on modules are never accessible to a child module.
  • Loading branch information
jez committed Apr 26, 2023
1 parent 85a353c commit 77227fa
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 13 deletions.
1 change: 0 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ const tpl = `# Code generated by protoc-gen-rbi. DO NOT EDIT.
# typed: strict
{{ range .AllMessages }}
class {{ rubyMessageType . }}
include ::Google::Protobuf
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods
Expand Down
1 change: 0 additions & 1 deletion testdata/broken_field_name_pb.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# typed: strict

class Example::Broken_field_name
include ::Google::Protobuf
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods

Expand Down
1 change: 0 additions & 1 deletion testdata/broken_package_name_pb.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# typed: strict

class Package2test::Message2test
include ::Google::Protobuf
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods

Expand Down
2 changes: 0 additions & 2 deletions testdata/example_pb.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# typed: strict

class Example::Request
include ::Google::Protobuf
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods

Expand Down Expand Up @@ -63,7 +62,6 @@ class Example::Request
end

class Example::Response
include ::Google::Protobuf
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods

Expand Down
2 changes: 0 additions & 2 deletions testdata/lowercase_pb.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# typed: strict

class Example::Lowercase
include ::Google::Protobuf
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods

Expand Down Expand Up @@ -63,7 +62,6 @@ class Example::Lowercase
end

class Example::Lowercase_with_underscores
include ::Google::Protobuf
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods

Expand Down
6 changes: 0 additions & 6 deletions testdata/subdir/messages_pb.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# typed: strict

class Testdata::Subdir::IntegerMessage
include ::Google::Protobuf
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods

Expand Down Expand Up @@ -63,7 +62,6 @@ class Testdata::Subdir::IntegerMessage
end

class Testdata::Subdir::Empty
include ::Google::Protobuf
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods

Expand Down Expand Up @@ -104,7 +102,6 @@ class Testdata::Subdir::Empty
end

class Testdata::Subdir::AllTypes
include ::Google::Protobuf
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods

Expand Down Expand Up @@ -564,7 +561,6 @@ class Testdata::Subdir::AllTypes
end

class Testdata::Subdir::IntegerMessage::InnerNestedMessage
include ::Google::Protobuf
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods

Expand Down Expand Up @@ -624,7 +620,6 @@ class Testdata::Subdir::IntegerMessage::InnerNestedMessage
end

class Testdata::Subdir::IntegerMessage::NestedEmpty
include ::Google::Protobuf
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods

Expand Down Expand Up @@ -665,7 +660,6 @@ class Testdata::Subdir::IntegerMessage::NestedEmpty
end

class Testdata::Subdir::AllTypes::InnerMessage
include ::Google::Protobuf
include ::Google::Protobuf::MessageExts
extend ::Google::Protobuf::MessageExts::ClassMethods

Expand Down

0 comments on commit 77227fa

Please sign in to comment.