-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Lets the user specify us dropping hints in response, resolves #1789. #3456
Conversation
👍 Can you ticket this and put it in the v6 API changes ticket? |
what about simply hints=false? |
Check the shiny new docs for the |
bearings_rule = | ||
qi::lit("bearings=") > | ||
(-(qi::short_ > ',' > qi::short_))[ph::bind(add_bearing, qi::_r1, qi::_1)] % ';'; | ||
|
||
base_rule = radiuses_rule(qi::_r1) | hints_rule(qi::_r1) | bearings_rule(qi::_r1); | ||
base_rule = radiuses_rule(qi::_r1) // |
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.
I have recently found // clang-format off
// clang-format on
and used here https://github.com/Project-OSRM/osrm-backend/blob/opening_hours/include/util/opening_hours.hpp#L302
Would it be ok to allow suppress clang format for qi rules and use qi-usual formating like
emit_hints_rule
= qi::lit("emit_hints=")
> qi::bool_[ph::bind(&engine::api::BaseParameters::emit_hints, qi::_r1) = qi::_1]
;
?
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.
Ah yeah makes sense probably not only for Spirit grammars but e.g. also for program option parser and other similar code. Want to ticket this or make a separate pull request for it?
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.
I think a separate ticket with low priority will be good
dc8b75b
to
486d165
Compare
Flagging here: This will need an adaption in |
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.
Looks good!
There is one test still failing https://travis-ci.org/Project-OSRM/osrm-backend/jobs/184548957#L5796 |
…1789. Adds an `generate_hints=false` option which lets us skip generating and emitting hints for Waypoints. This can be used to decrease the response size when the user does not need hints anyway. We should think about making `false` the default here in v6.
486d165
to
b1f6797
Compare
Ah sorry, missed updating the expected parsing failure for the |
For #1789.
Adds an
?generate_hints=false
option which lets us skip generating andemitting hints for Waypoints. This can be used to decrease the response
size when the user does not need hints anyway.
We should think about making
false
the default in v6, and let advancedusers be explicit about the hint feature.
Tasklist
cc @TheMarex