Skip to content
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

TagsSpanTagger: how to support in play 2.7 #4

Open
pjfanning opened this issue Jul 15, 2019 · 5 comments
Open

TagsSpanTagger: how to support in play 2.7 #4

pjfanning opened this issue Jul 15, 2019 · 5 comments

Comments

@pjfanning
Copy link
Contributor

pjfanning commented Jul 15, 2019

This class depends on being able to iterate over the request tags.

Play 2.7 removes the ability to do this. request.tags called request.attrs.get(RequestAttrKey.Tags) (play 2.6) but RequestAttrKey.Tags is no longer supported in play 2.7. The 2.6 deprecation warning said to use request.attrs directly.

request.attrs does not return a Map. Instead, it returns a TypedMap that does not expose an iterator. This means you can only access attrs that you know the key name of.

@jjudd
Copy link
Contributor

jjudd commented Jul 15, 2019

Thanks for doing this! I've pinged the team internally. A group is working on migrating to Play 2.7 and will likely have time to look at this in the next week.

@jjudd
Copy link
Contributor

jjudd commented Jul 15, 2019

cc @sriraamas

@tmccombs
Copy link
Contributor

hmm, @pjfanning do you have a use case for TagsSpanTagger? I don't think that we (Lucid Software) currently use this ourselves. My first impression is to just remove TagsSpanTagger or replace it with an AttributeSpanTagger that takes a TypedKey.

@pjfanning
Copy link
Contributor Author

@tmccombs I don't use it either - I was just trying to retain support in case other people used it

@Zeimyth
Copy link
Contributor

Zeimyth commented Jul 18, 2019

Should be fixed by #5, though it might be worth publishing an actual Play 2.7 version of this library and removing the TagsSpanTagger.

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

No branches or pull requests

4 participants