scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

New scaladoc produces incompatible URLs for types in package objects #9842

Closed scabug closed 12 months ago

scabug commented 8 years ago

The old (2.10/2.11) scaladoc used to put type aliases in package objects into "package.html", the new one uses "index.html", thus making it impossible to link correctly to these members when cross-building on 2.11 and 2.12.

See https://travis-ci.org/slick/slick/builds/142174330 for a failure caused by this.

On 2.11, you can link to

api/slick/dbio/package.html#DBIO[+R]=slick.dbio.DBIOAction[R,slick.dbio.NoStream,slick.dbio.Effect.All]

which gets redirected to

api/index.html#slick.dbio.package@DBIO[+R]=slick.dbio.DBIOAction[R,slick.dbio.NoStream,slick.dbio.Effect.All]

On 2.11.0-M5 you need

api/slick/dbio/index.html#DBIO[+R]=slick.dbio.DBIOAction[R,slick.dbio.NoStream,slick.dbio.Effect.All]

There doesn't seem to be a link format that works for both versions.

scabug commented 8 years ago

Imported From: https://issues.scala-lang.org/browse/SI-9842?orig=1 Reporter: @szeiger Affected Versions: 2.12.0-M5

scabug commented 8 years ago

@felixmulder said (edited on Aug 7, 2016 9:32:11 AM UTC): If I understand your usecase correctly - you're referencing documentation for both 2.11 and 2.12 and you want to be able to use the same links?

In #9873 I explain why the the scheme was changed.

I believe this particular compatibility issue could be solved by producing both an "index.html" and a "package.html" for the package objects.

Out of curiosity I'd love to know where in your documentation this is an issue :)

EDIT: saw the travis link just now

scabug commented 8 years ago

@szeiger said: It's not a big issue, at least not for Slick. We can do a hard switch-over from 2.11 scaladocs to 2.12 scaladocs at a later point. We only publish one set of scaladocs (and manual) anyway, so for now we still publish the 2.11 version and don't bother verifying links on 2.12.

scabug commented 8 years ago

@Atry said (edited on Nov 7, 2016 6:20:27 AM UTC): New scaladoc still generates old URL to external dependencies.

For example: Binding.scala's API documentation contains many old style links to Scala standard library, e.g. http://www.scala-lang.org/api/2.12.0/index.html#scala.concurrent.Future . All the links are broken.

som-snytt commented 12 months ago

Migration from Scaladoc 2.11 is unlikely to receive further attention.