Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-43980

yaml-cpp 0.6.3 test failure options_parser_test

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • None
    • ALL
    • Dev Platform 2020-05-18, Dev Platform 2020-06-01

      With 4.2.0 and yaml-cpp 0.6.2, it was possible to build mongoDB using yaml-cpp as a system package.

      yaml-cpp 0.6.3 was released (at least on Arch) 13 days ago.  Upgrading the system package requires recompiling mongodb, which causes cpp_unit_test:options_parser_test to fail.

      The entire test failure is attached.

      Looks like the issue is math::pi being

      3.1415926500000002

      vs

      3.14159265

      I see https://github.com/jbeder/yaml-cpp/pull/649 which fixes a yaml-cpp round trip decimal error, which I assume is the change in the new version causing this test failure.

      I also saw https://github.com/jbeder/yaml-cpp/issues/761 where a user was having a similar problem of an expected value of "123.456" printed as "123.456001".  The developer said to now specify precision when using an emitter, i.e.:

      emitter << YAML::Precision(3) << node;

      I haven't looked to see if 0.6.2 and previous has YAML::Precision(), so whether mongo's code could be fixed and still run on previous errors, or if this is a true breaking change.

      I wanted to report this issue, reported to me by Arch user mrohnstock, but in the meantime will be removing yaml-cpp to be used as a system library by mongo on Arch, and let it pull it in itself.

            Assignee:
            ryan.egesdahl@mongodb.com Ryan Egesdahl (Inactive)
            Reporter:
            jamespharvey20 James P. Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: