Page MenuHomePhabricator

[services] Export DatabaseManagers as CMake Project
ClosedPublic

Authored by jon on Jul 3 2022, 9:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 2, 8:14 AM
Unknown Object (File)
Mon, Oct 28, 2:42 AM
Unknown Object (File)
Sun, Oct 27, 6:50 AM
Unknown Object (File)
Tue, Oct 22, 4:49 PM
Unknown Object (File)
Tue, Oct 22, 11:04 AM
Unknown Object (File)
Mon, Oct 21, 2:48 PM
Unknown Object (File)
Sun, Oct 20, 8:05 PM
Unknown Object (File)
Sun, Oct 20, 4:59 PM

Details

Summary

This is part of a larger effort to bring more structure to the C++ codebase https://linear.app/comm/issue/ENG-1310/export-nativecpp-projects-as-cmake-projects

The intent is to be able to reference the dependencies as packages, instead of just as GLOB'ing over certain directories; which is a major anti-pattern in CMake as it create a bunch of footguns such as finding multiple files with main() defined, or picking up unrelated code in generated folders.

Export DatabaseManagers as a CMake Project

Test Plan
nix develop
cd native/cpp/CommonCpp/DatabaseManagers
rm -rf build && mkdir build && cd build && cmake .. & make -j

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jul 3 2022, 9:22 AM
Harbormaster failed remote builds in B10229: Diff 14116!

Update with changes to master

Harbormaster returned this revision to the author for changes because remote builds failed.Jul 5 2022, 11:57 AM
Harbormaster failed remote builds in B10300: Diff 14200!
jon published this revision for review.Jul 7 2022, 3:32 PM
jon added reviewers: ashoat, atul, varun.

Resigning since I'm usually not a good person to set as a first-pass reviewer. Exceptions here

atul requested changes to this revision.Jul 15 2022, 10:57 AM

A later diff will be needed to test this

At a high level this diff looks good, but can you update the Test Plan to specify what later diff tests this?

native/cpp/CommonCpp/DatabaseManagers/CMakeLists.txt
30 ↗(On Diff #14301)

Can we capitalize "reference" for consistency with other comments?

36 ↗(On Diff #14301)

Can we expand on this to explain what the hack is?

53 ↗(On Diff #14301)

If we decide we should keep this comment around, can we remove the redundancy?

This revision now requires changes to proceed.Jul 15 2022, 10:57 AM

I need to undo header changes for now

atul requested changes to this revision.Aug 11 2022, 12:08 PM

A later diff will be needed to test this

Can you specify what diff this is, don't want to accept if I can't test the changes at least transitively

This revision now requires changes to proceed.Aug 11 2022, 12:08 PM

Can you specify what diff this is, don't want to accept if I can't test the changes at least transitively

Still in the middle of reviving this but filtering out the header changes so the bulk CMake logic can be added.

I'll "Request Review" when this is in a better state

Still in the middle of reviving this but filtering out the header changes so the bulk CMake logic can be added.

I'll "Request Review" when this is in a better state

Generally when this happens you can submit the "Changes Planned" action so the diff is removed from reviewers' queues. Then, once you've made your changes and are ready to hit "Request Review" it'll pop back up in their queues, but while you're figuring stuff out it won't.

Generally when this happens you can submit the "Changes Planned" action so the diff is removed from reviewers' queues. Then, once you've made your changes and are ready to hit "Request Review" it'll pop back up in their queues, but while you're figuring stuff out it won't.

Thanks, the icons are both big and red, so I just assumed "plan changes" was the same as "needs revision". My bad

I actually think @atul requesting changes will remove this from other reviewers' queue, but it wouldn't hurt to confirm this. (In other words, I suspect @jon's intuition about the big red icons is correct...)

Rebase with other module fixes

Gotta make sure this is working correctly

atul requested changes to this revision.Aug 17 2022, 9:40 AM

A later diff will be needed to test this

Could you clarify/link to that diff so I can test it? Would be great to get this landed

This revision now requires changes to proceed.Aug 17 2022, 9:40 AM
jon planned changes to this revision.EditedAug 17 2022, 5:52 PM

Could you clarify/link to that diff so I can test it?

Essentially all of native/cpp/CommonCpp is all very tightly coupled, so it's hard to do any single build in isolation. In a later diff I do target_link_libraries to the correct targets to make them actually build.

For now I just do the target_include_directories anti-pattern so they work individually. Then I'll fix them later

jon edited the test plan for this revision. (Show Details)
jon retitled this revision from [services] Export DatabaseManagers as CMake Project, normalize structure to [services] Export DatabaseManagers as CMake Project.Aug 23 2022, 9:43 AM

Ensure it builds on its own. Make clang compatible

jon removed a reviewer: ashoat.
This revision is now accepted and ready to land.Aug 30 2022, 3:33 PM