Skip to content

Scaladoc: Too many deprecated methods #11393

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

Open
ashawley opened this issue Feb 7, 2019 · 3 comments
Open

Scaladoc: Too many deprecated methods #11393

ashawley opened this issue Feb 7, 2019 · 3 comments

Comments

@ashawley
Copy link
Member

ashawley commented Feb 7, 2019

There are a bunch of methods listed as deprecated for List in 2.13. It doesn't appear they're actually deprecated. The method names are in the color green. Is it something to do with deprecations in IterableOnceExtensionMethods?

collectFirst
copyToBuffer
count
exists
filter
find
flatMap
foldLeft
foldRight
forall
foreach
isEmpty
map
[... 31 others]

These are implicit methods for List but they are not deprecated, and they should be shadowed in Scaladoc. This unnecessarily clutters up the Scaladocs but also dilutes the list of deprecated members. Granted, most people probably learn about their deprecations from interactive compiler warnings and not the api docs.

@szeiger
Copy link

szeiger commented Aug 20, 2019

In some cases like copyToBuffer the deprecated methods are legitimate. Others like collectFirst and count are listed twice, both as regular (non-deprecated) methods and as deprecated extension methods. This is another instance of #6110.

@Jasper-M
Copy link

The scaladoc also says they are shadowed, and mentions a way to call them anyway ((list: IterableOnceExtensionMethods[A]).count(f)).

@szeiger
Copy link

szeiger commented Aug 20, 2019

Yeah, it looks like this is not an actual bug in scaladoc (anymore). I didn't rerun #6110 but I assume it's in a similar state these days. scaladoc already gets the shadowing right, the real question is what to do with that information. Is it safe to assume that an instance method or extension methods "overrides" a shadowed, less specific extension method? Unlike overridden methods, these shadowed methods can still be called through a simple type ascription. Sorting the methods into deprecated and non-deprecated first and only mentioning shadowing individually makes it hard to convey this information.

@szeiger szeiger modified the milestones: 2.13.1, 2.13.2 Aug 28, 2019
@SethTisue SethTisue modified the milestones: 2.13.2, Backlog Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants