Skip to content

[RF] Move RooFit headers not starting with Roo in RooFit directory#9394

Merged
guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:RooFit_headers_1
Dec 9, 2021
Merged

[RF] Move RooFit headers not starting with Roo in RooFit directory#9394
guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:RooFit_headers_1

Conversation

@guitargeek

@guitargeek guitargeek commented Dec 8, 2021

Copy link
Copy Markdown
Contributor

In the v6.26 development cycle cycle, some RooFit helper header files
whose names don't start with the Roo prefix sneaked into the
RooFitCore library. These headers have the overly generic names
Floats.h and UniqueId.h, which calls for trouble in environments
where the ROOT headers are directly installed in the main system include
path (most Linux distributions).

To prevent any possible issues, this commit proposes and follows new
conventions for RooFit headers:

  • Installed RooFit headers must start with Roo* or must be located
    in a subdirectory starting with Roo* (e.g. RooFit or RooStats).
  • Similarly, if the class name doesn't start with Roo, it has to go in
    a Roo* namespace (usually RooFit)
  • Free functions always need to go in this namespace
  • For implmentation details that we can't avoid installing, we can use
    a Roo*::Detail namespace like we have with ROOT::Detail (same
    with Experimental)

We should also keep in mind what we established in PR #9078:

  • inc/ is for installed headers
  • res/ is for headers that are only used at compile time of other
    ROOT components
  • Headers only used within a library go to src/

@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, ROOT-ubuntu2004/soversion, mac1015/python3, mac11/cxx17, windows10/cxx14
How to customize builds

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-ubuntu2004/soversion.
Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-12-08T12:15:04.734Z] FAILED: core/G__Core.cxx lib/Core.pcm
  • [2021-12-08T12:15:06.150Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2687:10: error: redefinition of module 'RooFit/TestStatistics/RooAbsL.h'
  • [2021-12-08T12:15:06.150Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2688:10: error: redefinition of module 'RooFit/TestStatistics/RooBinnedL.h'
  • [2021-12-08T12:15:06.150Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2689:10: error: redefinition of module 'RooFit/TestStatistics/RooRealL.h'
  • [2021-12-08T12:15:06.150Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2690:10: error: redefinition of module 'RooFit/TestStatistics/RooSubsidiaryL.h'
  • [2021-12-08T12:15:06.150Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2691:10: error: redefinition of module 'RooFit/TestStatistics/RooSumL.h'
  • [2021-12-08T12:15:06.150Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2692:10: error: redefinition of module 'RooFit/TestStatistics/RooUnbinnedL.h'
  • [2021-12-08T12:15:06.150Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2696:10: error: redefinition of module 'RooFitLegacy/RooCatTypeLegacy.h'
  • [2021-12-08T12:15:06.150Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2697:10: error: redefinition of module 'RooFitLegacy/RooCategorySharedProperties.h'
  • [2021-12-08T12:15:06.150Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2698:10: error: redefinition of module 'RooFitLegacy/RooHashTable.h'

And 127 more

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-debian10-i386/cxx14.
Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-12-08T12:15:59.465Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2622:10: error: redefinition of module 'RooFit/TestStatistics/RooAbsL.h'
  • [2021-12-08T12:15:59.465Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2623:10: error: redefinition of module 'RooFit/TestStatistics/RooBinnedL.h'
  • [2021-12-08T12:15:59.465Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2624:10: error: redefinition of module 'RooFit/TestStatistics/RooRealL.h'
  • [2021-12-08T12:15:59.466Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2625:10: error: redefinition of module 'RooFit/TestStatistics/RooSubsidiaryL.h'
  • [2021-12-08T12:15:59.466Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2626:10: error: redefinition of module 'RooFit/TestStatistics/RooSumL.h'
  • [2021-12-08T12:15:59.466Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2627:10: error: redefinition of module 'RooFit/TestStatistics/RooUnbinnedL.h'
  • [2021-12-08T12:15:59.466Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2631:10: error: redefinition of module 'RooFitLegacy/RooCatTypeLegacy.h'
  • [2021-12-08T12:15:59.466Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2632:10: error: redefinition of module 'RooFitLegacy/RooCategorySharedProperties.h'
  • [2021-12-08T12:15:59.466Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2633:10: error: redefinition of module 'RooFitLegacy/RooHashTable.h'
  • [2021-12-08T12:15:59.466Z] /home/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2634:10: error: redefinition of module 'RooFitLegacy/RooMinuit.h'

And 126 more

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-performance-centos8-multicore/default.
Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-12-08T12:16:29.967Z] /data/sftnight/workspace/root-pullrequests-build/build/include/module.modulemap:2679:10: error: redefinition of module 'RooFit/TestStatistics/RooAbsL.h'
  • [2021-12-08T12:16:29.967Z] /data/sftnight/workspace/root-pullrequests-build/build/include/module.modulemap:2680:10: error: redefinition of module 'RooFit/TestStatistics/RooBinnedL.h'
  • [2021-12-08T12:16:29.967Z] /data/sftnight/workspace/root-pullrequests-build/build/include/module.modulemap:2681:10: error: redefinition of module 'RooFit/TestStatistics/RooRealL.h'
  • [2021-12-08T12:16:29.967Z] /data/sftnight/workspace/root-pullrequests-build/build/include/module.modulemap:2682:10: error: redefinition of module 'RooFit/TestStatistics/RooSubsidiaryL.h'
  • [2021-12-08T12:16:29.967Z] /data/sftnight/workspace/root-pullrequests-build/build/include/module.modulemap:2683:10: error: redefinition of module 'RooFit/TestStatistics/RooSumL.h'
  • [2021-12-08T12:16:29.967Z] /data/sftnight/workspace/root-pullrequests-build/build/include/module.modulemap:2684:10: error: redefinition of module 'RooFit/TestStatistics/RooUnbinnedL.h'
  • [2021-12-08T12:16:29.967Z] /data/sftnight/workspace/root-pullrequests-build/build/include/module.modulemap:2688:10: error: redefinition of module 'RooFitLegacy/RooCatTypeLegacy.h'
  • [2021-12-08T12:16:29.967Z] /data/sftnight/workspace/root-pullrequests-build/build/include/module.modulemap:2689:10: error: redefinition of module 'RooFitLegacy/RooCategorySharedProperties.h'
  • [2021-12-08T12:16:29.967Z] /data/sftnight/workspace/root-pullrequests-build/build/include/module.modulemap:2690:10: error: redefinition of module 'RooFitLegacy/RooHashTable.h'
  • [2021-12-08T12:16:29.967Z] /data/sftnight/workspace/root-pullrequests-build/build/include/module.modulemap:2691:10: error: redefinition of module 'RooFitLegacy/RooMinuit.h'

And 126 more

@phsft-bot

Copy link
Copy Markdown

Build failed on mac11/cxx17.
Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-12-08T12:30:36.443Z] FAILED: core/G__Core.cxx lib/Core.pcm
  • [2021-12-08T12:30:37.375Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2876:10: error: redefinition of module 'RooFit/TestStatistics/RooAbsL.h'
  • [2021-12-08T12:30:37.375Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2877:10: error: redefinition of module 'RooFit/TestStatistics/RooBinnedL.h'
  • [2021-12-08T12:30:37.375Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2878:10: error: redefinition of module 'RooFit/TestStatistics/RooRealL.h'
  • [2021-12-08T12:30:37.375Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2879:10: error: redefinition of module 'RooFit/TestStatistics/RooSubsidiaryL.h'
  • [2021-12-08T12:30:37.375Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2880:10: error: redefinition of module 'RooFit/TestStatistics/RooSumL.h'
  • [2021-12-08T12:30:37.375Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2881:10: error: redefinition of module 'RooFit/TestStatistics/RooUnbinnedL.h'
  • [2021-12-08T12:30:37.375Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2885:10: error: redefinition of module 'RooFitLegacy/RooCatTypeLegacy.h'
  • [2021-12-08T12:30:37.375Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2886:10: error: redefinition of module 'RooFitLegacy/RooCategorySharedProperties.h'
  • [2021-12-08T12:30:37.375Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/module.modulemap:2887:10: error: redefinition of module 'RooFitLegacy/RooHashTable.h'

And 141 more

@phsft-bot

Copy link
Copy Markdown

Build failed on mac1015/python3.
Running on macitois21.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-12-08T12:57:44.158Z] FAILED: core/G__Core.cxx lib/Core.pcm
  • [2021-12-08T12:57:45.110Z] /Volumes/HD2/build/workspace/root-pullrequests-build/build/include/module.modulemap:2634:10: error: redefinition of module 'RooFit/TestStatistics/RooAbsL.h'
  • [2021-12-08T12:57:45.110Z] /Volumes/HD2/build/workspace/root-pullrequests-build/build/include/module.modulemap:2635:10: error: redefinition of module 'RooFit/TestStatistics/RooBinnedL.h'
  • [2021-12-08T12:57:45.110Z] /Volumes/HD2/build/workspace/root-pullrequests-build/build/include/module.modulemap:2636:10: error: redefinition of module 'RooFit/TestStatistics/RooRealL.h'
  • [2021-12-08T12:57:45.110Z] /Volumes/HD2/build/workspace/root-pullrequests-build/build/include/module.modulemap:2637:10: error: redefinition of module 'RooFit/TestStatistics/RooSubsidiaryL.h'
  • [2021-12-08T12:57:45.110Z] /Volumes/HD2/build/workspace/root-pullrequests-build/build/include/module.modulemap:2638:10: error: redefinition of module 'RooFit/TestStatistics/RooSumL.h'
  • [2021-12-08T12:57:45.110Z] /Volumes/HD2/build/workspace/root-pullrequests-build/build/include/module.modulemap:2639:10: error: redefinition of module 'RooFit/TestStatistics/RooUnbinnedL.h'
  • [2021-12-08T12:57:45.110Z] /Volumes/HD2/build/workspace/root-pullrequests-build/build/include/module.modulemap:2643:10: error: redefinition of module 'RooFitLegacy/RooCatTypeLegacy.h'
  • [2021-12-08T12:57:45.373Z] /Volumes/HD2/build/workspace/root-pullrequests-build/build/include/module.modulemap:2644:10: error: redefinition of module 'RooFitLegacy/RooCategorySharedProperties.h'
  • [2021-12-08T12:57:45.373Z] /Volumes/HD2/build/workspace/root-pullrequests-build/build/include/module.modulemap:2645:10: error: redefinition of module 'RooFitLegacy/RooHashTable.h'

And 141 more

@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, ROOT-ubuntu2004/soversion, mac1015/python3, mac11/cxx17, windows10/cxx14
How to customize builds

@phsft-bot

Copy link
Copy Markdown

Build failed on mac11/cxx17.
Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

In the v6.26 development cycle cycle, some RooFit helper header files
whose names don't start with the `Roo` prefix sneaked into the
RooFitCore library. These headers have the overly generic names
`Floats.h` and `UniqueId.h`, which calls for trouble in environments
where the ROOT headers are directly installed in the main system include
path (most Linux distributions).

To prevent any possible issues, this commit proposes and follows new
conventions for RooFit headers:

  * Installed RooFit headers must start with `Roo*` or must be located
    in a subdirectory starting with `Roo*` (e.g. RooFit or RooStats).
  * Similarly, if the class name doesn't start with Roo, it has to go in
    a `Roo*` namespace (usually `RooFit`)
  * Free functions always need to go in this namespace
  * For implmentation details that we can't avoid installing, we can use
    a `Roo*::Detail` namespace like we have with `ROOT::Detail` (same
    with `Experimental`)

We should also keep in mind what we established in PR root-project#9078:

  * `inc/` is for installed headers
  * `res/` is for headers that are only used at compile time of other
    ROOT components
  * Headers only used within a library go to `src/`

This means that there is no need in specifiying the headers to install
manually in `roofit/rofitcore/CMakeLists.txt`. We can glob for all the
headers fulfilling the criteria above.
@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, ROOT-ubuntu2004/soversion, mac1015/python3, mac11/cxx17, windows10/cxx14
How to customize builds

@lmoneta lmoneta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !
Thank you for this change that avoid exposing headers without a prefix at the top level which could cause conflicts.

@pcanal

pcanal commented Dec 9, 2021

Copy link
Copy Markdown
Member

Is there any of the moved headers that existed before v6.26?

@guitargeek

Copy link
Copy Markdown
Contributor Author

Hi @pcanal, no there isn't, that's why I take the opportunity now to follow the Roo* convention

@phsft-bot

Copy link
Copy Markdown

Build failed on mac11/cxx17.
Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@guitargeek guitargeek merged commit c9aa695 into root-project:master Dec 9, 2021
@guitargeek guitargeek deleted the RooFit_headers_1 branch December 9, 2021 17:37
@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, ROOT-ubuntu2004/soversion, mac1015/python3, mac11/cxx17, windows10/cxx14
How to customize builds

@phsft-bot

Copy link
Copy Markdown

Build failed on mac1015/python3.
Running on macitois19.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-12-09T17:39:23.936Z] CMake Error at /Volumes/HDD2/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1056 (message):

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-ubuntu2004/soversion.
Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-12-09T17:40:24.992Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1056 (message):

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-debian10-i386/cxx14.
Running on pcepsft11.dyndns.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-12-09T17:40:26.182Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1056 (message):

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-ubuntu16/nortcxxmod.
Running on sft-ubuntu-1604-1.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-12-09T17:40:34.487Z] CMake Error at /mnt/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1056 (message):

@phsft-bot

Copy link
Copy Markdown

Build failed on mac11/cxx17.
Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-12-09T17:40:35.122Z] CMake Error at /Users/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1056 (message):

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-performance-centos8-multicore/default.
Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-12-09T17:42:27.930Z] CMake Error at /data/sftnight/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1056 (message):

@phsft-bot

Copy link
Copy Markdown

Build failed on windows10/cxx14.
Running on null:C:\build\workspace\root-pullrequests-build
See console output.

Errors:

  • [2021-12-09T17:44:24.264Z] CMake Error at C:/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1056 (message):

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants