-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
Deboostify Crow #457
Deboostify Crow #457
Conversation
2e9ee2a
to
7ef1207
Compare
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.
What I found are the comments below and the drone error:
2: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2: unittest is a Catch v2.13.8 host application.
2: Run with -? for options
2:
2: -------------------------------------------------------------------------------
2: middleware_cookieparser_format
2: -------------------------------------------------------------------------------
2: /drone/src/tests/unittest.cpp:1667
2: ...............................................................................
2:
2: /drone/src/tests/unittest.cpp:1713: FAILED:
2: CHECK( s.find("Expires=Wed, 01 Nov 2000 23:59:59 GMT") != std::string::npos )
2: with expansion:
2: 18446744073709551615 (0xffffffffffffffff)
2: !=
2: 18446744073709551615 (0xffffffffffffffff)
And It's not a dealbreaker but formatting .drone.yml
is somewhat incorrect and qs_parse
is somewhat problematic (because while formatting Crow I attempted to keep external libraries away from clang)
2c220eb
to
79d88f6
Compare
I'll have to look into that unittest again. Passing fine on my system. |
cb65082
to
d8721c9
Compare
d8721c9
to
d87e19b
Compare
d87e19b
to
6df15eb
Compare
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.
Aside from the comments, I couldn't find anything concerning from looking at the code. I'll do a few local tests (to see if it compiles with GCC 4.8 for example) and we'll see what to do from there :)
It serves as a replacement for boost::iequals.
Move to pointers instead. This implementation relies on the safe deletion of `nullptr`.
…o compilation errors.
This makes the code more consistent and also reflects the intention a little better.
Return early if inequality is found.
A private templated function containing the algorithm is used to prevent repetition.
… whitespace checks in `CookieParser`.
This Pr removes
Boost
as a dependency and will instead rely on the standaloneasio
library.CI now installs
libasio-dev
instead oflibboost-all-dev
and the documentation resembles that change. (Although the MacOS section could use a double-check, I have no such device on hand)Proper testing necessary
Unittests are all passing but I think some real-life testing does no harm.
Removed Boost functions and types and their replacements:
boost::lexical_cast
becomescrow::utility::lexical_cast
. Its implementation relies onstd::stringstream
for converting between types.boost::hash_combine
is replaced by a private function. Its implementation idea stems from around the internet and can be found in multiple sources.boost::iequals
is replaced bycrow::utility::string_equals
taking two mandatorystd::string
arguments and one optionalbool
controlling the case-sensitivity.boost::system::error_code
is replaced byasio::error_code
which is an alias forstd::error_code
.boost::asio::
function is replaced with their standaloneasio::
counterpart.boost::array
is replaced withstd::array
.boost::posix_time
is replaced with astd::chrono
equivalent.boost::*_comparable
is dropped and the respective operators are implemented manually.boost::lexicographical_compare
is replaced withstd::lexicographical_compare
.boost::optional
is replaced withstd::unique_ptr
.boost::trim
is replaced withcrow::utility::trim
.Introduced functions (*explicitly* tested?):
private void crow::ci_hash::hash_combine
. (❌)private bool crow::json::detail::r_string::equals
. (❌)crow::CookieParser::Cookie
. (❌)bool crow::utility::string_equals
(✅)T crow::utility::lexical_cast
(✅)std::string crow::utility::trim
(✅)