--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAF8qwaAe28FmirLG6%3D3HRg%2BzaqHdp9WiMt2A%3Dcn5OyYNwcbfPg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAF8qwaAWNs24oR%3DO1%3Dq%2BTPbSO7_xMuyZTMF9Cu2Yc6MR%3DLQKeQ%40mail.gmail.com.
I think IWYU is the non-trivial thing, iirc no tool fixes that for us automatically.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAGFX3sGusVORc%3DjPjnkDP46wYc20SPdwacmRNkSk2CA9GORXXA%40mail.gmail.com.
Would the rewrite be more complex than a search and replace?
Suggested script:#!/bin/bash function replace { echo "Replacing $1 by $2" git grep -l "$1" | cut -f1 -d: | grep "\.h$" | xargs sed -i "s/$1/$2/g" git grep -l "$1" | cut -f1 -d: | grep "\.cc$" | xargs sed -i "s/$1/$2/g" } replace "absl::optional" "std::optional" replace "absl::nullopt" "std::nullopt" replace "absl::in_place" "std::in_place" replace "absl::in_place_t" "std::in_place_t" replace "\"third_party\/abseil-cpp\/absl\/types\/optional.h\"" "<optional>" git cl formatThis creates a 20k file change, modifying 103k lines:
https://chromium-review.googlesource.com/c/chromium/src/+/5003622If this had been a large change associated with "//base", I would have sent the patch to a top-level base OWNER with Owners-override.
Here, this is an "abseil" vs "system" header, so I would probably first ask for a LSC change approval.
If you are interested and there are no particular difficulties, I can take a look tomorrow and ask to execute this, probably split into smaller patches to avoid constant merge conflicts.Arthur @arthursonzogni
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAF3XrKpLgScy%3DFNyprnb2AFv2TB3JQr1Hd8pMtchangesd%2BOmOysWg4_A%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAzos5HTKwm%3D%3D_17x%2BA3bUMEg7Vf6NAjMc4OXEimhoEBgL85rA%40mail.gmail.com.
Would the rewrite be more complex than a search and replace?
Suggested script:#!/bin/bash function replace { echo "Replacing $1 by $2" git grep -l "$1" | cut -f1 -d: | grep "\.h$" | xargs sed -i "s/$1/$2/g" git grep -l "$1" | cut -f1 -d: | grep "\.cc$" | xargs sed -i "s/$1/$2/g" } replace "absl::optional" "std::optional" replace "absl::nullopt" "std::nullopt" replace "absl::in_place" "std::in_place" replace "absl::in_place_t" "std::in_place_t" replace "\"third_party\/abseil-cpp\/absl\/types\/optional.h\"" "<optional>" git cl formatThis creates a 20k file change, modifying 103k lines:
https://chromium-review.googlesource.com/c/chromium/src/+/5003622If this had been a large change associated with "//base", I would have sent the patch to a top-level base OWNER with Owners-override.
Here, this is an "abseil" vs "system" header, so I would probably first ask for a LSC change approval.
If you are interested and there are no particular difficulties, I can take a look tomorrow and ask to execute this, probably split into smaller patches to avoid constant merge conflicts.Arthur @arthursonzogni
On Mon, Nov 6, 2023 at 6:44 PM Daniel Cheng <dch...@chromium.org> wrote:
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAF3XrKpLgScy%3DFNyprnb2AFv2TB3JQr1Hd8pMtchangesd%2BOmOysWg4_A%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "cxx" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cxx+uns...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAAzos5HTKwm%3D%3D_17x%2BA3bUMEg7Vf6NAjMc4OXEimhoEBgL85rA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAHtyhaQS1pok8AWfOYjFCY%2BFVFY7vWx-JwYCGKnpJGkOFMMhmQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CACSHbcTn1Jo32-GJKLm4kP1DdotA5WkqEKWXPTj2ft53_wCK6A%40mail.gmail.com.
FTR, I've converted all of //ios to use std::optional instead of absl::optional.-- Sylvain
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/cxx/CAHtyhaShBtfxiRQBFTBC5XqnDNAgzKRO-nO4ac7wWpsxFMp0PA%40mail.gmail.com.
Congrats and thank you! Would be interested to hear more about how the experience of making this change went, and what could be improved for next time.
Congrats and thank you! Would be interested to hear more about how the experience of making this change went, and what could be improved for next time.Good idea! Here is a a public doc about it.