root icon indicating copy to clipboard operation
root copied to clipboard

[RDF] Make df106_HiggsToFourLeptons.C run properly when compiled

Open silverweed opened this issue 1 year ago • 2 comments

This Pull request:

Explicitly declares the signatures of types that are used in jitted expressions so that the tutorial runs properly even when compiled AOT.

Changes or fixes:

Partially fixes https://github.com/root-project/root/issues/15638

Checklist:

  • [x] tested changes locally
  • [ ] updated the docs (if necessary)

silverweed avatar May 24 '24 13:05 silverweed

I have to say it's the first time such an issue was brought up. On the one hand, I definitely see your point and the problem you underline as real. On the other hand, the tutorials should be as easy to grasp as possible and introducing preprocessor macros is imho overkill. I believe we should have a bit more discussion about this.

vepadulano avatar May 24 '24 15:05 vepadulano

Test Results

    12 files      12 suites   2d 16h 22m 29s :stopwatch:  2 642 tests  2 642 :white_check_mark: 0 :zzz: 0 :x: 29 977 runs  29 977 :white_check_mark: 0 :zzz: 0 :x:

Results for commit e320c9c7.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar May 24 '24 15:05 github-actions[bot]

I believe we should have a bit more discussion about this.

IMHO, all tutorials should also compile. That is very valuable for us for debugging, and also for the users because they can readily copy-paste code snippets from the tutorials to their executables.

That being said, I would not use preprocessor macros except for ifdef __CLING__ in the tutorials. That's just confusing to the users. In the case of this this PR, I think it's better just to duplicate the code with the signature.

guitargeek avatar May 29 '24 10:05 guitargeek