cms-sw / cmsdist

CMS Offline Software build configuration
Other
27 stars 183 forks source link

Can we avoid maintaining CMSSW dependencies in BuildFiles? #5992

Open davidlange6 opened 4 years ago

davidlange6 commented 4 years ago

hi @smuzaffar (mostly)

having "cleaned up" (hopefully) a lot of CMSSW build files - I wonder if we can avoid altogether having developers maintain the lists of CMSSW packages in them? Eg, its easy to write a script (I did one) to find the set of packages with header dependencies and separately, those with dependencies in src (and plugins, etc).

BuildFiles could express external dependencies and other needed flags (well, many of those can be automated too but more complicated).

As an added bonus, this could allow us to separate include and lib dependencies if we wanted.

cmsbuild commented 4 years ago

A new Issue was created by @davidlange6 David Lange.

@Dr15Jones, @silviodonato, @dpiparo, @smuzaffar, @makortel can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

smuzaffar commented 4 years ago

assign core @davidlange6 , yes this is doable. The only issue is that we have cyclic source level dependencies. If we can avoid that then it is trivial but will cost some extra build time as scram has to re-calculate it on every change in source file.

cmsbuild commented 4 years ago

New categories assigned: core

@Dr15Jones,@smuzaffar,@makortel you have been requested to review this Pull request/Issue and eventually sign? Thanks

Dr15Jones commented 4 years ago

@davidlange6 How about we test BuildFile.xml for dependencies as part of the pull request checks? In that way we do not have to calculate the dependencies each time someone checks out the code.

davidlange6 commented 4 years ago

Well, we’d first have to fix all the build files. Indeed, if dependency grepping slows down “scram b” or other commands noticeably then thats definitely a reason not to do what I suggest.

On Jun 25, 2020, at 4:41 PM, Chris Jones notifications@github.com<mailto:notifications@github.com> wrote:

@davidlange6https://github.com/davidlange6 How about we test BuildFile.xml for dependencies as part of the pull request checks? In that way we do not have to calculate the dependencies each time someone checks out the code.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/cms-sw/cmsdist/issues/5992#issuecomment-649592968, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABGPFQ3SASWS3OA4BFGUQA3RYNO2NANCNFSM4OIM5TDA.

smuzaffar commented 3 years ago

yes it takes some time to find the correct dependencies specially if you have

#ifdef SOMETHING
#include "header1"
#else
#include "header2"
#endif

I agree with @Dr15Jones , we can run something for PR tests to make sure the dependency on CMSSW packages is clean. Externel tool deps is bit hard specially if there are multiple tools ( just like root which has rootcore, rootgui, rootmath, rootgl etc.) but only one include path then it is really hard to know which tool to use.