Skip to content

Conversation

@imorlxs
Copy link
Member

@imorlxs imorlxs commented Jul 11, 2024

@imorlxs imorlxs added WIP Work in progress DoNotMerge Not ready for merge labels Jul 11, 2024
@imorlxs imorlxs changed the title Replacing genreflex in favor of rootcling Replace genreflex in favor of rootcling Jul 17, 2024
@imorlxs imorlxs added ready-for-review PR is ready for review and removed WIP Work in progress DoNotMerge Not ready for merge labels Jul 27, 2024
@imorlxs imorlxs marked this pull request as ready for review July 27, 2024 15:32
@TobiasDuswald
Copy link
Contributor

here we'd probably need you to check if this is all fine @vgvassilev .

Thanks @imorlxs 🚀

@vgvassilev
Copy link

This looks reasonable to me. Maybe we should remove the whitespace changes and configure the editor to not do them automatically.

That change is a small but important step towards getting C++ modules support for BioDynaMo.

@imorlxs
Copy link
Member Author

imorlxs commented Aug 5, 2024

This looks reasonable to me. Maybe we should remove the whitespace changes and configure the editor to not do them automatically.

That change is a small but important step towards getting C++ modules support for BioDynaMo.

I just fixed the whitespace changes. Is this PR ready to merge?

@vgvassilev
Copy link

Looks good to me!

@TobiasDuswald
Copy link
Contributor

@imorlxs @vgvassilev can you comment if and how that affects the codebase or it's compilation? Does it compile identically, e.g., is genreflex a deprecated command that we now replace with cling or what's the difference now? Would be great if you could elaborate on that such that we can understand that contribution better and have it documented here.

Also @imorlxs, the call to cling is once

COMMAND ${ROOTCLING_EXECUTABLE} -reflex -f ${gensrcdict} ${rootmapopts} ${headerfiles} ${selectionfile} -noIncludePaths -inlineInputHeader

and once

rootcling -reflex -f ${DICT} ${HEADERS} --noIncludePaths -inlineInputHeader ${SELECTIONFILE} ${CXX_DEFINES} ${CXX_INCLUDES} $ADDITIONAL_CXX_FLAGS

I noticed that the -inlineInputHeader flag occurs at two different position. I'm not sure if It treats what follows as argument or not? I had issues with the selection files in the past and they gave me a headache. I want to be sure that we treat them the right way. Same goes for --nonIncludePaths and -nonIncludePaths, respectively. If the order makes no difference, I think it would still be good to change the commands such that the arguments occur in the same order; I have a slight preference for the former if they are identical.

@vgvassilev
Copy link

@imorlxs @vgvassilev can you comment if and how that affects the codebase or it's compilation? Does it compile identically, e.g., is genreflex a deprecated command that we now replace with cling or what's the difference now? Would be great if you could elaborate on that such that we can understand that contribution better and have it documented here.

genreflex is a hard link to rootcling but with less capabilities. That is, genreflex is a driver for rootcling but does not support all flags that we need to enable C++ modules for BDM. That's the motivation to move, moreover, genreflex is in practice deprecated :)

@imorlxs
Copy link
Member Author

imorlxs commented Aug 7, 2024

@imorlxs @vgvassilev can you comment if and how that affects the codebase or it's compilation? Does it compile identically, e.g., is genreflex a deprecated command that we now replace with cling or what's the difference now? Would be great if you could elaborate on that such that we can understand that contribution better and have it documented here.

Also @imorlxs, the call to cling is once

COMMAND ${ROOTCLING_EXECUTABLE} -reflex -f ${gensrcdict} ${rootmapopts} ${headerfiles} ${selectionfile} -noIncludePaths -inlineInputHeader

and once

rootcling -reflex -f ${DICT} ${HEADERS} --noIncludePaths -inlineInputHeader ${SELECTIONFILE} ${CXX_DEFINES} ${CXX_INCLUDES} $ADDITIONAL_CXX_FLAGS

I noticed that the -inlineInputHeader flag occurs at two different position. I'm not sure if It treats what follows as argument or not? I had issues with the selection files in the past and they gave me a headache. I want to be sure that we treat them the right way. Same goes for --nonIncludePaths and -nonIncludePaths, respectively. If the order makes no difference, I think it would still be good to change the commands such that the arguments occur in the same order; I have a slight preference for the former if they are identical.

As @vgvassilev said, since ROOTv6. genreflex is nothing but a wrapper around rootcling 1. Genreflex internally uses rootcling, and the rootcling call can be showed with genreflex -debug or the new --print-rootcling-invocation 2 That's how I figured out the arguments that we need to migrate to rootcling. It should compile basically the same, and don't affect the codebase.

The flags can be in any position because the way the ROOT parser works, and can also be with one minus or two. I made a commit fixing it and putting the two call the same way.

Thank you for the feedback!

@imorlxs imorlxs marked this pull request as draft August 19, 2024 17:23
@imorlxs imorlxs marked this pull request as ready for review August 19, 2024 17:23
@sonarqubecloud
Copy link

@vasvav vasvav added the on-hold on hold, not actively developed label Mar 20, 2025
@TobiasDuswald
Copy link
Contributor

Rebased on master, if CI is 🟢 this is ready to merge.

@sonarqubecloud
Copy link

@TobiasDuswald
Copy link
Contributor

TobiasDuswald commented Mar 21, 2025

PR appears to affect [ FAILED ] SchedulerTest.Backup on macOS.

Cannot reproduce failure on MacBook Pro, M3 pro, Sequoia 15.3.1, Xcode 15.4 .

➡️ won't merge until conflict is resolved

@vgvassilev
Copy link

Do we have a clue what might be?

@imorlxs
Copy link
Member Author

imorlxs commented Mar 21, 2025

I have no clue... I just re-run the jobs and now they pass ^^"

@vasvav
Copy link
Contributor

vasvav commented Mar 21, 2025

@imorlxs, I am sorry this comment comes a bit late from my side; please clarify things about this PR (purpose, aim, what it solves, etc.). Thanks

@TobiasDuswald TobiasDuswald added the DoNotMerge Not ready for merge label Mar 24, 2025
@imorlxs
Copy link
Member Author

imorlxs commented Apr 9, 2025

Hi @vasvav. The purpose of this PR is to replace genreflex. As @vgvassilev said, since ROOTv6. genreflex is nothing but a wrapper around rootcling 1

Genreflex doesn't have the options to create a module based dictionary, and is essentially deprecated 2

This PR should not affect the codebase, as it only replace the hardlink to the actually rootcling call. The aim is to be able to use C++ Modules in BDM (#385 is a GSoC project that I would love to resume this summer, but as an independent developer)

@TobiasDuswald TobiasDuswald added ready Ready for merge / review and removed ready-for-review PR is ready for review DoNotMerge Not ready for merge on-hold on hold, not actively developed labels May 8, 2025
@TobiasDuswald
Copy link
Contributor

Previously advised not to merge because of stochastic failure of [ FAILED ] SchedulerTest.Backup. Saw this in another PR now so this issue is (as expected) not related to this PR and can be merged!

Thanks @imorlxs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready Ready for merge / review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants