-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lots of scaladoc warnings in build #353
Comments
@pjfanning |
@ydash - this is still an issue. If you have time to contribute some PRs that would be great. We are looking to do a release at the moment so we would like to minimise disruption. Could you keep any PRs small? Not one change in each PR but a relatively limited number of changes in each PR. |
It seems to appear two types of warn log, One of
This problem can be resolved by explicitly writing a full path of an entity: - * For testing purposes this `EntityRef` can be used in place of a real [[EntityRef]].
+ * For testing purposes this `EntityRef` can be used in place of a real [[org.apache.pekko.cluster.sharding.typed.javadsl.EntityRef EntityRef]]. Following is an example of
If a link target is ambiguous, scaladoc seems to automatically generate a link for one candidate. - * or via [[ActorTestKit#createTestProbe]].
+ * or via [[ActorTestKit#createTestProbe[M](name:String,clazz:Class[M])* ActorTestKit#createTestProbe]]. @pjfanning |
@ydash seems ok to me - but my point in an earlier comment still stands - can we keep any PRs a manageable size - to make them easier to review? |
Probably yes, we can. |
I've found links which refer to a private type or member. Those links cause Unless specified by @pjfanning
|
|
Links for java external library also cause Similar problem was reported in stackoverflow. @pjfanning
|
@ydash Don't do 2. Just do best effort to fix whatever scaladoc warnings are easily fixed. I think there is a way to get the external links to slf4j to work. I've done it before but I don't have time today. Here is an example from another project I work on. https://github.com/FasterXML/jackson-module-scala/blob/2.16/build.sbt#L19-L36 |
I tried to add settings to Seq(
ScalaUnidoc / unidocProjectFilter := unidocRootProjectFilter(unidocRootIgnoreProjects.value),
JavaUnidoc / unidocProjectFilter := unidocRootProjectFilter(unidocRootIgnoreProjects.value),
- ScalaUnidoc / apiMappings := (Compile / doc / apiMappings).value) ++
+ ScalaUnidoc / apiMappings := (Compile / doc / apiMappings).value,
+ ScalaUnidoc / apiMappings ++= {
+ def mappingsFor(organization: String, names: List[String], location: String, revision: (String) => String = identity): Seq[(File, URL)] =
+ for {
+ entry: Attributed[File] <- (Compile / fullClasspath).value
+ _ = println(s"entry: ${entry}")
+ module: ModuleID <- entry.get(moduleID.key)
+ if module.organization == organization
+ if names.exists(module.name.startsWith)
+ } yield entry.data -> url(location.format(revision(module.revision)))
+
+ val mappings: Seq[(File, URL)] =
+ mappingsFor("org.slf4j", List("slf4j-api"), "https://javadoc.io/doc/org.slf4j/slf4j-api/%s/")
+ mappings.toMap
+ }
+ ) ++
UnidocRoot.CliOptions.genjavadocEnabled @pjfanning |
@ydash I'm busy with release stuff so can't help much here. I would have thought that Scala would handle api mappings for the various submodules of Pekko and that the only projects that we need to help Scala with are providing javadoc links for 3rd party libs like slf4j-api. |
@ydash if you feel like it would be easier to start with more straightforward issues, maybe you could start with the doc issues where the Pekko class can't be found (because the doc reference doesn't include enough of the package name) |
I submitted a PR(#477) which solves following problem: @pjfanning |
* make unidoc generate external javadoc links (#353) * Move code of updating apiMappings
Co-authored-by: Naoki Yamada <[email protected]>
* Add enough package name * Fix invalid syntax of links to a method * Remove invalid newlines after a javadoc's link tag
* Add enough package name * Fix invalid syntax of links to a method
* Add enough package name * Fix invalid syntax of links to a method
Check out git repo and run
sbt unidoc
and you will lots of warnings likeCould not find any member to link for
(and others).It would be great if anyone who want to help can look at these and submit some PRs.
The text was updated successfully, but these errors were encountered: