Skip to content

Use TextFormat in test_addressbook.R #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

Image for: Conversation
Copy link
Contributor

tanx16 commented Mar 21, 2024

This resolves #98.

Copy link
Owner

Lovely, only two spots. Easy. To we have to version protect for older PB releases?

Also, would you mind adding your to file ChangeLog. Standard GNU / Emacs format of YYYY-MM-DD date, spaces, Name, spaces, email then entries after TAB * filename: description.

eddelbuettel merged commit 8d9a119 into eddelbuettel:master Mar 21, 2024
Copy link
Contributor Author

tanx16 commented Mar 21, 2024

Done.

Do we have to version protect for older PB releases?

I'm not sure I understand. Are you concerned about using RProtoBuf with older versions of C++ Protobuf? toTextFormat() should be fully compatible with any C++ Protobuf version, as it's a stable API. C++ DebugString (and implicitly as.character and toString()) will eventually have a breaking change, but we don't have a set date for open source yet. When that happens, this change should allow RProtoBuf to update to the latest C++ version, but will likely break RProtoBuf users that happen to use as.character or toString() for serializing.

tanx16 deleted the patch-1 branch March 21, 2024 01:17
Copy link
Owner

Yeah that was my question -- it was nice how we managed to move along from alonger pb2 to newer pb3. In practice, I suppose, most people will use current versions. And if toTextFormat() was always present it is less of an issue. Seems we were just sloppy when the test was written.

So big thanks for cleaning that up, and thanks also for obliging with the ChangeLog entry.

Copy link
Contributor Author

tanx16 commented Mar 21, 2024

Happy to help. One alternative to breaking compatibility is to migrate the implementation of those APIs to depend on TextFormat, and instead create a new API that is explicitly a debug format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants