Skip to content

binary-compatibility w/ old 0.6.x #157

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

Closed
cdunn2001 opened this issue Feb 7, 2015 · 26 comments
Closed

binary-compatibility w/ old 0.6.x #157

cdunn2001 opened this issue Feb 7, 2015 · 26 comments

Comments

@cdunn2001
Copy link
Contributor

See #147 for some discussion.

@cdunn2001
Copy link
Contributor Author

Release 0.8.0-rc3 (like 0.8.0-rc.1)is binary-compatible. @cinemast, could you try it? You might find some missing symbols, but only private ones, not part of the public API. I have been very careful with diffing, and I have double-checked by compiling test_lib_json for 0.6.0-rc2 and linking 0.8.0 at runtime.

@cinemast
Copy link
Contributor

I am starting to double check now. First thing I can see that SONAME is version 1, it should be 0. And also the .so file is called libjsoncpp.so.1.4.0 which should be libjsoncpp.so.0.8.0

@cinemast
Copy link
Contributor

@cdunn2001
Copy link
Contributor Author

Are you on master? The v0.8.0 branch is at version 0.8.0. I don't see how you could possibly get 1.4.0 on that branch... Yeah, that string does not exist.

You can look at the 0.8.0-rc.3 release, or just pull the v0.8.0 branch.

@cinemast
Copy link
Contributor

I took the release from here: https://github.com/open-source-parsers/jsoncpp/releases/tag/0.8.0-rc1. Sorry apparently I picked the wrong one.

@cdunn2001
Copy link
Contributor Author

Bad release. Deleted. Use 0.8.0-rc3.

@cinemast
Copy link
Contributor

https://gist.github.com/cinemast/080cddbb54a19e8fb043

Are the classes containing incompatibilities private? I guess you can tell more easily than me.

@cdunn2001
Copy link
Contributor Author

Do you have any idea which commit Debian was using? Probably just a download from sourceforge, huh?

I have to examine these:

json_writer.cpp, libjson_linux-gcc-4.9.1_libmt.so
namespace Json
StyledWriter::normalizeEOL ( std::string const&const text ) [static] 

reader.h, libjson_linux-gcc-4.9.1_libmt.so
namespace Json
Reader::expectToken ( enum Reader::TokenType type, Reader::Token&const token, char const* message ) 

value.h, libjson_linux-gcc-4.9.1_libmt.so
namespace Json
Value::CommentInfo::setComment ( char const* text ) 
Value::null [data] 

writer.h, libjson_linux-gcc-4.9.1_libmt.so
namespace Json
StyledStreamWriter::normalizeEOL ( std::string const&const text ) [static] 

and fix these:

StyledStreamWriter:
Size of field addChildValues_ has been changed from 1 byte to 1 bit.
Field indented_ has been added to this type.

@cinemast
Copy link
Contributor

@cdunn2001
Copy link
Contributor Author

  • normalizeEOL: private
  • expectToken: private
  • CommentInfo::setComment: private

And all non-virtual, which is good.

StyledStreamWriter:

  • addChildValues_ and indented_ are private.
  • sizeof(StyledStreamWriter) has not changed

So it looks good to me.

@cinemast
Copy link
Contributor

Great! Thank you for providing this. It would be great if the pending security fix for #88 would make it to 0.8.x release.

@cdunn2001
Copy link
Contributor Author

Yes, definitely. Probably tomorrow.

Also, by storing a Json::Value in the new CharReader and StreamWriter, we can easily add features without breaking binary-compatibility.

@cdunn2001
Copy link
Contributor Author

@cinemast, Sorry. You should use 0.9.z, or at least 0.8.4. It turns out that Json::Value::null had not been defined in earlier releases, after 0.6.0. That oversight affects only people who used that symbol directly, which is probably nobody, but for correctness the more recent versions are better.

Besides, 0.9.z (and 1.5.z) have proper UTF-8 support for embedded nulls, for anyone willing to avoid c-strings.

@cinemast
Copy link
Contributor

cinemast commented Mar 3, 2015

ahhh.. that is bad news. Alright I will repackage for unstable.

@cdunn2001
Copy link
Contributor Author

To be clear, it would not affect compilation. The symbol was declared but not defined.

@cinemast
Copy link
Contributor

cinemast commented Mar 3, 2015

I know, i know. Compilation is not the issue here, it is the exported ABI symbols that change. How fast will you continue releasing new versions? Should I wait for a next stable release?

@cdunn2001
Copy link
Contributor Author

I back-ported this change to 0.8.4, if you want. I consider 0.9.0 well-tested, with important fixes, but it's up to you.

@cdunn2001
Copy link
Contributor Author

Btw, I don't expect any more big changes to this project. UTF-8 is important, but not much else will happen until 2.0, which will be completely C++11.

@cinemast
Copy link
Contributor

cinemast commented Mar 3, 2015

Great. I will package 0.9.0 then for debian. Thank you for keeping this project alive.

@cdunn2001
Copy link
Contributor Author

Please package 0.9.4. Although the 0.9.0 version worked, it did not properly support zeroes in UTF-8 as advertised. I wrote the tests wrong. Quite a blunder. Sorry again.

@cinemast
Copy link
Contributor

cinemast commented Mar 7, 2015

I'll wait a week or two. I am sure you will understand why :)

@cdunn2001
Copy link
Contributor Author

You were right. 0.10.0 is good. It's important to use that instead of 0.8.z or 0.9.z.

@cinemast
Copy link
Contributor

Haha yes I followed the conversation about missing virtual dtor. No problem. My sponsor at debian is currently not responsive anyway.

@cdunn2001
Copy link
Contributor Author

I really wish Macosx had valgrind. What would you suggest as an alternative? Or should I just set up a Linux VM?

@cinemast
Copy link
Contributor

Well I integrated the valgrind checking to my travis build. Maybe that is a solution for you:

https://github.com/cinemast/libjson-rpc-cpp/blob/master/.travis.yml

@cdunn2001
Copy link
Contributor Author

Great idea! Thx.

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

No branches or pull requests

2 participants