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

Use transform when mapping Map values #728

Merged
merged 1 commit into from
Aug 26, 2020

Conversation

2m
Copy link
Contributor

@2m 2m commented Aug 26, 2020

This fixes the following warning generated when tapir is being
used with Scala 2.13:

method mapValues in trait MapOps is deprecated (since 2.13.0): Use .view.mapValues(f). A future version will include a strict version of this method (for now, .view.mapValues(f).toMap)

I am using tapir in my project with warnings-as-errors enabled. This
warning prevents me from using .in(formBody[...]) with case
classes.

The idea to switch to transform which is compatible with Scala 2.11,
2.12 and 2.13 was originally found here: scala/scala-collection-compat#216 (comment)

This fixes the following warning generated when tapir is being
used with Scala 2.13:

```
method mapValues in trait MapOps is deprecated (since 2.13.0): Use .view.mapValues(f). A future version will include a strict version of this method (for now, .view.mapValues(f).toMap)
```

I am using tapir in my project with warnings-as-errors enabled. This
warning prevents me from using `.in(formBody[...])` with case
classes.

The idea to switch to `transform` which is compatible with Scala 2.11,
2.12 and 2.13 was originally found here: scala/scala-collection-compat#216 (comment)
@adamw adamw merged commit 6f34829 into softwaremill:master Aug 26, 2020
@2m 2m deleted the fix/macro-warning-2m branch August 26, 2020 16:04
@adamw
Copy link
Member

adamw commented Aug 26, 2020

Released in 0.16.16, thanks!

@2m
Copy link
Contributor Author

2m commented Aug 26, 2020 via email

2m added a commit to 2m/auto-gate that referenced this pull request Aug 26, 2020
Use latest tapir and case class for request form data as it now does not
give warnings anymore after
softwaremill/tapir#728 has been merged and
released.
@2m 2m mentioned this pull request Aug 26, 2020
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