Re: Including instead of , does it upset POSIX?

2021-04-14 Thread Albert Astals Cid
El dimecres, 14 d’abril de 2021, a les 23:28:36 (CEST), Ahmad Samir va escriure:
> On 14/04/2021 22:20, Albert Astals Cid wrote:
> > El dimecres, 14 d’abril de 2021, a les 15:13:09 (CEST), Ahmad Samir va 
> > escriure:
> >> Hello :)
> >>
> >> A week or so ago I created an MR to include  instead of  
> >> in KIO[1].
> >>
> >>   From /usr/include/c++/10/cerrno:
> >> /** @file cerrno
> >>*  This is a Standard C++ Library file.  You should @c \#include this 
> >> file
> >>*  in your programs, rather than any of the @a *.h implementation files.
> >>*
> >>*  This is the C++ version of the Standard C Library header @c errno.h,
> >>*  and its contents are (mostly) the same as that header, but are all
> >>*  contained in the namespace @c std (except for names which are defined
> >>*  as macros in C).
> >>*/
> >>
> >>
> >> And then I made similar commits to a lot of the other Frameworks (not all, 
> >> since the build failed
> >> for some of them, so I left them alone).
> > 
> > I honestly didn't think this would be a problem, but you say the build of 
> > some of them failed, so i guess it is :D
> > 
> > Could you link to the particular MR's that failed?
> > 
> 
> I created one MR for KIO, once that was reviewed, I then applied similar 
> patches to the other 
> Frameworks directly.
> 
> Fortunately, it's easy to find which ones weren't changed, grep/rg; (I 
> excluded frameworks that are 
> going to be deprecated, kdelibs4support and kjs):
> 
> karchive/autotests/karchivetest.cpp:28:#include 
> karchive/src/karchive.cpp:23:#include 

I changed those and it compiles just fine here.

> 
> kdesu/src/kdesu_stub.c:31:#include  (this is C code (guessing since 
> I don't know C), so it 
> makes sense to leave that one in)

Yes, this is not C++

> kholidays/src/parsers/plan2/holidayscannerplan.cpp:1313:# include 
> kholidays/src/parsers/plan2/holidayscannerplan.lpp:17:# include 

This works too

> kinit/src/kdeinit/kinit.cpp:24:#include 
> kinit/src/kdeinit/kinit_mac.mm:25:#include 
> kinit/src/kdeinit/kinit_win.cpp:15:#include 
> kinit/src/klauncher/klauncher.cpp:21:#include 
> kinit/src/start_kdeinit/start_kdeinit.c:12:#include 
> kinit/src/wrapper.cpp:23:#include 

Same (obviously excluding start_kdeinit.c)

> 
> ktexteditor/src/buffer/katesecuretextbuffer.cpp:12:#include 
> ktexteditor/src/buffer/katetextbuffer.cpp:20:#include 

Same.

Maybe your problem was that you tried to change C files?

Cheers,
  Albert

 
> > Cheers,
> >Albert
> > 
> 
> 
> 






Re: Including instead of , does it upset POSIX?

2021-04-14 Thread Albert Astals Cid
El dimecres, 14 d’abril de 2021, a les 15:13:09 (CEST), Ahmad Samir va escriure:
> Hello :)
> 
> A week or so ago I created an MR to include  instead of  in 
> KIO[1].
> 
>  From /usr/include/c++/10/cerrno:
> /** @file cerrno
>   *  This is a Standard C++ Library file.  You should @c \#include this file
>   *  in your programs, rather than any of the @a *.h implementation files.
>   *
>   *  This is the C++ version of the Standard C Library header @c errno.h,
>   *  and its contents are (mostly) the same as that header, but are all
>   *  contained in the namespace @c std (except for names which are defined
>   *  as macros in C).
>   */
> 
> 
> And then I made similar commits to a lot of the other Frameworks (not all, 
> since the build failed 
> for some of them, so I left them alone).

I honestly didn't think this would be a problem, but you say the build of some 
of them failed, so i guess it is :D

Could you link to the particular MR's that failed?

Cheers,
  Albert

> 
> Harald Sitter asked me to raise the point here, basically he's wondering 
> whether this change might 
> cause issues, not being 100% POSIX compliant...etc; I'll quote him because he 
> explained it much 
> better than I would:
> 
>  ahmadsamir: 
> https://invent.kde.org/frameworks/kcrash/-/commit/7a20755723dc1527edb7ed5c3fdcccdbcf7fa768
>  was this 
> ever discussed anywhere? cause there are others like this and my thinking up 
> until now was that 
> using the C .h is more appropriate since we use them for POSIX APIs and from 
> that POV the POSIX 
> specified header is errno.h
> 
> [...]
> 
>  might be worth raising for discussion on the mailing list. with 
> c++>=14 there's a whole 
> mountain of "deprecated" headers OTOH I also recall reading that the c++ 
> standard doesn't guarantee 
> compatibility
>  which may or may not be a concern when we use stuff specifically 
> with the expectation that 
> they will behave as documented from a POSIX or linux POV (such as signal 
> safety in kcrash)
> 
> 
> [1] https://invent.kde.org/frameworks/kio/-/merge_requests/397








Re: Including instead of , does it upset POSIX?

2021-04-14 Thread Harald Sitter
FWIW this goes beyond errno. See clang-tidy's
modernize-deprecated-headers for a comprehensive list

HS


Re: Including instead of , does it upset POSIX?

2021-04-14 Thread David Redondo
Looking into the C++ 17 working draft (http://open-std.org/JTC1/SC22/WG21/
docs/papers/2017/n4659.pdf)  is actually the same as the POSIX header.

In section 22.4 (page 517)
>The contents of the headerare the same as the POSIX header, 
except thaterrnoshallbe defined as a macro. [Note:The intent is to remain in 
close alignment with the POSIX standard.— endnote] A separateerrnovalue shall 
be provided for each thread.

And at the bottom of 22.4.1
>The meaning of the macros in this header is defined by the POSIX standard.

Regards,
David

P.S. In the latest working draft this seems now to be section 19.4 instead




Including instead of , does it upset POSIX?

2021-04-14 Thread Ahmad Samir

Hello :)

A week or so ago I created an MR to include  instead of  in 
KIO[1].

From /usr/include/c++/10/cerrno:
/** @file cerrno
 *  This is a Standard C++ Library file.  You should @c \#include this file
 *  in your programs, rather than any of the @a *.h implementation files.
 *
 *  This is the C++ version of the Standard C Library header @c errno.h,
 *  and its contents are (mostly) the same as that header, but are all
 *  contained in the namespace @c std (except for names which are defined
 *  as macros in C).
 */


And then I made similar commits to a lot of the other Frameworks (not all, since the build failed 
for some of them, so I left them alone).


Harald Sitter asked me to raise the point here, basically he's wondering whether this change might 
cause issues, not being 100% POSIX compliant...etc; I'll quote him because he explained it much 
better than I would:


 ahmadsamir: 
https://invent.kde.org/frameworks/kcrash/-/commit/7a20755723dc1527edb7ed5c3fdcccdbcf7fa768 was this 
ever discussed anywhere? cause there are others like this and my thinking up until now was that 
using the C .h is more appropriate since we use them for POSIX APIs and from that POV the POSIX 
specified header is errno.h


[...]

 might be worth raising for discussion on the mailing list. with c++>=14 there's a whole 
mountain of "deprecated" headers OTOH I also recall reading that the c++ standard doesn't guarantee 
compatibility
 which may or may not be a concern when we use stuff specifically with the expectation that 
they will behave as documented from a POSIX or linux POV (such as signal safety in kcrash)



[1] https://invent.kde.org/frameworks/kio/-/merge_requests/397
--
Ahmad Samir


KDE CI: Frameworks » kio » kf5-qt5 SUSEQt5.15 - Build # 702 - Unstable!

2021-04-14 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Frameworks/job/kio/job/kf5-qt5%20SUSEQt5.15/702/
 Project:
kf5-qt5 SUSEQt5.15
 Date of build:
Wed, 14 Apr 2021 08:56:46 +
 Build duration:
45 min and counting
   BUILD ARTIFACTS
  acc/KF5KIO-5.82.0.xmllogs/KF5KIO/5.82.0/log.txt
   JUnit Tests
  Name: (root) Failed: 0 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 1 test(s)Name: projectroot Failed: 1 test(s), Passed: 56 test(s), Skipped: 0 test(s), Total: 57 test(s)Failed: projectroot.autotests.kiowidgets_kdirlistertestName: projectroot.autotests Failed: 0 test(s), Passed: 6 test(s), Skipped: 0 test(s), Total: 6 test(s)Name: projectroot.src.ioslaves.trash Failed: 0 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 1 test(s)Name: projectroot.src.kpasswdserver Failed: 0 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 1 test(s)
   Cobertura Report
  
   Project Coverage Summary
  
   Name
  PackagesFilesClassesLinesConditionalsCobertura Coverage Report68%
(25/37)68%
(291/428)68%
(291/428)57%
(37083/65257)41%
(19263/47051)Coverage Breakdown by Package
Name
   FilesClassesLinesConditionalsautotests95%
(59/62)95%
(59/62)91%
(10568/11628)45%
(5404/12132)autotests.http100%
(5/5)100%
(5/5)99%
(503/504)65%
(88/136)autotests.kcookiejar100%
(1/1)100%
(1/1)93%
(165/177)70%
(49/70)src100%
(1/1)100%
(1/1)89%
(8/9)71%
(10/14)src.core89%
(108/121)89%
(108/121)61%
(8997/14676)52%
(4532/8681)src.core.kssl100%
(1/1)100%
(1/1)40%
(35/88)50%
(3/6)src.filewidgets79%
(30/38)79%
(30/38)58%
(5136/8808)46%
(2328/5070)src.gui100%
(8/8)100%
(8/8)82%
(699/856)63%
(347/554)src.gui.systemd50%
(2/4)50%
(2/4)4%
(7/173)1%
(1/104)src.ioslaves.file100%
(7/7)100%
(7/7)54%
(739/1370)39%
(441/1128)src.ioslaves.file.kauth0%
(0/2)0%
(0/2)0%
(0/179)0%
(0/89)src.ioslaves.ftp100%
(2/2)100%
(2/2)47%
(647/1363)37%
(531/1420)src.ioslaves.help0%
(0/5)0%
(0/5)0%
(0/248)0%
(0/148)src.ioslaves.http88%
(7/8)88%
(7/8)42%
(1784/4258)36%
(1319/3644)src.ioslaves.http.kcookiejar40%
(2/5)40%
(2/5)47%
(625/1323)56%
(578/1037)src.ioslaves.remote100%
(2/2)100%

KDE CI: Frameworks » kguiaddons » kf5-qt5 SUSEQt5.15 - Build # 74 - Still Unstable!

2021-04-14 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Frameworks/job/kguiaddons/job/kf5-qt5%20SUSEQt5.15/74/
 Project:
kf5-qt5 SUSEQt5.15
 Date of build:
Wed, 14 Apr 2021 09:10:50 +
 Build duration:
19 min and counting
   BUILD ARTIFACTS
  acc/KF5GuiAddons-5.82.0.xmllogs/KF5GuiAddons/5.82.0/log.txt
   JUnit Tests
  Name: (root) Failed: 0 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 1 test(s)Name: projectroot Failed: 1 test(s), Passed: 4 test(s), Skipped: 0 test(s), Total: 5 test(s)Failed: projectroot.autotests.kwordwraptest
   Cobertura Report
  
   Project Coverage Summary
  
   Name
  PackagesFilesClassesLinesConditionalsCobertura Coverage Report71%
(5/7)55%
(16/29)55%
(16/29)47%
(753/1607)39%
(365/941)Coverage Breakdown by Package
Name
   FilesClassesLinesConditionalsautotests100%
(6/6)100%
(6/6)95%
(330/348)56%
(151/268)src.colors60%
(3/5)60%
(3/5)39%
(119/305)35%
(47/134)src.fonts0%
(0/1)0%
(0/1)0%
(0/38)0%
(0/26)src.recorder75%
(3/4)75%
(3/4)63%
(127/203)56%
(71/127)src.text50%
(1/2)50%
(1/2)48%
(96/199)46%
(75/164)src.util43%
(3/7)43%
(3/7)21%
(81/386)11%
(21/188)tests0%
(0/4)0%
(0/4)0%
(0/128)0%
(0/34)

KDE CI: Frameworks » kio » kf5-qt5 FreeBSDQt5.15 - Build # 700 - Unstable!

2021-04-14 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Frameworks/job/kio/job/kf5-qt5%20FreeBSDQt5.15/700/
 Project:
kf5-qt5 FreeBSDQt5.15
 Date of build:
Wed, 14 Apr 2021 08:56:47 +
 Build duration:
15 min and counting
   JUnit Tests
  Name: projectroot Failed: 3 test(s), Passed: 53 test(s), Skipped: 0 test(s), Total: 56 test(s)Failed: projectroot.autotests.applicationlauncherjob_forkingtestFailed: projectroot.autotests.kiogui_openurljobtestFailed: projectroot.autotests.kiowidgets_kdirlistertestName: projectroot.autotests Failed: 0 test(s), Passed: 6 test(s), Skipped: 0 test(s), Total: 6 test(s)Name: projectroot.src.ioslaves.trash Failed: 0 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 1 test(s)Name: projectroot.src.kpasswdserver Failed: 0 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 1 test(s)

KDE CI: Frameworks » kguiaddons » kf5-qt5 SUSEQt5.15 - Build # 73 - Unstable!

2021-04-14 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Frameworks/job/kguiaddons/job/kf5-qt5%20SUSEQt5.15/73/
 Project:
kf5-qt5 SUSEQt5.15
 Date of build:
Wed, 14 Apr 2021 08:41:26 +
 Build duration:
29 min and counting
   BUILD ARTIFACTS
  acc/KF5GuiAddons-5.82.0.xmllogs/KF5GuiAddons/5.82.0/log.txt
   JUnit Tests
  Name: (root) Failed: 0 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 1 test(s)Name: projectroot Failed: 1 test(s), Passed: 4 test(s), Skipped: 0 test(s), Total: 5 test(s)Failed: projectroot.autotests.kwordwraptest
   Cobertura Report
  
   Project Coverage Summary
  
   Name
  PackagesFilesClassesLinesConditionalsCobertura Coverage Report71%
(5/7)55%
(16/29)55%
(16/29)47%
(753/1607)39%
(365/941)Coverage Breakdown by Package
Name
   FilesClassesLinesConditionalsautotests100%
(6/6)100%
(6/6)95%
(330/348)56%
(151/268)src.colors60%
(3/5)60%
(3/5)39%
(119/305)35%
(47/134)src.fonts0%
(0/1)0%
(0/1)0%
(0/38)0%
(0/26)src.recorder75%
(3/4)75%
(3/4)63%
(127/203)56%
(71/127)src.text50%
(1/2)50%
(1/2)48%
(96/199)46%
(75/164)src.util43%
(3/7)43%
(3/7)21%
(81/386)11%
(21/188)tests0%
(0/4)0%
(0/4)0%
(0/128)0%
(0/34)

D29371: KMainWindow: remove doc paragraph about KGlobal::ref usage

2021-04-14 Thread David Faure
dfaure abandoned this revision.
dfaure added a comment.


  This has been done meanwhile.

REPOSITORY
  R263 KXmlGui

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

To: dfaure, #frameworks, davidedmundson, dvratil
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29371: KMainWindow: remove doc paragraph about KGlobal::ref usage

2021-04-14 Thread David Faure
dfaure commandeered this revision.
dfaure edited reviewers, added: dvratil; removed: dfaure.
This revision is now accepted and ready to land.

REPOSITORY
  R263 KXmlGui

BRANCH
  master

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

To: dfaure, #frameworks, davidedmundson, dvratil
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


KDE CI: Frameworks » kguiaddons » kf5-qt5 WindowsMSVCQt5.15 - Build # 46 - Unstable!

2021-04-14 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Frameworks/job/kguiaddons/job/kf5-qt5%20WindowsMSVCQt5.15/46/
 Project:
kf5-qt5 WindowsMSVCQt5.15
 Date of build:
Wed, 14 Apr 2021 08:41:26 +
 Build duration:
1 min 47 sec and counting
   JUnit Tests
  Name: projectroot Failed: 1 test(s), Passed: 4 test(s), Skipped: 0 test(s), Total: 5 test(s)Failed: projectroot.autotests.kwordwraptest

KDE CI: Frameworks » kguiaddons » kf5-qt5 FreeBSDQt5.15 - Build # 66 - Unstable!

2021-04-14 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Frameworks/job/kguiaddons/job/kf5-qt5%20FreeBSDQt5.15/66/
 Project:
kf5-qt5 FreeBSDQt5.15
 Date of build:
Wed, 14 Apr 2021 08:41:26 +
 Build duration:
51 sec and counting
   JUnit Tests
  Name: projectroot Failed: 1 test(s), Passed: 4 test(s), Skipped: 0 test(s), Total: 5 test(s)Failed: projectroot.autotests.kwordwraptest

KDE CI: Frameworks » kirigami » kf5-qt5 WindowsMSVCQt5.15 - Build # 301 - Fixed!

2021-04-14 Thread CI System
BUILD SUCCESS
 Build URL
https://build.kde.org/job/Frameworks/job/kirigami/job/kf5-qt5%20WindowsMSVCQt5.15/301/
 Project:
kf5-qt5 WindowsMSVCQt5.15
 Date of build:
Wed, 14 Apr 2021 07:12:10 +
 Build duration:
24 min and counting
   JUnit Tests
  Name: projectrootC_.CI.Job_Build Failed: 0 test(s), Passed: 12 test(s), Skipped: 0 test(s), Total: 12 test(s)

KDE CI: Frameworks » plasma-framework » kf5-qt5 WindowsMSVCQt5.15 - Build # 249 - Still unstable!

2021-04-14 Thread CI System
BUILD UNSTABLE
 Build URL
https://build.kde.org/job/Frameworks/job/plasma-framework/job/kf5-qt5%20WindowsMSVCQt5.15/249/
 Project:
kf5-qt5 WindowsMSVCQt5.15
 Date of build:
Wed, 14 Apr 2021 07:11:19 +
 Build duration:
20 min and counting
   JUnit Tests
  Name: projectroot Failed: 4 test(s), Passed: 5 test(s), Skipped: 0 test(s), Total: 9 test(s)Failed: projectroot.autotests.coronatestFailed: projectroot.autotests.plasma_dialogstatetestFailed: projectroot.autotests.plasma_iconitemtestFailed: projectroot.autotests.plasma_themetest

KDE CI: Frameworks » kcrash » kf5-qt5 WindowsMSVCQt5.15 - Build # 45 - Fixed!

2021-04-14 Thread CI System
BUILD SUCCESS
 Build URL
https://build.kde.org/job/Frameworks/job/kcrash/job/kf5-qt5%20WindowsMSVCQt5.15/45/
 Project:
kf5-qt5 WindowsMSVCQt5.15
 Date of build:
Wed, 14 Apr 2021 07:11:11 +
 Build duration:
1 min 36 sec and counting
   JUnit Tests
  Name: projectroot Failed: 0 test(s), Passed: 1 test(s), Skipped: 0 test(s), Total: 1 test(s)