This page is no longer maintained — Please continue to the home page at

Where to place Scaladoc macros with package-wide visibility?

No replies
Peter 2
Joined: 2011-02-16,
User offline. Last seen 42 years 45 weeks ago.

Hi All,

Scaladoc macros work fine for classes, traits and objects. On we may
read: "When $name is used in comments of the class, trait, object *or
package* (including those of members), it will be replaced..."

Now I need a macro to be invoked in the Scaladoc comment of several
classes within a single package so I think I can define the macro in
the Scaladoc of that package. So far I've tried to place the macro in
1) Scaladoc of the package in package.scala
2) Scaladoc of the package object in package.scala
3) Scaladoc within the package object in package.scala
4) Scaladoc of the package declaration of the source file containing
my classes

but none of these helped - the macro will not be picked up and invoked
using SBT 0.10 doc.

Do you know where to place a package-wide macro definition?


Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland