You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "mdedetrich (via GitHub)" <gi...@apache.org> on 2024/02/05 03:54:10 UTC

[PR] Replace getFirst with get [incubator-pekko-http]

mdedetrich opened a new pull request, #470:
URL: https://github.com/apache/incubator-pekko-http/pull/470

   So `getFirst` for getting an attribute is deprecated and you are instead meant to use `get` however this does have a different behaviour change (i.e. `getFirst` will get the first found attribute where as `get` will get the most specific attribute).
   
   Since we are now in the 1.1.x branch these kinds of behaviour changes are allowed


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] Replace getFirst with get [incubator-pekko-http]

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on PR #470:
URL: https://github.com/apache/incubator-pekko-http/pull/470#issuecomment-1926193527

   Okay so as I expected, we are actually relying on the behaviour of `getFirst` since the tests have started failing, will do some digging here.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org


Re: [PR] Replace getFirst with get [incubator-pekko-http]

Posted by "mdedetrich (via GitHub)" <gi...@apache.org>.
mdedetrich commented on PR #470:
URL: https://github.com/apache/incubator-pekko-http/pull/470#issuecomment-1926241761

   @jrudolph @raboof So I had a quick look at this and I don't know what to do here, it seems like making `getFirst` deprecated was a mistake or maybe it should only be deprecated for public and not private inter-pekko use cases?
   
   The whole reason why `getFirst` is necessary is so that the `withSizeLimit` directive works correctly with [nested routes](https://github.com/apache/incubator-pekko-http/blob/c5eda6a5d6182c2f6432e6c891ce263ae2e5d8aa/http-tests/src/test/scala/org/apache/pekko/http/scaladsl/server/directives/MiscDirectivesSpec.scala#L148-L185) and while it is possible to remove the deprecation of `getFirst` without using `get` in doing so it would just involve copying the implementation of it which means its not really solving a problem?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org