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

mutable.MultiMap cannot be used as documented without warnings #11504

Open
raboof opened this issue Apr 26, 2019 · 6 comments

Comments

Projects
None yet
4 participants
@raboof
Copy link
Member

commented Apr 26, 2019

The mutable.MultiMap docs suggest val mm = new HashMap[Int, Set[String]] with MultiMap[Int, String], but HashMap is marked @deprecatedInheritance("HashMap wil be made final; use .withDefault for the common use case of computing a default value", "2.13.0").

@lrytz

This comment has been minimized.

Copy link
Member

commented Apr 26, 2019

Should MultiMap be deprecated? @szeiger / @julienrf

@lrytz lrytz added this to the 2.13.0-RC2 milestone Apr 26, 2019

@julienrf

This comment has been minimized.

Copy link

commented Apr 26, 2019

Probably, but we should provide a proper replacement.

@lrytz

This comment has been minimized.

Copy link
Member

commented Apr 26, 2019

Would it be enought to point people to scala-collection-contrib? Is it planned to release that module?

@julienrf

This comment has been minimized.

Copy link

commented Apr 26, 2019

We need to make this repository “releasable”, and then to find someone who wants to take the responsibility of pushing git tags to cut releases.

@szeiger

This comment has been minimized.

Copy link

commented Apr 26, 2019

We could provide a factory method that gives you a MultiMap for a HashMap typed as Map with MultiMap. It could still be implemented as a wrapper (similar to MultiDict) when HashMap is made final.

But I would prefer to deprecate MultiMap instead. I'm not sure we should point to MultiDict as a recommended replacement at this point. After all, if we were sufficiently confident that the API is good and can be kept stable we should have added it to the standard library. We could recommend a simple Map as a replacement (and point to MultiDict as another option). After all, MultiMap does not add much functionality on top of Map.

@szeiger

This comment has been minimized.

Copy link

commented May 2, 2019

The PR targets 2.13.1. Since deprecation is the most likely solution (and the current implementation works fine, albeit with a deprecation warning) I'm rescheduling this to 2.13.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.