Scala Programming Language
  1. Scala Programming Language
  2. SI-5558

Scaladoc does not add members of package objects to the method index

    Details

      Description

      If you want to find the 'pow' method, for example, and you don't know where it is, you might go to the method index (i.e. the a-z index underneath the search field in the left frame). You click on 'p' and then look for 'pow'. You won't find it - ScalaDoc doesn't put members of package objects into this index.

      Also:

      Another thing which I realized while browsing through the index is the way in which the index entries are written, i.e. are capitalized.
      Example: STAR: is defined in Trees.Star, Base.Star and Tokens.STAR, but listed in the index as STAR only. Probably all defined capitalizations could be listed on the index-title-line instead of only one (arbitrarily) chosen one. (noticed by Dominik)

        Activity

        Hide
        Manohar Jonnalagedda added a comment -

        This issue is a bit trickier that it looks. The way the index is built, each DocTemplateEntity's members are added to the index, as long as the member's owner is the DocTemplateEntity in question (http://www.scala-lang.org/archives/downloads/distrib/files/nightly/docs/compiler/index.html#scala.tools.nsc.doc.model.IndexModelFactory$).

        Normally, the owner of a member is the template it is defined in, and this is computed with the makeTemplate function (by using the owner of the symbol of a member), where it will normally find a correspondence. In the case of a member of a package object, however, it seems that the owner of such a member does not correspond to the package, but to a generic symbol having the name "package"

        TL;DR the symbol table does not seem to map owners correctly for members of package objects, so the issue seems to be during symbol table generation.

        Show
        Manohar Jonnalagedda added a comment - This issue is a bit trickier that it looks. The way the index is built, each DocTemplateEntity's members are added to the index, as long as the member's owner is the DocTemplateEntity in question ( http://www.scala-lang.org/archives/downloads/distrib/files/nightly/docs/compiler/index.html#scala.tools.nsc.doc.model.IndexModelFactory$ ). Normally, the owner of a member is the template it is defined in, and this is computed with the makeTemplate function (by using the owner of the symbol of a member), where it will normally find a correspondence. In the case of a member of a package object, however, it seems that the owner of such a member does not correspond to the package, but to a generic symbol having the name "package" TL;DR the symbol table does not seem to map owners correctly for members of package objects, so the issue seems to be during symbol table generation.
        Hide
        Dominik Gruntz added a comment -

        Another thing which I realized while browsing through the index is the way in which the index entries are written, i.e. are capitalized.
        Example: STAR: is defined in Trees.Star, Base.Star and Tokens.STAR, but listed in the index as STAR only. Probably all defined capitalizations could be listed on the index-title-line instead of only one (arbitrarily) chosen one.

        Dominik

        Show
        Dominik Gruntz added a comment - Another thing which I realized while browsing through the index is the way in which the index entries are written, i.e. are capitalized. Example: STAR: is defined in Trees.Star, Base.Star and Tokens.STAR, but listed in the index as STAR only. Probably all defined capitalizations could be listed on the index-title-line instead of only one (arbitrarily) chosen one. Dominik
        Hide
        Miguel Garcia added a comment -

        Now I hear that you're working on this bug, Manohar Jonnalagedda, if that's the case, unassigning it was my mistake! (Otherwise leave it unassigned, to better reflect reality, that's my take on it).

        Show
        Miguel Garcia added a comment - Now I hear that you're working on this bug, Manohar Jonnalagedda , if that's the case, unassigning it was my mistake! (Otherwise leave it unassigned, to better reflect reality, that's my take on it).
        Show
        Adriaan Moors added a comment - https://github.com/scala/scala/pull/925
        Hide
        Vlad Ureche added a comment -

        Closed by the model rewrite in c11427c1.

        Show
        Vlad Ureche added a comment - Closed by the model rewrite in c11427c1 .

          People

          • Assignee:
            Vlad Ureche
            Reporter:
            Derek Wyatt
          • Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development