Bug 237178

Summary: Begin transition from WTF::Span to std::span
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, alecflett, andresg_22, apinheiro, beidson, benjamin, calvaris, cdumez, cfleizach, cgarcia, changseok, cmarcelo, ddkilzer, dino, dmazzoni, don.olmstead, eric.carlson, esprehn+autocc, ews-watchlist, fmalita, glenn, gyuyoung.kim, hta, japhet, jcraig, jdiggs, jer.noble, jsbell, kondapallykalyan, mifenton, pdr, philipj, ross.kirsling, sabouhallawa, samuel_white, schenney, sergio, tommyw, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 253377    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch with explicit conversions
none
Patch ews-feeder: commit-queue-

Description Alex Christensen 2022-02-24 19:55:48 PST
Begin transition from WTF::Span to std::span
Comment 1 Alex Christensen 2022-02-24 19:59:17 PST
Created attachment 453169 [details]
Patch
Comment 2 Alex Christensen 2022-02-25 09:08:38 PST
Comment on attachment 453169 [details]
Patch

Apparently Visual Studio 2019's C++20 implementation doesn't have the span header.
Comment 3 Radar WebKit Bug Importer 2022-03-03 19:56:19 PST
<rdar://problem/89792762>
Comment 4 Alex Christensen 2022-04-22 11:40:26 PDT
Created attachment 458160 [details]
Patch
Comment 5 Ross Kirsling 2022-04-28 15:48:32 PDT
Created attachment 458551 [details]
Patch with explicit conversions

Here's an updated patch that builds on Windows.
Comment 6 Alex Christensen 2022-04-28 17:39:05 PDT
Created attachment 458558 [details]
Patch
Comment 7 Alex Christensen 2022-04-28 22:25:40 PDT
Comment on attachment 458558 [details]
Patch

Looks like std::span requires GCC 10.  Bummer.
Comment 8 Don Olmstead 2022-04-29 10:20:15 PDT
(In reply to Alex Christensen from comment #7)
> Comment on attachment 458558 [details]
> Patch
> 
> Looks like std::span requires GCC 10.  Bummer.

Can you do a check for it in CMake for std::span and if its there use it otherwise use our implementation of std::span?
Comment 9 Alex Christensen 2022-05-02 09:08:57 PDT
I guess we will have to wait another year for this, but my goal is to remove WTF::Span.
Comment 10 David Kilzer (:ddkilzer) 2023-03-05 09:44:45 PST
Bug 253377 started using std::span for all Apple ports (including any port compiling with clang or MSVC, plus ports that compile with GCC that pass a compile test in CMake) behind a WTF::makeSpan() adapter.

Once all ports support std::span, the WTF::makeSpan() adapter will be removed.
Comment 11 Ross Kirsling 2023-03-05 20:16:14 PST
Just for the record, it's not just GCC; PS port needed a fix too:
https://github.com/WebKit/WebKit/commit/f105d6117bd798d28c016d2f2a639e693afbeefa
Comment 12 Alex Christensen 2023-05-03 13:42:21 PDT
Pull request: https://github.com/WebKit/WebKit/pull/13414
Comment 13 EWS 2023-05-11 20:20:14 PDT
Committed 263998@main (0fa955e615eb): <https://commits.webkit.org/263998@main>

Reviewed commits have been landed. Closing PR #13414 and removing active labels.