[WIP] Cmake migration - #2170
Conversation
|
@aphecetche : I just tried your branch. It compiles, but I have some comments below.
Could you add this to dependencies/O2Dependencies.cmake?
|
|
AFAICT |
|
As you may have noticed, this branch is not yet fully functional. There is indeed a problem with o2-sim which I'm currently trying (and failing so far ... ) to understand. For the missing deps, sorry I missed those, will add them back. |
|
thx @ktf, then I'd also add fmt as required package in the new cmake. |
17b9cb1 to
4939811
Compare
|
o2-sim issue is now fixed (a very stupid but very long to find typo in the name of one of the 3 executables used by o2-sim ...). Missing deps were added. Let's see how the CI goes. More cleanings tomorrow. |
|
@aphecetche : I have another general question. I think you explicitly add tests for all macros, while before we were testing all macros with some explicit exceptions. I actually liked before that all macros are tested. Otherwise, people can check in plenty of "private" macros that bread over time, since people will rather not add the macro as test instead of fixing it I guess. |
|
@davidrohr regarding the macros. I indeed disliked the fact that all the macros testing is stuffed in the top CMakeLists.txt. And together with a long list of exclusions (which, IMO, doesn't seem to shrink at a reasonable pace, or at even all). (And I think we have way too many macros that takes too much time to test, but that's maybe just me) Besides, my original intent was to be able to do a Granted, with the explicit declaration mode of macro tests, there is the risk of getting more macros that are introduced and not tested. You have a point here. But that is something that can be detected (by humans) at PR review time. I can also add a script or something that make a list of the macros which are present in the repository and not tested (which could help the reviewers and/or be turned into an automatic test to see we are not regressing). I guess that would be preferable to returning to globbing the macros in the top CMakeLists.txt and manually listing the exclusions (and separately for compiled and loading modes, in addition...). |
|
@davidrohr I really appreciate the time you take to review this PR. But there might be one piece of information I forgot to mention. I'll disappear for 4 weeks next Thursday. So the question now is whether we target to merge this before I leave (at the expense of postponing a few things for later on) or we postpone it altogether until mid/end- august. |
|
I assume this is a matter of taste, but to me the old scheme was shorter (in terms of CMake lines) and simpler (less things to check for the reviewers, less code to add for the developer). I also prefer to grant access to the full O2 environment to macros, otherwise plenty of detector macros will probably have to be moved to the global macro folder to avoid circular dependencies. I guess there is a use case for detector specific macros having access to other libraries, which are built later in the built process. Finally, I think there will definitely be macros that can only be tested in compiled or only in interpreted mode. The interpreted mode will fail with external (or GPU) dependencies which do not have a root dictionary, but they can still run in compiled mode. |
|
@ktf @dberzano @Barthelemy the build/O2/o2 is failing (at least) because it is testing an old version (0.14.2) of QualityControl instead of one of the latests (>=0.15.0). I guess that's because the QC recipe has not been bumped to one of those versions ? Assuming a bump is all it takes, I've opened an alidist PR for that. |
|
@aphecetche : I am definitely in favor of getting it merged before! Having it lying around for 4 weeks will require to catch up afterwards again. Additional changes can certainly be implemented later. |
Only changes in cmake-related files in this commit. Basically all CMakeLists.txt have been modified, plus most of the *.cmake ones.
4939811 to
b69c5a5
Compare
|
(closing temporarily so I can force push without triggering the CI checks) |
|
Well, don't seem to be able to reopen this one, so opened a new one : #2172 |
|
@aphecetche : I just had a discussion with @shahor02 and also he mentioned he'd prefer to have all macros tested if not explicitly excluded. Otherwise people will not add tests for their macros, and reviewers will overlook this, and we'll have plenty of macros failing when the code is updated. How about we do it the following way: |
|
@davidrohr @shahor02 @ihrivnac this is something to discuss more widely maybe, as I guess I still disagree ;-) Disabling (if any) should not be in the top level CMakeLists.txt IMO. At the very least must have a separate cmake file list for that. But to disable a test macro, why not just comment out the relevant o2_add_test_root_macro in the corresponding CMakeLists.txt in the relevant sub directory ? Also, are our 130 macros really useful / used ? What's the purpose of those macros (as they take a long time to test, so they should bring some real value) ? If some are meant to check the functionality of some piece of code, I would argue those ones should be converted to proper tests. If some pre-date workflows, are they still relevant ? etc... All in all I believe the macros situation warrants a review. |
|
@aphecetche I agree that we have some obsolete macros and periodic cleanup is needed. But most of them are used (e.g. it is easier to debug the code steered by a macro than by the DPL). By not running compilation tests for all macros (except some justified cases) we risk to accumulate lot of broken code. In opposite, having them in compilation test will allow to spot when it becomes obsolete and trigger either its fix or removal. |
|
@shahor02 @davidrohr Maybe I misunderstood David's earlier comment completely, sorry about that, so let me rephrase. |
|
Yes, that was the plan :|
|
|
@aphecetche I would expect that whatever is not in the exclusion list (for a justified reason) should be tested. |
|
yes, calling o2_add_test_root_macro is required. See #2188 as a possible implementation of the logic outlined in the comments above. |
* Adding muon cuts * PWGDQ/Core/CutsLibrary.cxx : Adding muon cuts
using the CI to x-check a local problem is not just a local problem