Bug 173582 - [WTF] Rebaseline std::optional
Summary: [WTF] Rebaseline std::optional
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-19 22:03 PDT by Yusuke Suzuki
Modified: 2017-06-23 10:37 PDT (History)
9 users (show)

See Also:


Attachments
Patch (2.25 KB, patch)
2017-06-19 22:04 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2017-06-19 22:03:51 PDT
[WTF] Rebaseline std::optional
Comment 1 Yusuke Suzuki 2017-06-19 22:04:48 PDT
Created attachment 313363 [details]
Patch
Comment 2 Build Bot 2017-06-19 22:06:04 PDT
Attachment 313363 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/Optional.h:539:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WTF/wtf/Optional.h:653:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WTF/wtf/Optional.h:654:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WTF/wtf/Optional.h:752:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WTF/wtf/Optional.h:754:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WTF/wtf/Optional.h:762:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
ERROR: Source/WTF/wtf/Optional.h:763:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 7 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 JF Bastien 2017-06-19 22:07:25 PDT
Comment on attachment 313363 [details]
Patch

r=me
Comment 4 Yusuke Suzuki 2017-06-19 22:08:35 PDT
Comment on attachment 313363 [details]
Patch

Thanks!
Comment 5 WebKit Commit Bot 2017-06-20 00:39:24 PDT
Comment on attachment 313363 [details]
Patch

Clearing flags on attachment: 313363

Committed r218557: <http://trac.webkit.org/changeset/218557>
Comment 6 WebKit Commit Bot 2017-06-20 00:39:26 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Michael Catanzaro 2017-06-23 05:27:14 PDT
So it's 2017, why do we still need our own std::optional? Is it for GCC 4.9?
Comment 8 Yusuke Suzuki 2017-06-23 05:31:53 PDT
(In reply to Michael Catanzaro from comment #7)
> So it's 2017, why do we still need our own std::optional? Is it for GCC 4.9?

We are now using C++14, which does not include std::optional.
I think we can start discussion about upgrading this baseline.
But, at that time, we need to rely on newer GCC.

I think the current GCC baseline in WebKit is 4.9. Can we upgrade this?
If we can do that, we can start considering adopting C++17!
Comment 9 Yusuke Suzuki 2017-06-23 05:36:32 PDT
(In reply to Yusuke Suzuki from comment #8)
> (In reply to Michael Catanzaro from comment #7)
> > So it's 2017, why do we still need our own std::optional? Is it for GCC 4.9?
> 
> We are now using C++14, which does not include std::optional.
> I think we can start discussion about upgrading this baseline.
> But, at that time, we need to rely on newer GCC.
> 
> I think the current GCC baseline in WebKit is 4.9. Can we upgrade this?
> If we can do that, we can start considering adopting C++17!

But, at that time, we also need to care about MSVC too.
Comment 10 JF Bastien 2017-06-23 09:32:22 PDT
(In reply to Yusuke Suzuki from comment #9)
> (In reply to Yusuke Suzuki from comment #8)
> > (In reply to Michael Catanzaro from comment #7)
> > > So it's 2017, why do we still need our own std::optional? Is it for GCC 4.9?
> > 
> > We are now using C++14, which does not include std::optional.
> > I think we can start discussion about upgrading this baseline.
> > But, at that time, we need to rely on newer GCC.
> > 
> > I think the current GCC baseline in WebKit is 4.9. Can we upgrade this?
> > If we can do that, we can start considering adopting C++17!
> 
> But, at that time, we also need to care about MSVC too.

Recent MSVCs are really good at being up to date. I know their PM and engineers as well, they're very happy to fix shortcomings (but that takes a while to get back to our toolchains!).

I was going to propose we adopt a subset of C++17 after it's been ratified at the next meeting, which is at the start of July. Of course we need to make sure that subset is available in all compilers! e.g. the parallel STL isn't available anywhere.
Comment 11 Yusuke Suzuki 2017-06-23 10:37:12 PDT
(In reply to JF Bastien from comment #10)
> (In reply to Yusuke Suzuki from comment #9)
> > (In reply to Yusuke Suzuki from comment #8)
> > > (In reply to Michael Catanzaro from comment #7)
> > > > So it's 2017, why do we still need our own std::optional? Is it for GCC 4.9?
> > > 
> > > We are now using C++14, which does not include std::optional.
> > > I think we can start discussion about upgrading this baseline.
> > > But, at that time, we need to rely on newer GCC.
> > > 
> > > I think the current GCC baseline in WebKit is 4.9. Can we upgrade this?
> > > If we can do that, we can start considering adopting C++17!
> > 
> > But, at that time, we also need to care about MSVC too.
> 
> Recent MSVCs are really good at being up to date. I know their PM and
> engineers as well, they're very happy to fix shortcomings (but that takes a
> while to get back to our toolchains!).

That sounds super nice!

> 
> I was going to propose we adopt a subset of C++17 after it's been ratified
> at the next meeting, which is at the start of July. Of course we need to
> make sure that subset is available in all compilers! e.g. the parallel STL
> isn't available anywhere.

It is very nice. After that, I think we can start updating GCC version.
Posted. https://lists.webkit.org/pipermail/webkit-dev/2017-June/029220.html