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

scaladoc should not expand def macros (in most cases)

    Details

      Description

      scaladoc does not support separate generation of documentation, so the sources for all modules in a project need to be passed to scaladoc at once. For a project that defines a macro in one module and uses it in another, this violates the rule that macro definitions must be separate from their usage.

      One way to get around this is for scaladoc to not expand macros. There may some cases where it has to expand them, but in general, scaladoc doesn't need to inspect the implementation of a method if the return type is given explicitly. This is a reasonable restriction for those who otherwise cannot generate documentation for their macro-enabled project.

        Activity

        Hide
        Adriaan Moors added a comment -

        Eugene, could you have a look at this? Thanks!

        Show
        Adriaan Moors added a comment - Eugene, could you have a look at this? Thanks!
        Hide
        Eugene Burmako added a comment -

        Yep, looking into this issue.

        Show
        Eugene Burmako added a comment - Yep, looking into this issue.
        Show
        Eugene Burmako added a comment - https://github.com/scala/scala/pull/2024
        Show
        Eugene Burmako added a comment - https://github.com/scala/scala/commit/941c56918e052a1c619f35b24c6aa6c736390dc5
        Hide
        Mark Harrah added a comment -

        I'm now able to generate API docs for a multi-project build with macros: scala-sbt.org/api. Thanks!

        Show
        Mark Harrah added a comment - I'm now able to generate API docs for a multi-project build with macros: scala-sbt.org/api. Thanks!

          People

          • Assignee:
            Eugene Burmako
            Reporter:
            Mark Harrah
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development