Skip to content

Integrate uri #654

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

Merged
merged 5 commits into from
May 18, 2016
Merged

Integrate uri #654

merged 5 commits into from
May 18, 2016

Conversation

glynos
Copy link
Member

@glynos glynos commented May 16, 2016

I have integrated the URI into the cpp-netlib project, including into the build scripts, and I have updated the code internals, tests, and examples.

All appears to be working, there was little to do on the cpp-netlib side. This has been a long time coming, it will allow us to press on with cleaning up the HTTP code, and then to start adding features again.

I am not so happy with the code and directory organisation for now, but I won't try to fix any of this yet. I did some workarounds to make sure that I could run the URI tests (since google-test is a dependency of both projects, I had to add the tests manually in cpp-netlib). Also, getting the variants of GCC and Clang to work consistently on my Linux PC and on Travis was frustrating.

@deanberris
Copy link
Member

There's one failure:

[ 87%] Building CXX object libs/network/test/http/CMakeFiles/cpp-netlib-http-response_incremental_parser_test.dir/response_incremental_parser_test.cpp.o
cd /home/travis/build/cpp-netlib/cpp-netlib/build/libs/network/test/http && /home/travis/bin/g++   -DASIO_HEADER_ONLY -DBOOST_TEST_DYN_LINK -std=c++11 -Wall -std=c++11 -O3 -DNDEBUG -I/home/travis/build/cpp-netlib/cpp-netlib/deps/uri/include -I/home/travis/gcc-boost_1_59_0/include -I/home/travis/build/cpp-netlib/cpp-netlib/deps/asio/asio/include -I/home/travis/build/cpp-netlib/cpp-netlib -I/home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include    -o CMakeFiles/cpp-netlib-http-response_incremental_parser_test.dir/response_incremental_parser_test.cpp.o -c /home/travis/build/cpp-netlib/cpp-netlib/libs/network/test/http/response_incremental_parser_test.cpp
In file included from /home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include/gtest/gtest.h:1874:0,
                 from /home/travis/build/cpp-netlib/cpp-netlib/libs/network/test/http/request_incremental_parser_test.cpp:7:
/home/travis/build/cpp-netlib/cpp-netlib/libs/network/test/http/request_incremental_parser_test.cpp: In member function ‘virtual void IncrementalRequestParserTest_ParseMethod_Test::TestBody()’:
/home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include/gtest/internal/gtest-internal.h:133:55: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Wconversion-null]
     (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1)
                                                       ^
/home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include/gtest/gtest_pred_impl.h:77:52: note: in definition of macro ‘GTEST_ASSERT_’
   if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                    ^
/home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include/gtest/gtest_pred_impl.h:162:3: note: in expansion of macro ‘GTEST_PRED_FORMAT2_’
   GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)
   ^
/home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include/gtest/gtest.h:1923:3: note: in expansion of macro ‘EXPECT_PRED_FORMAT2’
   EXPECT_PRED_FORMAT2(::testing::internal:: \
   ^
/home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include/gtest/gtest.h:1924:32: note: in expansion of macro ‘GTEST_IS_NULL_LITERAL_’
                       EqHelper<GTEST_IS_NULL_LITERAL_(val1)>::Compare, \
                                ^
/home/travis/build/cpp-netlib/cpp-netlib/libs/network/test/http/request_incremental_parser_test.cpp:55:3: note: in expansion of macro ‘EXPECT_EQ’
   EXPECT_EQ(false, parsed_ok);
   ^
/home/travis/build/cpp-netlib/cpp-netlib/libs/network/test/http/request_incremental_parser_test.cpp: In member function ‘virtual void IncrementalRequestParserTest_ParseURI_Test::TestBody()’:
/home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include/gtest/internal/gtest-internal.h:133:55: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Wconversion-null]
     (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1)
                                                       ^
/home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include/gtest/gtest_pred_impl.h:77:52: note: in definition of macro ‘GTEST_ASSERT_’
   if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                    ^
/home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include/gtest/gtest_pred_impl.h:162:3: note: in expansion of macro ‘GTEST_PRED_FORMAT2_’
   GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)
   ^
/home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include/gtest/gtest.h:1923:3: note: in expansion of macro ‘EXPECT_PRED_FORMAT2’
   EXPECT_PRED_FORMAT2(::testing::internal:: \
   ^
/home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include/gtest/gtest.h:1924:32: note: in expansion of macro ‘GTEST_IS_NULL_LITERAL_’
                       EqHelper<GTEST_IS_NULL_LITERAL_(val1)>::Compare, \
                                ^
/home/travis/build/cpp-netlib/cpp-netlib/libs/network/test/http/request_incremental_parser_test.cpp:81:3: note: in expansion of macro ‘EXPECT_EQ’
   EXPECT_EQ(false, parsed_ok);
   ^
/home/travis/build/cpp-netlib/cpp-netlib/libs/network/test/http/request_incremental_parser_test.cpp: In member function ‘virtual void IncrementalRequestParserTest_ParseHTTPVersion_Test::TestBody()’:
/home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include/gtest/internal/gtest-internal.h:133:55: warning: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Wconversion-null]
     (sizeof(::testing::internal::IsNullLiteralHelper(x)) == 1)
                                                       ^
/home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include/gtest/gtest_pred_impl.h:77:52: note: in definition of macro ‘GTEST_ASSERT_’
   if (const ::testing::AssertionResult gtest_ar = (expression)) \
                                                    ^
/home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include/gtest/gtest_pred_impl.h:162:3: note: in expansion of macro ‘GTEST_PRED_FORMAT2_’
   GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)
   ^
/home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include/gtest/gtest.h:1923:3: note: in expansion of macro ‘EXPECT_PRED_FORMAT2’
   EXPECT_PRED_FORMAT2(::testing::internal:: \
   ^
/home/travis/build/cpp-netlib/cpp-netlib/deps/googletest/googletest/include/gtest/gtest.h:1924:32: note: in expansion of macro ‘GTEST_IS_NULL_LITERAL_’
                       EqHelper<GTEST_IS_NULL_LITERAL_(val1)>::Compare, \
                                ^
/home/travis/build/cpp-netlib/cpp-netlib/libs/network/test/http/request_incremental_parser_test.cpp:107:3: note: in expansion of macro ‘EXPECT_EQ’
   EXPECT_EQ(false, parsed_ok);

@glynos
Copy link
Member Author

glynos commented May 17, 2016

That's not a failure, that's a warning.

The actual failure was caused by an internal compiler error on GCC on Travis - this seems to be happening sometimes. I am totally unable to reproduce this on my development machine so I don't know what it could be. Often, restarting the job will work so that's what I tried.

@deanberris
Copy link
Member

LGTM

Thanks for trying that @glynos -- all green now.

@deanberris deanberris merged commit 9cd77a7 into cpp-netlib:master May 18, 2016
@glynos glynos deleted the integrate_uri branch May 18, 2016 05:31
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.

2 participants