-
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
Fix invalid scaladoc links which cannot be found (#353) #682
Conversation
* Add enough package name * Fix invalid syntax of links to a method
@@ -45,7 +45,7 @@ trait Scheduler { | |||
* Java API: Schedules a Runnable to be run once with a delay, i.e. a time period that | |||
* has to pass before the runnable is executed. | |||
* | |||
* @throws IllegalArgumentException if the given delays exceed the maximum | |||
* @throws java.lang.IllegalArgumentException if the given delays exceed the maximum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe better just import it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
java.lang is imported implicitly - same as the top level scala package. If scaladoc is not linking these java.lang classes unless you prefix them like this - then there seems to be a bug that we should report to scala team. I'll have to test out locally if this change actually improves the scaladoc or whether the issue is with links to Java classes generally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if it can't lik, then its a bug of scaladoc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my environment, linking to classes under the top level scala package is also failed without those scala.
prefix:
@@ -19,7 +19,7 @@ | |||
|
|||
/** | |||
* Used for building a partial function for {@link | |||
* org.apache.pekko.actor.AbstractActor#createReceive() AbstractActor.createReceive()}. | |||
* org.apache.pekko.actor.AbstractActor#createReceive AbstractActor.createReceive()}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems wrong too.
@@ -477,7 +477,7 @@ trait Scheduler { | |||
* Java API: Schedules a Runnable to be run once with a delay, i.e. a time period that | |||
* has to pass before the runnable is executed. | |||
* | |||
* @throws IllegalArgumentException if the given delays exceed the maximum | |||
* @throws java.lang.IllegalArgumentException if the given delays exceed the maximum |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just import this , then there will be no java.lang.
@ydash thanks, this is epic, but the changeset is large than I expected, will import these classes directly reduce the lines of change? |
@He-Pin
|
@ydash I think that should be a bug in Scaladoc, because in Java, we can do it. would you like to report it scala/bug ? |
@He-Pin You mean it is a bug that failures of linking to classes under |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - I'm willing to merge this. I must admit to not wanting to run this on my laptop first because the build takes so long. If we merge this and it proves not to work well, we can revert it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, checked, we can make if simpler once scala fix this.
refs: scala/bug#12884
@ydash @He-Pin this change is the cause of #687 - I don't know if reverting some parts of this will be enough or if we would be better off doing a full revert and starting again. Scaladoc has so many bugs that it may not be worth our while trying to improve it. Edit: I'm trying a partial revert - see #688 |
Refs #353
I fixed invalid scaladoc links.