Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-30547

Collections ManifestTest::toJSON fails on Xcode 7

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 6.5.0
    • 6.5.0
    • couchbase-bucket
    • None

    Description

      As seen in the following build error (http://server.jenkins.couchbase.com/job/couchbase-server-unix/107375/consoleFull), Xcode 7 fails to compile code in ManifestTest::toJSON:

      [ 90%] Building CXX object kv_engine/engines/ep/CMakeFiles/ep-engine_ep_unit_tests.dir/tests/module_tests/collections/vbucket_manifest_entry_test.cc.o
      /Users/jenkins/jenkins/workspace/couchbase-server-unix/kv_engine/engines/ep/tests/module_tests/collections/manifest_test.cc:209:24: error: no viable conversion from 'CollectionEntry::Entry' to 'std::string' (aka 'basic_string<char, char_traits<char>, allocator<char> >')
                           {{CollectionEntry::defaultC},
                             ^~~~~~~~~~~~~~~~~~~~~~~~~
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1326:5: note: candidate constructor not viable: no known conversion from 'CollectionEntry::Entry' to 'const std::__1::basic_string<char> &' for 1st argument
          basic_string(const basic_string& __str);
          ^
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1330:5: note: candidate constructor not viable: no known conversion from 'CollectionEntry::Entry' to 'std::__1::basic_string<char> &&' for 1st argument
          basic_string(basic_string&& __str)
          ^
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1335:31: note: candidate constructor not viable: no known conversion from 'CollectionEntry::Entry' to 'const value_type *' (aka 'const char *') for 1st argument
          _LIBCPP_INLINE_VISIBILITY basic_string(const value_type* __s);
                                    ^
      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/string:1356:5: note: candidate constructor not viable: no known conversion from 'CollectionEntry::Entry' to 'initializer_list<value_type>' for 1st argument
          basic_string(initializer_list<value_type> __il);
          ^
      /Users/jenkins/jenkins/workspace/couchbase-server-unix/kv_engine/engines/ep/tests/module_tests/collections/test_manifest.h:64:5: note: candidate function
          operator CollectionID() const {
          ^
      

      Note this builds fine on Xcode 9.2 (current release).

      To fix the build break I've compiled out these tests on macOS if Clang is less than 8.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jwalker Jim Walker
              drigby Dave Rigby (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty