Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint: Lint for std::for_each_n #15093

Merged
merged 2 commits into from
Feb 23, 2021
Merged

Conversation

KBaichoo
Copy link
Contributor

Signed-off-by: Kevin Baichoo kbaichoo@google.com

For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md

Commit Message: Lint: Lint for std::for_each_n
Additional Description: It's insufficiently supported in C++17. See #14923
Risk Level: low
Testing: unit test
Docs Changes: NA
Release Notes: NA
Platform Specific Features: NA

Signed-off-by: Kevin Baichoo <kbaichoo@google.com>
Copy link
Contributor

@antoniovicente antoniovicente left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing the compile issues introduced by #14923

Change looks good if we decide to avoid std::for_each_n for the time being.

source/common/http/http2/codec_impl.cc Show resolved Hide resolved
@antoniovicente
Copy link
Contributor

cc @jrajahalme

Signed-off-by: Kevin Baichoo <kbaichoo@google.com>
@lizan
Copy link
Member

lizan commented Feb 18, 2021

I'm generally not in favor of this kind of limitation because of it is not well supported in older version of stdlib (libstdc++ <= 8). We can bump build requirement if it doesn't cause a lot of churn.

@jrajahalme
Copy link
Contributor

@lizan I agree that limiting use of a standardized C++17 feature is not ideal, but for_each_n is available only on the newest libc++. However, I'd like to retain compatibility with GCC on Ubuntu 18.04 for now. GCC due to working cross-compilation toolchain we have for arm64 (I have no idea how to do that on clang), and Ubuntu 18.04 for ability to run the same Envoy binary in Ubuntu 18.04 and 20.04 based images. Unfortunately for_each_n does not work on GCC 7 that is the system compiler for Ubuntu 18.04.

@jrajahalme
Copy link
Contributor

To clarify, bumping build requirements is a potential concern for projects building on Envoy, not just Envoy itself. There is already some churn due to Envoy CI apparently using only a bleeding edge clang setup :-)

rgs1 pushed a commit to rgs1/envoy that referenced this pull request Feb 23, 2021
This reverts commit 3f740bc.

Because it breaks builds on RHEL 8 and Ubuntu 18. See:

envoyproxy#15093

Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mattklein123 mattklein123 merged commit a50b1c0 into envoyproxy:main Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants