D19565: kconfig_compiler: new kcfgc args HeaderExtension & SourceExtension

2021-09-16 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  In D19565#678804 , @alex wrote:
  
  > However the option seems pretty unused, even from a github search: 
https://github.com/search?q=HeaderExtension%3D+extension%3Akcfgc&type=Code&ref=advsearch&l=&l=
  
  
  In comparison to how many non KDE users of kconfigcompiler? ;) Also is github 
only giving a partial view of the world with htose fine with MS GitHub or 
having put their code in public anyway. After all KF is LGPL, to allow 
in-house/proprietary use. And those often have their subcultures using their 
own peferred suffices, I found :) ).
  
  >> KF targets also consumers outside of KDE spheres
  > 
  > Also I think there are currently quite a lot of kcfgc options, which makes 
is more difficult to work with IMHO. That might also be more true for third 
party users which are not very familiar with the API.
  
  Can you report any who were confused by those rather straightforward options? 
I would expect almost all are not challenged by those bits, removing them 
should not imrpive their experience a lot. Do we have reports/research?
  
  > Though from having a quick look it seems like (pretty much all) of those 
headers are not using any of KDE/Qt libs. Which means that they would not be a 
very likely audience anyways.
  
  I was giving you examples of what C++ developers use. And it's C++ developer 
who are the primary target of our libraries, as everyone else has a hard time 
due to no real bindings.
  
  > If we want to attract our frameworks to more users, making them slimmer is 
also a possibility one needs to consider.
  
  I would not agree that cutting features and reducing flexibility makes things 
more attractive to others. Rather the opposite. Why using a primitive solution 
that only partially fits when one can instead do a home-grown perfect fit with 
full control...

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D19565

To: kossebau, #frameworks, apol
Cc: alex, apol, kde-frameworks-devel, LeGast00n, cblack, michaelh, ahmadsamir, 
ngraham, bruns, vkrause


D19565: kconfig_compiler: new kcfgc args HeaderExtension & SourceExtension

2021-09-16 Thread Alexander Lohnau
alex added a comment.


  However the option seems pretty unused, even from a github search: 
https://github.com/search?q=HeaderExtension%3D+extension%3Akcfgc&type=Code&ref=advsearch&l=&l=
  
  > KF targets also consumers outside of KDE spheres
  
  Also I think there are currently quite a lot of kcfgc options, which makes is 
more difficult to work with IMHO. That might also be more true for third party 
users which are not very familiar with the API.
  
  > to see that developers of other projects prefer those suffixes for C++ 
headers. Using .h, so the same suffix as used for C headers
  
  Though from having a quick look it seems like (pretty much all) of those 
headers are not using any of KDE/Qt libs. Which means that they would not be a 
very likely audience anyways.
  If we want to attract our frameworks to more users, making them slimmer is 
also a possibility one needs to consider.

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D19565

To: kossebau, #frameworks, apol
Cc: alex, apol, kde-frameworks-devel, LeGast00n, cblack, michaelh, ahmadsamir, 
ngraham, bruns, vkrause


D19565: kconfig_compiler: new kcfgc args HeaderExtension & SourceExtension

2021-09-15 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  In D19565#678799 , @alex wrote:
  
  > I am wondering if there is really a need for it. SourceExtension seems 
completely unused and HeaderExtension is only used in okteta.
  >
  > Though in KDE code, Qt code  (and most other that I know of) it is the ".h" 
extension is the most common one for headers.
  >
  > Are there any reasons for having it that I am not aware of?
  
  
  KF targets also consumers outside of KDE spheres, which are not bound to 
KDE's suffix tradition/culture (and any need to stay backward-compatible to 
that), so just looking at Qt & KDE is not enough. The world is bigger ;)
  
  Try e.g.`find /usr/include/ -name "*.hxx"` and `find /usr/include/ -name 
"*.hpp"` to see that developers of other projects prefer those suffixes for C++ 
headers.  Using `.h`, so the same suffix as used for C headers, has the 
disadvantage that one cannot tell the type by just the siuffix, and most MIME 
type guessers also fall flat due to not reliable magic bytes.
  
  When it comes to the source suffix, there also are bigger subcultures 
preferring something else than `.cpp`, not sure where the others are coming 
from.
  
  https://en.wikipedia.org/wiki/C++ lists these suffixes being more widely 
used: .C, .cc, .cpp, .cxx, .c++, .h, .H, .hh, .hpp, .hxx, .h++. And while the 
C++ Core guidelines these days recommend .h and .cpp for new-from-scratch 
projects (see 
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rs-file-suffix) 
they also acknowledge there are other traditions. And there are people who 
think the reasoning for using .h (mixing C and C++) is poor when it comes to 
C++-only headers. and for the before-mentioned reasons having a dedicated own 
suffix for headers would be better.
  
  All in all these flags allows for nicer integration of kocnfigcompiler 
generated code over forcing KDE's current traditions onto others. If you ask 
me, actually more of KDE should switch to use some non-h suffix for headers as 
well where possible, less guess work needed whether a header is C or C++..

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D19565

To: kossebau, #frameworks, apol
Cc: alex, apol, kde-frameworks-devel, LeGast00n, cblack, michaelh, ahmadsamir, 
ngraham, bruns, vkrause


D19565: kconfig_compiler: new kcfgc args HeaderExtension & SourceExtension

2021-09-15 Thread Alexander Lohnau
alex added a comment.


  I am wondering if there is really a need for it. SourceExtension seems 
completely unused and HeaderExtension is only used in okteta.
  
  Though in KDE code, Qt code  (and most other that I know of) it is the ".h" 
extension is the most common one for headers.
  
  Are there any reasons for having it that I am not aware of?

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D19565

To: kossebau, #frameworks, apol
Cc: alex, apol, kde-frameworks-devel, LeGast00n, cblack, michaelh, ahmadsamir, 
ngraham, bruns, vkrause


D19565: kconfig_compiler: new kcfgc args HeaderExtension & SourceExtension

2019-03-14 Thread Friedrich W. H. Kossebau
This revision was automatically updated to reflect the committed changes.
Closed by commit R237:a3ed87ca7808: kconfig_compiler: new kcfgc args 
HeaderExtension & SourceExtension (authored by kossebau).

REPOSITORY
  R237 KConfig

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19565?vs=53299&id=53934

REVISION DETAIL
  https://phabricator.kde.org/D19565

AFFECTED FILES
  KF5ConfigMacros.cmake
  autotests/kconfig_compiler/CMakeLists.txt
  autotests/kconfig_compiler/test_fileextensions.kcfg
  autotests/kconfig_compiler/test_fileextensions.kcfgc
  autotests/kconfig_compiler/test_fileextensions_main.cxx
  src/kconfig_compiler/README.dox
  src/kconfig_compiler/checkkcfg.pl
  src/kconfig_compiler/kconfig_compiler.cpp

To: kossebau, #frameworks, apol
Cc: apol, kde-frameworks-devel, michaelh, ngraham, bruns


D19565: kconfig_compiler: new kcfgc args HeaderExtension & SourceExtension

2019-03-13 Thread Aleix Pol Gonzalez
apol accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R237 KConfig

BRANCH
  configfileextensions

REVISION DETAIL
  https://phabricator.kde.org/D19565

To: kossebau, #frameworks, apol
Cc: apol, kde-frameworks-devel, michaelh, ngraham, bruns


D19565: kconfig_compiler: new kcfgc args HeaderExtension & SourceExtension

2019-03-12 Thread Friedrich W. H. Kossebau
kossebau added a comment.


  @apol Thanks for review.
  
  No further comments anyone? Would then proceed to push this next Monday, 
March 18th, if no-one objects.

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D19565

To: kossebau, #frameworks
Cc: apol, kde-frameworks-devel, michaelh, ngraham, bruns


D19565: kconfig_compiler: new kcfgc args HeaderExtension & SourceExtension

2019-03-06 Thread Friedrich W. H. Kossebau
kossebau updated this revision to Diff 53299.
kossebau added a comment.


  update to latest master

REPOSITORY
  R237 KConfig

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19565?vs=53273&id=53299

BRANCH
  configfileextensions

REVISION DETAIL
  https://phabricator.kde.org/D19565

AFFECTED FILES
  KF5ConfigMacros.cmake
  autotests/kconfig_compiler/CMakeLists.txt
  autotests/kconfig_compiler/test_fileextensions.kcfg
  autotests/kconfig_compiler/test_fileextensions.kcfgc
  autotests/kconfig_compiler/test_fileextensions_main.cxx
  src/kconfig_compiler/README.dox
  src/kconfig_compiler/checkkcfg.pl
  src/kconfig_compiler/kconfig_compiler.cpp

To: kossebau, #frameworks
Cc: apol, kde-frameworks-devel, michaelh, ngraham, bruns


D19565: kconfig_compiler: new kcfgc args HeaderExtension & SourceExtension

2019-03-06 Thread Aleix Pol Gonzalez
apol added a comment.


  +1 LGTM

REPOSITORY
  R237 KConfig

REVISION DETAIL
  https://phabricator.kde.org/D19565

To: kossebau, #frameworks
Cc: apol, kde-frameworks-devel, michaelh, ngraham, bruns


D19565: kconfig_compiler: new kcfgc args HeaderExtension & SourceExtension

2019-03-06 Thread Friedrich W. H. Kossebau
kossebau updated this revision to Diff 53273.
kossebau added a comment.


  fixup: correct default cpp for SourceExtension in README.dox

REPOSITORY
  R237 KConfig

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19565?vs=53272&id=53273

BRANCH
  configfileextensions

REVISION DETAIL
  https://phabricator.kde.org/D19565

AFFECTED FILES
  KF5ConfigMacros.cmake
  autotests/kconfig_compiler/CMakeLists.txt
  autotests/kconfig_compiler/test_fileextensions.kcfg
  autotests/kconfig_compiler/test_fileextensions.kcfgc
  autotests/kconfig_compiler/test_fileextensions_main.cxx
  src/kconfig_compiler/README.dox
  src/kconfig_compiler/checkkcfg.pl
  src/kconfig_compiler/kconfig_compiler.cpp

To: kossebau, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns


D19565: kconfig_compiler: new kcfgc args HeaderExtension & SourceExtension

2019-03-06 Thread Friedrich W. H. Kossebau
kossebau created this revision.
kossebau added a reviewer: Frameworks.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
kossebau requested review of this revision.

REVISION SUMMARY
  When using kconfig_compiler generated sources in projects where the used
  file extensions for C++ files are not ".h" and/or ".cpp", the include for
  the generated header looks a bit alien to the project, as well as the
  generated source file if one looks closer at it.
  
  This code adds new optional flags HeaderExtension & SourceExtension which
  can be used to control the file extensions used for the generated files.

TEST PLAN
  All unit tests and the new test_fileextensions pass, existing projects using
  kcfg without & with the new flags build fine.

REPOSITORY
  R237 KConfig

BRANCH
  configfileextensions

REVISION DETAIL
  https://phabricator.kde.org/D19565

AFFECTED FILES
  KF5ConfigMacros.cmake
  autotests/kconfig_compiler/CMakeLists.txt
  autotests/kconfig_compiler/test_fileextensions.kcfg
  autotests/kconfig_compiler/test_fileextensions.kcfgc
  autotests/kconfig_compiler/test_fileextensions_main.cxx
  src/kconfig_compiler/README.dox
  src/kconfig_compiler/checkkcfg.pl
  src/kconfig_compiler/kconfig_compiler.cpp

To: kossebau, #frameworks
Cc: kde-frameworks-devel, michaelh, ngraham, bruns