Bug in Scaladoc for package object?


I’ve been fighting with Scaladoc for package objects.
I’d like to know if the following is a bug, or a known limitation.

When defining a package object foo with only defs and vals, sbt doc doesn’t generate Scaladoc – only the index.html file is generated for the root package, but it is completerly empty.

As soon as you add a simple object Bar in it, then the Scaladoc is generated properly – with the other defs and vals in it!

Below is an example file that fire this behavior (Scaladoc version 2.12.3)

package bug

/** This the Scaladoc of the package foo */
package object foo {

def f(x: Int): Unit = ()

val zero: Int = 0

// object Bar /* Un-comment this line to produce a complete scaladoc */

sounds like https://github.com/scala/bug/issues/8124

Thanks. Indeed, that is the same bug.
It has been open since quite a while now.
Hoping that someone will get assigned to it soon.