Skip to content

scaladoc does not include members of nested classes/traits/objects #12080

Open
@coreyoconnor

Description

@coreyoconnor

reproduction steps

Search for the method in in the generated documentation: https://www.scalatest.org/scaladoc/3.2.0/index.html

Note: This is not specific to scalatest; just used as a convenient example.

problem

I'd expect to be able to find the in method. This is not the case. From a quick survey, this presents a difficulty for users of scaladoc:

(There are other issues reference by that link. Those will be covered with separate tickets)

Activity

Jasper-M

Jasper-M commented on Jul 15, 2020

@Jasper-M

Searching for to in the standard library docs works though. The UX when there are many results could still be better of course.

changed the title [-]scaladoc does not search two letter identifiers[/-] [+]scaladoc does not find "in" in an example scaladoc[/+] on Jul 15, 2020
coreyoconnor

coreyoconnor commented on Jul 15, 2020

@coreyoconnor
Author

Updated to be specific to "in" perhaps that's filtered for other reasons?

added this to the Backlog milestone on Jul 23, 2020
forketyfork

forketyfork commented on Jul 24, 2020

@forketyfork

Quick investigation shows that in method always occurs in nested traits, e.g. FixtureAnyFlatSpecLike.ItVerbString. The search index is generated at build time, and it doesn't contain members of nested classes/traits/objects, only members of top level entities.

Probably the solution would be to add members of nested classes to the index, however, this may significantly increase its size.

BTW you can search for precise names of short methods using regular expressions, e.g. ^to$.

changed the title [-]scaladoc does not find "in" in an example scaladoc[/-] [+]scaladoc does not include members of nested classes/traits/objects[/+] on Jul 24, 2020
added
fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)
on Oct 18, 2023
som-snytt

som-snytt commented on Oct 18, 2023

@som-snytt

An example in standard lib is asJava, for example in IteratorHasAsJava. In Scala 3, the method results box offers "show more", and the iterator result type is at top and also down the list for the nested implicit class.

Scala 2 omits the nested results, as OP said.

Dottydoc does nice camel case search, e.g., JLo for AsJavaLongConsumer, AsJavaIntToLongFunction, etc.

It would be nice to sort by nesting level, hi->lo or lo->hi.

som-snytt

som-snytt commented on Oct 20, 2023

@som-snytt

Just noticed that this ticket is from a couple of years ago, so I won't reply on twitter after all. It's not even called twitter anymore!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @coreyoconnor@SethTisue@som-snytt@forketyfork@Jasper-M

        Issue actions

          scaladoc does not include members of nested classes/traits/objects · Issue #12080 · scala/bug