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

Use case methods hide information about the actual method

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: Scala 2.10.0-M1
    • Component/s: Scaladoc Tool
    • Labels:
      None

      Description

      Now that use cases hide the actual method, deficiencies in their implementation have become critical. Basically, their whole body is based on the use case definition, so they show up as abstract (whether they are or not), attributes are lost (such as "final"), and the definition classes become useless.

      To put it simply, the documentation for all methods with use cases is now BROKEN, in a way that goes way beyond simply displaying a false signature. And, of course, we presently have no way of actually looking up the real signature – since definition classes is broken, we can't even track the source code for it.

      Personally, I consider this issue Critical. The nightly docs are used by a lot of people, but they mostly know how to get around. If, however, a release is made in the current condition, there will be hell to be paid because of these issues.

        Activity

        Hide
        Paul Phillips added a comment -

        But if the situation is really that the info is not up to date (I'm not plugged into the details here) then you might want to call sym.info before you do anything else with it.

        Show
        Paul Phillips added a comment - But if the situation is really that the info is not up to date (I'm not plugged into the details here) then you might want to call sym.info before you do anything else with it.
        Hide
        Vlad Ureche added a comment -

        Seems the flags are not forced to the correct values upon calling .initialize. There's something I must be missing here...

        Show
        Vlad Ureche added a comment - Seems the flags are not forced to the correct values upon calling .initialize. There's something I must be missing here...
        Hide
        Paul Phillips added a comment -

        Did you do what it says in my second comment?

        Show
        Paul Phillips added a comment - Did you do what it says in my second comment?
        Hide
        Vlad Ureche added a comment -

        Yes, I did. It turns out we're talking about two different symbols: One that is inserted in the use case by the typer (stored in UseCase.defined) and the actual symbol that scaladoc sees, after the typers phase ran. I would have expected they are the same, but they're not: they share the name, the type but not the flags.

        The Usecase symbol is added when typers encounters a DocDef (Typers.scala:4017) by calling typedUseCase on Typers.scala:1643 and setting useCase.defined in Typers.scala:1669.

        So the fix should be pretty simple: we need not rely on the symbol set by typers but on the symbol provided by scaladoc. On the other hand, I really want to understand why isn't the UseCase.defined symbol updated properly.

        Show
        Vlad Ureche added a comment - Yes, I did. It turns out we're talking about two different symbols: One that is inserted in the use case by the typer (stored in UseCase.defined) and the actual symbol that scaladoc sees, after the typers phase ran. I would have expected they are the same, but they're not: they share the name, the type but not the flags. The Usecase symbol is added when typers encounters a DocDef (Typers.scala:4017) by calling typedUseCase on Typers.scala:1643 and setting useCase.defined in Typers.scala:1669. So the fix should be pretty simple: we need not rely on the symbol set by typers but on the symbol provided by scaladoc. On the other hand, I really want to understand why isn't the UseCase.defined symbol updated properly.
        Hide
        Vlad Ureche added a comment -

        Closing this bug as a duplicate of SI-5054, if you notice other strange behaviors in usecases please comment there.

        Show
        Vlad Ureche added a comment - Closing this bug as a duplicate of SI-5054 , if you notice other strange behaviors in usecases please comment there.

          People

          • Assignee:
            Vlad Ureche
            Reporter:
            Daniel Sobral
          • Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development