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

Links in ScalaDoc - Spec and implementation unsufficient

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Scala 2.10.0-M5
    • Component/s: Scaladoc Tool
    • Labels:
    • Environment:

      scaladoc link method field spec

      Description

      === What steps will reproduce the problem? ===
      Try linking to anything other than a class with ScalaDoc.

      === What is the expected behavior? ===
      Links should be able to point to classes, objects, methods.
      Choosing the right method in case of overloading should be supported.

      === What do you see instead? ===
      It doesn't work, there is neither a specification in case anyone plans to implement it.

      === Additional information ===
      Having thought about this, afaiu we can't follow Java's path of using "." for static methods/fields and "#" for instance methods/fields because of path-dependant types.

      A thinkable worst-case could be something like this:

      package Foo
      
      class Foo {
        class Bar
        def Bar = 0
      }
      
      package Foo.Bar
      
      class Bar
      object Bar
      

      Now add package objects on top of that.

      It would be possible to use things like foo(Int,String) for overload resolution of methods, comparable to Java.

        Activity

        Hide
        Simon Ochsenreither added a comment -

        Also, coming up with a way to link to objects itself (without method call) would be nice.

        scala.None is a good example. Maybe it would be possible to use the not-invented-yet char for object method/field access for differentiating between class/object? (If "@" would be the char, something like scala.None@?)

        Show
        Simon Ochsenreither added a comment - Also, coming up with a way to link to objects itself (without method call) would be nice. scala.None is a good example. Maybe it would be possible to use the not-invented-yet char for object method/field access for differentiating between class/object? (If "@" would be the char, something like scala.None@ ?)
        Show
        Adriaan Moors added a comment - https://github.com/scala/scala/pull/925
        Hide
        Vlad Ureche added a comment -

        See SI-3695 for a quick tutorial on using links to members.

        Show
        Vlad Ureche added a comment - See SI-3695 for a quick tutorial on using links to members.

          People

          • Assignee:
            Vlad Ureche
            Reporter:
            Simon Ochsenreither
            TracCC:
            Simon Ochsenreither
          • Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development