akka / akka-http

The Streaming-first HTTP server/module of Akka
https://doc.akka.io/docs/akka-http
Other
1.34k stars 595 forks source link

`@unidoc` links to Scala objects are broken in documentation #1895

Closed shkoder closed 6 years ago

shkoder commented 6 years ago

On https://doc.akka.io/docs/akka-http/current/common/caching.html#frequency-biased-lfu-cache links to LfuCache are broken for both Scala and Java - leading to 404

jrudolph commented 6 years ago

Probably a problem in the unidoc directive when there's only an object but no companion class?

/cc @raboof

jrudolph commented 6 years ago

I renamed the ticket since all links to objects seem to be broken.

raboof commented 6 years ago

There seem to be a couple of problems here:

1) In Scaladoc, we link to the LfuCache class instead of the companion object, but that class is private[caching] and thus is not included in the scaladoc. We rely on https://github.com/lukehutch/fast-classpath-scanner to list the classes and this does not allow us to distinguish between objects and classes. Short term solution might be to allow linking to objects explicitly, with @unidoc[LfuCache$].

2) In Javadoc, LfuCache is not included at all

jrudolph commented 6 years ago

I see. Thanks for the analysis, @raboof. So, it seems LfuCache is a particularly bad case. Would it work if we would move the private[caching] class LfuCache somewhere else?

jrudolph commented 6 years ago

Should be fixed by #1903 and #1904.