Bug 190791

Summary: Some internal projects include wtf headers and build with C++11
Product: WebKit Reporter: Keith Miller <keith_miller>
Component: New BugsAssignee: Keith Miller <keith_miller>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, ap, benjamin, cdumez, cmarcelo, commit-queue, dbates, ews-watchlist, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Keith Miller
Reported 2018-10-22 05:54:24 PDT
Some internal projects include wtf headers and build with C++11
Attachments
Patch (1.62 KB, patch)
2018-10-22 05:56 PDT, Keith Miller
no flags
Patch (1.62 KB, patch)
2018-10-22 13:06 PDT, Keith Miller
no flags
Patch (1.70 KB, patch)
2018-10-24 02:10 PDT, Keith Miller
no flags
Patch (1.68 KB, patch)
2018-10-24 15:30 PDT, Keith Miller
no flags
Patch (1.71 KB, patch)
2018-10-25 00:30 PDT, Keith Miller
no flags
Keith Miller
Comment 1 2018-10-22 05:56:25 PDT
Alex Christensen
Comment 2 2018-10-22 07:34:21 PDT
Comment on attachment 352887 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352887&action=review > Source/WTF/ChangeLog:3 > + Some internal projects include wtf headers and build with C++11 Those projects should probably update *and* stop including wtf headers.
Keith Miller
Comment 3 2018-10-22 13:06:06 PDT
Keith Miller
Comment 4 2018-10-22 13:07:52 PDT
Comment on attachment 352887 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352887&action=review >> Source/WTF/ChangeLog:3 >> + Some internal projects include wtf headers and build with C++11 > > Those projects should probably update *and* stop including wtf headers. Ugh, I agree... I'm working on it internally <rdar://problem/45395767> but for now we need to make sure B&I doesn't roll us back again.
Alexey Proskuryakov
Comment 5 2018-10-22 15:00:56 PDT
Comment on attachment 352903 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352903&action=review > Source/WTF/wtf/MathExtras.h:215 > template <typename T> constexpr unsigned getLSBSet(T value) Downstream projects don't need getLSBSet. Would this more straightforward fix work? // FIXME: Remove the #if check once downstream projects stop including WTF, and/or they upgrade to C++14 (rdar://........) #if WTF_CPP_STD_VER >= 14 template <typename T> constexpr unsigned getLSBSet(T value) { ... } #endif
Keith Miller
Comment 6 2018-10-22 15:06:38 PDT
Comment on attachment 352903 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=352903&action=review >> Source/WTF/wtf/MathExtras.h:215 >> template <typename T> constexpr unsigned getLSBSet(T value) > > Downstream projects don't need getLSBSet. Would this more straightforward fix work? > > // FIXME: Remove the #if check once downstream projects stop including WTF, and/or they upgrade to C++14 (rdar://........) > #if WTF_CPP_STD_VER >= 14 > template <typename T> constexpr unsigned getLSBSet(T value) > { > ... > } > #endif In theory but there's always the risk that some other header in WebKit uses getLSBSet and you'd get an undefined identifier build error.
Alexey Proskuryakov
Comment 7 2018-10-22 16:41:09 PDT
Sure, but in theory some other header in WebKit could be using it and expecting it to be constexpr.
Keith Miller
Comment 8 2018-10-22 21:47:01 PDT
(In reply to Alexey Proskuryakov from comment #7) > Sure, but in theory some other header in WebKit could be using it and > expecting it to be constexpr. True, but then neither solution would work. This is mostly just a stopgap until projects including WTF headers either stop or switch to C++14.
Keith Miller
Comment 9 2018-10-24 02:10:04 PDT
Alexey Proskuryakov
Comment 10 2018-10-24 09:23:30 PDT
The latest patch breaks the build. Have you considered adding a canary file to WTF that builds these headers with C++11? That way we can catch build failures earlier.
Keith Miller
Comment 11 2018-10-24 15:30:48 PDT
Keith Miller
Comment 12 2018-10-25 00:30:43 PDT
WebKit Commit Bot
Comment 13 2018-10-26 01:25:51 PDT
Comment on attachment 353078 [details] Patch Clearing flags on attachment: 353078 Committed r237448: <https://trac.webkit.org/changeset/237448>
WebKit Commit Bot
Comment 14 2018-10-26 01:25:53 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 15 2018-10-26 01:26:38 PDT
Note You need to log in before you can comment on or make changes to this bug.