Skip to content

Conversation

@danielronnkvist
Copy link
Contributor

By adding the JSDoc @deprecated annotation to the output comments to interface fields IDE's can pick it up and deliver a better developer experience. This annotation is only added when the includeComments option is enabled. Since protobuf.js already parses if a field is deprecated or not the options object with that information is passed to the formatComment function.

Update golden generated with @deprecated annotation.

Resolves #2348

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 10, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: danielronnkvist / name: Daniel Rönnkvist (c20ddd3)


function formatTypeBrand(formatter: TextFormatter, messageType: Protobuf.Type) {
formatComment(formatter, typeBrandHint);
formatComment(formatter, typeBrandHint, messageType.options);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this one is right. This comment isn't on the message interface itself, but rather on a synthetic field in the interface. So it doesn't make sense for this field to inherit the message type's deprecated status.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@murgatroid99 I removed the options argument for this format call.

Copy link
Member

@murgatroid99 murgatroid99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution.

@murgatroid99 murgatroid99 merged commit e967c94 into grpc:master Feb 13, 2023
@murgatroid99
Copy link
Member

This is out in version 0.7.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants