-
Notifications
You must be signed in to change notification settings - Fork 817
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
Clang-formatted the C++ SDK files. #716
Conversation
Also updated the CONTRIBUTING.md file to reflect a new rule about following the Google Style guide.
/assign @dsazonoff @markmandel |
Did you try |
That gives me a different error: $ cd sdk/cpp
$ make build
...
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
CMake Error at CMakeLists.txt:177 (install):
install TARGETS given target "address_sorting" which does not exist in this
directory.
CMake Error at CMakeLists.txt:195 (install):
install TARGETS given target "address_sorting" which does not exist in this
directory.
-- Configuring incomplete, errors occurred!
See also "/home/jgm/github/devjgm/agones/sdks/cpp/.build/CMakeFiles/CMakeOutput.log".
See also "/home/jgm/github/devjgm/agones/sdks/cpp/.build/CMakeFiles/CMakeError.log".
Makefile:26: recipe for target 'build' failed
make: *** [build] Error 1 So, I suspect that the C++ build is currently broken and might not be running in the CI? Or possibly it's just that I don't know how to run it. Note: the [1]: My diff was: diff --git a/sdks/cpp/CMakeLists.txt b/sdks/cpp/CMakeLists.txt
index 3fe83e63..f3b0d29a 100644
--- a/sdks/cpp/CMakeLists.txt
+++ b/sdks/cpp/CMakeLists.txt
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-cmake_minimum_required (VERSION 3.13.0)
+cmake_minimum_required (VERSION 3.10.0)
project(agones VERSION 0.9.0 HOMEPAGE_URL https://github.com/GoogleCloudPlatform/agones LANGUAGES C CXX) |
Build Failed 😱 Build Id: a7d2de66-4883-45e8-800b-003bcb91f62f To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
@devjgm what is your current build configuration (OS, cmake version, is gRPC pre-installed)? I'll take a look, because on Mac / Win everything is OK. |
@dsazonoff Also, should I commit this PR even though there appears to be a build failure (though I think it's unrelated). |
I think yes, we can merge. @markmandel please restart tests, I don't understand the reason why they failed. And approve/reject this pull request. |
If we are going to enforce Clang formatting, can we put the tooling in the C++ SDK image, and then create a |
Build Succeeded 👏 Build Id: 5c5a512a-8364-4aa4-aeef-d52075fd6db2 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Build Succeeded 👏 Build Id: aa0e7055-5cbc-4015-b761-cbb56a6a60ba The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
I think that it should be as a test during a build, as was originally proposed. Because different developers uses different IDE's, and a lot for them already supports clang formatting. For example, most of time I use CLion, and it supports formatting on the fly, without need of running any build steps. |
Are we happy to merge this as is? Happy to approve, but deferring to people with more C++ experience. |
fyi, I'm trying to merge this. but every time I try to, the branch is out of date, so I update the branch, then the tests need to re-run, I wait for those, then the branch needs to be updated again :-) Trying again. I'll work one of these times. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Build Succeeded 👏 Build Id: 3b728d52-2151-4d81-b262-c03900e3ca04 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
This addresses part of #713. This seemed fairly uncontroversial. This PR makes zero semantic changes. It's only a whitespace/formatting change applied by
clang-format -style=Google ...
.While I expect no tests to fail from this change, I ran all the tests with
cd build; make test
as the instructions suggest and they did pass. However, I also introduced an intentional syntax error in the C++ code, and the tests still passed, so I'm not convinced that they're running. Is there some other way that I should/could run the C++ build/test on my local machine before sending a PR?This change is