Re: RFC: post-installation checks on library headers & cmake config
Ben Cooksley <[email protected]> Sun, 5 Jul 2026 08:12:34 +1200
| Newsgroups | gmane.comp.kde.devel.general |
|---|---|
| Message-ID | <CA+XidOE1rtkrxvCjdbj9oGuSMnv9sA7dqT2MMefjgDmYJX3WrA@mail.gmail.com> |
--0000000000001bb64a0655ceaaff Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Jul 5, 2026 at 7:15=E2=80=AFAM Nandani Chaurasia < [email protected]> wrote: > Hi Friedrich, > HI Nandani, > > I am interested in contributing to KDE and would like to try > ECMInstalledLibraryCheck. I am still getting familiar with the KDE > contribution workflow. > > At the moment, I am getting a =E2=80=9CForbidden=E2=80=9D error when tryi= ng to open KDE > Invent. Could you please suggest what I should do to get access, and > whether there is a beginner-friendly area where feedback, documentation > improvements, or additional test coverage would be useful? > Depending on the page you are seeing, this could mean any one of a few different things, however as a first step please ensure your device is up to date and is running a modern browser. > > I would be happy to test the prototype on a small CMake/C++ project and > share feedback. > > Best regards, > Nandani > Thanks, Ben > > On Sat, Jul 4, 2026, 8:52 PM Friedrich W. H. Kossebau <[email protected]> > wrote: > >> Hi, >> >> how would you feel if there is an option to automatically test the C++ >> library development artifacts (headers, CMake config, etc.) in their >> installed variant for usability, before other developers get to use them= ? >> >> If that sounds somewhere interesting to you, read on :) >> >> Possibly you also have already heard of this, there is currently some on= - >> going effort to develop a system for post-installation C++ library check= s, >> by the implementation name ECMInstalledLibraryCheck. While already in >> some >> usable state and there-by successfully having uncovered a number of >> issues, >> it is based only on a few people's needs & ideas, without any known >> similar >> solutions to be "inspired" from for features and patterns. >> >> >> YOUR INPUT & COLLABORATION IS VERY WANTED >> >> What are your pain points with installed C++ library artifacts you wish >> that >> would be tested (and which cannot be tested uninstalled)? What problems >> have >> you seen? >> >> What similar solutions do exist already, for comparison & inspiration? >> >> Would you have fun working on integrating such checks into KDE CI? >> >> Have you tried the current prototype of ECMInstalledLibraryCheck on your >> library, what issues did you detect in your library, what features would >> you >> like in the check? (if not yet, see blog post linked below how to do) >> >> Special question: have you seen public preprocessor definitions whose >> values >> depends on the build which only are defined with some library headers? >> >> >> SMALL PEAK INTO PROTOTYPE FUNCTIONALITY >> >> To get an idea on the current approach with ECMInstalledLibraryCheck, th= e >> checks are added by declaring them via such functions (by the example of >> KContacts): >> >> --- 8< --- >> # use the module from ECM >> include(ECMInstalledLibraryCheck) >> # for the library target KF6Contacts set up the check >> ecm_add_installed_library_check(KF6Contacts >> PACKAGE_NAME "KF6Contacts" >> PACKAGE_VERSION ${KCONTACTS_VERSION} >> PACKAGE_TARGET_NAMESPACE "KF6::" >> ) >> # register the official include statements for the check >> ecm_installed_library_check_include_strings(KF6Contacts >> HEADERS ${KContacts_CamelCase_HEADERS} >> PREFIX KContacts >> ) >> --- 8< --- >> >> Further checks on certain aspects can be added by functions like >> ecm_installed_library_check_cmake_variable(), >> ecm_installed_library_check_compile_definition() and >> ecm_installed_library_check_preprocessor_macro(). Already there is a >> convenience variant of the last: >> --- 8< --- >> # check all includes also have the usual version macros defined afterwar= ds >> ecm_installed_library_check_version_preprocessor_macros(KF6Contacts >> PREFIX KCONTACTS >> VERSION ${KCONTACTS_VERSION} >> SILENT # only report errors >> ) >> --- 8< --- >> >> The check on the library then will appear as global build system target >> "all_installed_library_check", as well as variants per library. >> >> >> MORE INFO >> >> Find the merge request of ECMInstalledLibraryCheck here: >> https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/5= 90 >> >> A longer blog post going into details, also how to test-drive the check: >> >> https://frinring.wordpress.com/2026/06/30/c-library-headers-cmake-config= -files-are-we-serviceable/ >> >> >> TRY IT, COMMENT IT >> >> Be very invited to shape this installed library check solution, so it ca= n >> be >> useful to you right from the its first release. >> Give it 15 minutes now for some considerations & feedback, and hopefully >> save many more minutes in the future :) >> >> Hope to hear from you (even just a "want-this" or "useless-because"), >> and thanks to those who already contributed. >> >> Cheers >> Friedrich >> >> >> --0000000000001bb64a0655ceaaff Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><span style=3D"background-color:transpare= nt">On Sun, Jul 5, 2026 at 7:15=E2=80=AFAM Nandani Chaurasia <<a href=3D= "mailto:[email protected]">[email protected]</a>>= ; wrote:</span></div><div class=3D"gmail_quote gmail_quote_container"><bloc= kquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:= 1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"auto">Hi Friedrich= ,</div></blockquote><div><br></div><div>HI Nandani,</div><div>=C2=A0</div><= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"auto"><div dir= =3D"auto"><br></div><div dir=3D"auto">I am interested in contributing to KD= E and would like to try ECMInstalledLibraryCheck. I am still getting famili= ar with the KDE contribution workflow.</div><div dir=3D"auto"><br></div><di= v dir=3D"auto">At the moment, I am getting a =E2=80=9CForbidden=E2=80=9D er= ror when trying to open KDE Invent. Could you please suggest what I should = do to get access, and whether there is a beginner-friendly area where feedb= ack, documentation improvements, or additional test coverage would be usefu= l?</div></div></blockquote><div><br></div><div>Depending on the page you ar= e seeing, this could mean any one of a few different things, however as a f= irst step please ensure your device is up to date and is running a modern b= rowser.</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"ma= rgin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:= 1ex"><div dir=3D"auto"><div dir=3D"auto"><br></div><div dir=3D"auto">I woul= d be happy to test the prototype on a small CMake/C++ project and share fee= dback.</div><div dir=3D"auto"><br></div><div dir=3D"auto">Best regards,</di= v><div dir=3D"auto">Nandani</div></div></blockquote><div><br></div><div>Tha= nks,</div><div>Ben</div><div>=C2=A0</div><blockquote class=3D"gmail_quote" = style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);pa= dding-left:1ex"><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gm= ail_attr">On Sat, Jul 4, 2026, 8:52 PM Friedrich W. H. Kossebau <<a href= =3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>> wro= te:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px = 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br> <br> how would you feel if there is an option to automatically test the C++ <br> library development artifacts (headers, CMake config, etc.) in their <br> installed variant for usability, before other developers get to use them?<b= r> <br> If that sounds somewhere interesting to you, read on :)<br> <br> Possibly you also have already heard of this, there is currently some on-<b= r> going effort to develop a system for post-installation C++ library checks,<= br> by the implementation name ECMInstalledLibraryCheck. While already in some = <br> usable state and there-by successfully having uncovered a number of issues,= <br> it is based only on a few people's needs & ideas, without any known= similar <br> solutions to be "inspired" from for features and patterns.<br> <br> <br> YOUR INPUT & COLLABORATION IS VERY WANTED<br> <br> What are your pain points with installed C++ library artifacts you wish tha= t <br> would be tested (and which cannot be tested uninstalled)? What problems hav= e <br> you seen?<br> <br> What similar solutions do exist already, for comparison & inspiration?<= br> <br> Would you have fun working on integrating such checks into KDE CI?<br> <br> Have you tried the current prototype of ECMInstalledLibraryCheck on your <b= r> library, what issues did you detect in your library, what features would yo= u <br> like in the check? (if not yet, see blog post linked below how to do)<br> <br> Special question: have you seen public preprocessor definitions whose value= s <br> depends on the build which only are defined with some library headers?<br> <br> <br> SMALL PEAK INTO PROTOTYPE FUNCTIONALITY<br> <br> To get an idea on the current approach with ECMInstalledLibraryCheck, the <= br> checks are added by declaring them via such functions (by the example of <b= r> KContacts):<br> <br> --- 8< ---<br> # use the module from ECM<br> include(ECMInstalledLibraryCheck)<br> # for the library target KF6Contacts set up the check<br> ecm_add_installed_library_check(KF6Contacts<br> =C2=A0 =C2=A0 PACKAGE_NAME "KF6Contacts"<br> =C2=A0 =C2=A0 PACKAGE_VERSION ${KCONTACTS_VERSION}<br> =C2=A0 =C2=A0 PACKAGE_TARGET_NAMESPACE "KF6::"<br> )<br> # register the official include statements for the check<br> ecm_installed_library_check_include_strings(KF6Contacts<br> =C2=A0 =C2=A0 HEADERS ${KContacts_CamelCase_HEADERS}<br> =C2=A0 =C2=A0 PREFIX KContacts<br> )<br> --- 8< ---<br> <br> Further checks on certain aspects can be added by functions like <br> ecm_installed_library_check_cmake_variable(), <br> ecm_installed_library_check_compile_definition() and <br> ecm_installed_library_check_preprocessor_macro(). Already there is a <br> convenience variant of the last:<br> --- 8< ---<br> # check all includes also have the usual version macros defined afterwards<= br> ecm_installed_library_check_version_preprocessor_macros(KF6Contacts<br> =C2=A0 =C2=A0 PREFIX KCONTACTS<br> =C2=A0 =C2=A0 VERSION ${KCONTACTS_VERSION}<br> =C2=A0 =C2=A0 SILENT # only report errors<br> )<br> --- 8< ---<br> <br> The check on the library then will appear as global build system target <br= > "all_installed_library_check", as well as variants per library.<b= r> <br> <br> MORE INFO<br> <br> Find the merge request of ECMInstalledLibraryCheck here:<br> <a href=3D"https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_re= quests/590" rel=3D"noreferrer noreferrer" target=3D"_blank">https://invent.= kde.org/frameworks/extra-cmake-modules/-/merge_requests/590</a><br> <br> A longer blog post going into details, also how to test-drive the check:<br= > <a href=3D"https://frinring.wordpress.com/2026/06/30/c-library-headers-cmak= e-config-files-are-we-serviceable/" rel=3D"noreferrer noreferrer" target=3D= "_blank">https://frinring.wordpress.com/2026/06/30/c-library-headers-cmake-= config-files-are-we-serviceable/</a><br> <br> <br> TRY IT, COMMENT IT<br> <br> Be very invited to shape this installed library check solution, so it can b= e <br> useful to you right from the its first release.<br> Give it 15 minutes now for some considerations & feedback, and hopefull= y <br> save many more minutes in the future :)<br> <br> Hope to hear from you (even just a "want-this" or "useless-b= ecause"),<br> and thanks to those who already contributed.<br> <br> Cheers<br> Friedrich<br> <br> <br> </blockquote></div> </blockquote></div></div> --0000000000001bb64a0655ceaaff--