realm-core icon indicating copy to clipboard operation
realm-core copied to clipboard

Building for Windows using C++20

Open kneth opened this issue 1 year ago • 3 comments

What, How & Why?

This PR tries to address the following:

☑️ ToDos

  • [x] 📝 Changelog update
  • [ ] 🚦 Tests (or not relevant)
  • ~[ ] C-API, if public C++ API changed~
  • ~[ ] bindgen/spec.yml, if public C++ API changed~

kneth avatar Jun 26 '24 10:06 kneth

Pull Request Test Coverage Report for Build kenneth.geisshirt_16

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 90 unchanged lines in 17 files lost coverage.
  • Overall coverage decreased (-0.02%) to 90.961%

Files with Coverage Reduction New Missed Lines %
src/realm/array_string.cpp 1 87.23%
src/realm/util/file.cpp 1 85.3%
test/test_index_string.cpp 1 93.48%
test/test_query2.cpp 1 98.73%
src/realm/table_view.cpp 2 92.99%
test/object-store/util/test_file.cpp 2 86.29%
test/test_all.cpp 2 75.82%
src/realm/unicode.cpp 3 83.83%
src/realm/sync/noinst/client_impl_base.cpp 4 82.56%
src/realm/sync/noinst/server/server.cpp 5 73.82%
<!-- Total: 90
Totals Coverage Status
Change from base Build 2434: -0.02%
Covered Lines: 214709
Relevant Lines: 236046

💛 - Coveralls

coveralls-official[bot] avatar Jun 26 '24 11:06 coveralls-official[bot]

Pull Request Test Coverage Report for Build kenneth.geisshirt_18

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 107 unchanged lines in 19 files lost coverage.
  • Overall coverage decreased (-0.03%) to 90.943%

Files with Coverage Reduction New Missed Lines %
src/realm/query_engine.hpp 1 94.15%
src/realm/util/file.cpp 1 84.84%
src/realm/util/serializer.cpp 1 90.43%
test/fuzz_tester.hpp 1 57.73%
test/test_query2.cpp 1 98.73%
src/realm/object-store/shared_realm.cpp 2 91.89%
src/realm/table_view.cpp 2 92.99%
test/test_all.cpp 2 75.82%
src/realm/mixed.cpp 3 86.46%
src/realm/query_expression.hpp 3 93.84%
<!-- Total: 107
Totals Coverage Status
Change from base Build 2434: -0.03%
Covered Lines: 214668
Relevant Lines: 236046

💛 - Coveralls

coveralls-official[bot] avatar Jun 26 '24 14:06 coveralls-official[bot]

Pull Request Test Coverage Report for Build kenneth.geisshirt_19

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 81 unchanged lines in 18 files lost coverage.
  • Overall coverage increased (+0.008%) to 90.985%

Files with Coverage Reduction New Missed Lines %
src/realm/array_string.cpp 1 87.23%
src/realm/sync/noinst/server/server_history.cpp 1 63.7%
src/realm/util/file.cpp 1 84.84%
src/realm/util/serializer.cpp 1 90.43%
test/fuzz_tester.hpp 1 57.73%
test/test_index_string.cpp 1 93.48%
test/test_query2.cpp 1 98.73%
src/realm/sync/noinst/server/server.cpp 2 73.78%
test/test_all.cpp 2 75.82%
src/realm/mixed.cpp 3 86.46%
<!-- Total: 81
Totals Coverage Status
Change from base Build 2434: 0.008%
Covered Lines: 214771
Relevant Lines: 236052

💛 - Coveralls

coveralls-official[bot] avatar Jun 26 '24 15:06 coveralls-official[bot]

@ironage I tried to get it to compile on ubuntu2204-arm64-large, but it failed with both gcc-11 and clang-18. I think clang-18 needs libstdc++-12 to work. On my machine it fails with gcc-11 (probably too old), but succeeds with gcc-12 and clang-16.

jedelbo avatar Jul 02 '24 12:07 jedelbo

Pull Request Test Coverage Report for Build kenneth.geisshirt_25

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 56 unchanged lines in 11 files lost coverage.
  • Overall coverage decreased (-0.003%) to 90.971%

Files with Coverage Reduction New Missed Lines %
src/realm/dictionary.cpp 1 85.16%
src/realm/query_expression.hpp 1 93.85%
src/realm/cluster.cpp 2 75.85%
test/object-store/sync/flx_sync.cpp 2 98.27%
test/object-store/util/test_file.cpp 2 86.29%
test/test_lang_bind_helper.cpp 2 93.2%
src/realm/collection_parent.cpp 3 93.08%
src/realm/sync/network/websocket.cpp 5 71.21%
src/realm/bplustree.cpp 6 72.55%
src/realm/sync/noinst/server/server.cpp 8 74.29%
<!-- Total: 56
Totals Coverage Status
Change from base Build 2466: -0.003%
Covered Lines: 215115
Relevant Lines: 236466

💛 - Coveralls

coveralls-official[bot] avatar Jul 02 '24 13:07 coveralls-official[bot]

Trying to get it to build on Windows also failed (works on my machine)

jedelbo avatar Jul 02 '24 13:07 jedelbo

Pull Request Test Coverage Report for Build kenneth.geisshirt_28

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 50 unchanged lines in 13 files lost coverage.
  • Overall coverage increased (+0.01%) to 90.986%

Files with Coverage Reduction New Missed Lines %
src/realm/dictionary.cpp 1 85.16%
src/realm/query_expression.hpp 1 93.81%
src/realm/sort_descriptor.cpp 1 94.06%
test/test_index_string.cpp 1 93.48%
src/realm/object-store/shared_realm.cpp 2 91.89%
src/realm/query_expression.cpp 2 86.62%
src/realm/sync/network/http.hpp 2 82.27%
src/realm/table.cpp 3 90.42%
src/realm/unicode.cpp 3 83.83%
test/fuzz_group.cpp 6 44.98%
<!-- Total: 50
Totals Coverage Status
Change from base Build 2466: 0.01%
Covered Lines: 215158
Relevant Lines: 236473

💛 - Coveralls

coveralls-official[bot] avatar Jul 02 '24 14:07 coveralls-official[bot]

Building with -D CMAKE_CXX_STANDARD=20 works on evergreen's ubuntu 24.04 builders; they use gcc 13.2.0. I think it should be sufficient to add this to the builder I just added in https://github.com/realm/realm-core/pull/7856. What do you think?

ironage avatar Jul 03 '24 22:07 ironage

@ironage

evergreen's ubuntu 24.04 builders

I am trying in https://github.com/realm/realm-core/pull/7841/commits/ff889dff453b89327cf7d5018c1b014e19e6f1ca

kneth avatar Jul 04 '24 14:07 kneth

Pull Request Test Coverage Report for Build kenneth.geisshirt_30

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 31 unchanged lines in 13 files lost coverage.
  • Overall coverage increased (+0.03%) to 90.986%

Files with Coverage Reduction New Missed Lines %
src/realm/dictionary.cpp 1 85.16%
src/realm/object-store/sync/sync_session.cpp 1 92.01%
src/realm/sort_descriptor.cpp 1 94.06%
src/realm/sync/network/websocket.cpp 1 71.79%
src/realm/sync/noinst/client_impl_base.cpp 1 82.1%
test/fuzz_tester.hpp 1 57.73%
src/realm/array_blobs_big.cpp 2 98.58%
src/realm/cluster.cpp 2 75.85%
src/realm/query_expression.hpp 2 93.81%
src/realm/sync/client.cpp 3 90.98%
<!-- Total: 31
Totals Coverage Status
Change from base Build 2469: 0.03%
Covered Lines: 215219
Relevant Lines: 236542

💛 - Coveralls

coveralls-official[bot] avatar Jul 04 '24 15:07 coveralls-official[bot]

Builds for node.js for Windows: https://github.com/realm/realm-js/pull/6739

kneth avatar Jul 05 '24 09:07 kneth