opentracing/opentracing-cpp

compiler restriction for mocktracer are too strict

heyleke opened this issue · 6 comments

#error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"

see https://github.com/nlohmann/json#supported-compilers

I believe a library like opentracing-cpp cannot be as strict in supported compilers as mentioned here, IMHO the line should be c++11, which is AFAIU gcc 4.8.5 (with certain cpu architectures excluded).

So, either this check is wrong, or this component is not a good dependency.

Maybe switch to rapidjson? It only requires C++98, but it's a much bigger library.

or maybe this one: https://github.com/taocpp/json although I'm no c++11 expert.

This might be a good reference:
https://github.com/miloyip/nativejson-benchmark

looks like taocpp/json is still in beta and not as fast as rapid.

I don't care too much about the performance since the mocktracer is only mean to support unit tests, but I'll get something figured out before I make the next release. (Should probably also add gcc 4.8.5 to the CI coverage).

correction: actually c++11 feature complete is 4.8.1, not 4.8.5 (that is just the one that ships with centos7)

I put in #54 that changes to do only serialization and uses manual code instead of a library.

I removed the deserialization code since that can always be done by the code testing against the mocktracer.