Skip to content

Commit

Permalink
Disable the warning for adding duplicated symbol (#8720)
Browse files Browse the repository at this point in the history
When we need to aggregate metadata, duplication does happen.
Disable the warning for now to mitigate the noise for users of aggregate
metadata.
  • Loading branch information
TeBoring committed Jun 9, 2021
1 parent 9223147 commit b24d0c2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions php/ext/google/protobuf/def.c
Expand Up @@ -918,10 +918,12 @@ static void add_descriptor(DescriptorPool *pool,

if (upb_symtab_lookupfile2(pool->symtab, name.data, name.size)) {
// Already added.
zend_error(E_USER_WARNING,
"proto descriptor was previously loaded (included in multiple "
"metadata bundles?): " UPB_STRVIEW_FORMAT,
UPB_STRVIEW_ARGS(name));
// TODO(teboring): Re-enable this warning when aggregate metadata is
// deprecated.
// zend_error(E_USER_WARNING,
// "proto descriptor was previously loaded (included in multiple "
// "metadata bundles?): " UPB_STRVIEW_FORMAT,
// UPB_STRVIEW_ARGS(name));
return;
}

Expand Down

0 comments on commit b24d0c2

Please sign in to comment.