Bug 282522

Summary: devel/folly: remove libc++ 19 workaround
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Dimitry Andric <dim>
Status: Closed FIXED    
Severity: Affects Some People CC: yuri
Priority: --- Flags: yuri: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 280562    
Attachments:
Description Flags
devel/folly: remove libc++ 19 workaround none

Description Dimitry Andric freebsd_committer freebsd_triage 2024-11-03 16:18:38 UTC
For bug 281499 we added a workaround for the `peekView()` method
returning a `std::basic_string<uint8_t>`, which is no longer supported
in libc++ 19 and later.

However, upstream folly has consolidated the `peek` and `peekView`
methods into just `peek`, and is now returning a `std::span<uint8_t
const>` instead [1], so the workaround is no longer needed.

Remove it, and bump PORTREVISION so dependent ports get rebuilt. In
particular, I was looking at a build failure of net/mvfst which was
occurring in the folly headers, due to the `peek()` method being
unavailable.

[1] https://github.com/facebook/folly/commit/3f21ed6dd97f36ca6653b16d5b086b8b8a7efebc
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-11-03 16:19:50 UTC
Created attachment 254909 [details]
devel/folly: remove libc++ 19 workaround
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2024-11-03 18:17:28 UTC
Approved, please commit it.
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-11-03 20:54:09 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=efc339d7d34167976859cfcb2791abec5756dffa

commit efc339d7d34167976859cfcb2791abec5756dffa
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-11-03 16:18:52 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-11-03 20:53:19 +0000

    devel/folly: remove libc++ 19 workaround

    For bug 281499 we added a workaround for the `peekView()` method
    returning a `std::basic_string<uint8_t>`, which is no longer supported
    in libc++ 19 and later.

    However, upstream folly has consolidated the `peek` and `peekView`
    methods into just `peek`, and is now returning a `std::span<uint8_t
    const>` instead [1], so the workaround is no longer needed.

    Remove it, and bump PORTREVISION so dependent ports get rebuilt. In
    particular, I was looking at a build failure of net/mvfst which was
    occurring in the folly headers, due to the `peek()` method being
    unavailable.

    [1] https://github.com/facebook/folly/commit/3f21ed6dd97f36ca6653b16d5b086b8b8a7efebc

    PR:             282522
    Approved by:    yuri (maintainer)
    MFH:            2024Q4

 devel/folly/Makefile                             |  1 +
 devel/folly/files/patch-folly_io_Cursor.h (gone) | 18 ------------------
 2 files changed, 1 insertion(+), 18 deletions(-)
Comment 4 Dimitry Andric freebsd_committer freebsd_triage 2024-11-03 21:07:09 UTC
I haven't MFH'd this commit, since the version of devel/folly in 2024Q4 is still behind. Do you mind if I MFH the more recent updates? I believe these are ports 45245542ab4631e2507e0f3ef5f68fd5d0942e3e and ports 578cf95f1c9ac336558e4c2553051789f682c680.
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2024-11-03 21:12:21 UTC
(In reply to Dimitry Andric from comment #4)

Hi Dimitry,

Yes, please MFH, but please make sure that dependencies would build with this new version of folly.


Thanks,
Yuri
Comment 6 Dimitry Andric freebsd_committer freebsd_triage 2024-11-07 18:26:10 UTC
(In reply to Yuri Victorovich from comment #5)
Hmm, I generated the list of dependents:

fbthrift-2024.09.30.00_1 /usr/ports/devel/fbthrift
folly-2024.09.30.00_1 /usr/ports/devel/folly
fb303-2024.09.30.00_1 /usr/ports/net/fb303
mvfst-2024.09.30.00_1 /usr/ports/net/mvfst
wangle-2024.09.30.00_1 /usr/ports/net/wangle
fizz-2024.09.30.00_1 /usr/ports/security/fizz
proxygen-2024.09.30.00_1 /usr/ports/www/proxygen

These all seem to be from the same releases from Facebook? I guess those should all be updated simultaneously then.
Comment 7 Dimitry Andric freebsd_committer freebsd_triage 2024-11-15 12:51:53 UTC
Let's leave folly in the 2024Q4 branch as it is, since it will be just 1.5 month for the 2024Q1 branch to appear.