- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Linking to methods in Scaladoc 2: not supported?
Tue, 2011-02-08, 00:21
You can't link to methods in Scaladoc 2, right? I tried
[[com.example.Class#method]], [[com.example.Class.method]],
[[com.example.Class.method()]] etc., and they just end up being plain
text in the HTML. Other projects that I have looked at either didn't
have links to methods or just used instead of [[...]].
What I find rather strange is that there is no buzz regarding this...
or Google (and Trac) hates me. So what's up with this? Am I the only
one who thinks it's a fundamental limitation? Any hope it will be
fixed anytime soon, or is it some deeper problem with Scaladoc 2?
(Not reporting wrong links is horrible too... but at least I see
people complaining about that.)
Tue, 2011-02-08, 01:57
#2
Re: Linking to methods in Scaladoc 2: not supported?
Tuesday, February 8, 2011, 1:29:14 AM, Pedro Furlanetto wrote:
> It has been discussed. The major limitation of a simple solution would
> be ignoring alternatives of multiple overloaded methods.
Why is that a problem? JavaDoc solves this by allowing you to enter
the parameter types inside {@link ...} (or else it chooses arbitrarily
and issues a warning). Doesn't ScalaDoc re-use the relevant parts from
scalac? Scalac can already resolve such situations.
> Would you mind opening a Trac enhancement request?
Here it is:
https://lampsvn.epfl.ch/trac/scala/ticket/4224
> Depending on the feedback from EPFL guys I may provide a
> implementation.
>
> Cheers,
> PF
>
> 2011/2/7 Daniel Dekany :
>> You can't link to methods in Scaladoc 2, right? I tried
>> [[com.example.Class#method]], [[com.example.Class.method]],
>> [[com.example.Class.method()]] etc., and they just end up being plain
>> text in the HTML. Other projects that I have looked at either didn't
>> have links to methods or just used instead of [[...]].
>>
>> What I find rather strange is that there is no buzz regarding this...
>> or Google (and Trac) hates me. So what's up with this? Am I the only
>> one who thinks it's a fundamental limitation? Any hope it will be
>> fixed anytime soon, or is it some deeper problem with Scaladoc 2?
>>
>> (Not reporting wrong links is horrible too... but at least I see
>> people complaining about that.)
>>
>> --
>> Best regards,
>> Daniel Dekany
>>
>>
>
Tue, 2011-02-08, 02:07
#3
Re: Linking to methods in Scaladoc 2: not supported?
+1Would love to have this for ensime.
On Mon, Feb 7, 2011 at 4:29 PM, Pedro Furlanetto <pedrofurla@gmail.com> wrote:
On Mon, Feb 7, 2011 at 4:29 PM, Pedro Furlanetto <pedrofurla@gmail.com> wrote:
It has been discussed. The major limitation of a simple solution would
be ignoring alternatives of multiple overloaded methods. Would you
mind opening a Trac enhancement request? Depending on the feedback
from EPFL guys I may provide a implementation.
Cheers,
PF
2011/2/7 Daniel Dekany <ddekany@freemail.hu>:
> You can't link to methods in Scaladoc 2, right? I tried
> [[com.example.Class#method]], [[com.example.Class.method]],
> [[com.example.Class.method()]] etc., and they just end up being plain
> text in the HTML. Other projects that I have looked at either didn't
> have links to methods or just used <a href="..."> instead of [[...]].
>
> What I find rather strange is that there is no buzz regarding this...
> or Google (and Trac) hates me. So what's up with this? Am I the only
> one who thinks it's a fundamental limitation? Any hope it will be
> fixed anytime soon, or is it some deeper problem with Scaladoc 2?
>
> (Not reporting wrong links is horrible too... but at least I see
> people complaining about that.)
>
> --
> Best regards,
> Daniel Dekany
>
>
Tue, 2011-02-08, 02:47
#4
Re: Linking to methods in Scaladoc 2: not supported?
Tuesday, February 8, 2011, 1:53:37 AM, Daniel Dekany wrote:
> Tuesday, February 8, 2011, 1:29:14 AM, Pedro Furlanetto wrote:
>
>> It has been discussed. The major limitation of a simple solution would
>> be ignoring alternatives of multiple overloaded methods.
>
> Why is that a problem? JavaDoc solves this by allowing you to enter
> the parameter types inside {@link ...} (or else it chooses arbitrarily
> and issues a warning).
Actually, that's an annoying thing with JavaDoc... While the ability
to address a certain overload of a method is crucial, the ability to
address all the overloads at once is very often needed as well. So
ideally a link that doesn't specify the parameter types should pop up
a selection of all the overloads (unless one of the overload methods
was marked as the preferred overload). But, even if it just does what
JavaDoc does, that's already much better than the current situation.
> Doesn't ScalaDoc re-use the relevant parts from
> scalac? Scalac can already resolve such situations.
>
>> Would you mind opening a Trac enhancement request?
>
> Here it is:
> https://lampsvn.epfl.ch/trac/scala/ticket/4224
>
>> Depending on the feedback from EPFL guys I may provide a
>> implementation.
>>
>> Cheers,
>> PF
>>
>> 2011/2/7 Daniel Dekany :
>>> You can't link to methods in Scaladoc 2, right? I tried
>>> [[com.example.Class#method]], [[com.example.Class.method]],
>>> [[com.example.Class.method()]] etc., and they just end up being plain
>>> text in the HTML. Other projects that I have looked at either didn't
>>> have links to methods or just used instead of [[...]].
>>>
>>> What I find rather strange is that there is no buzz regarding this...
>>> or Google (and Trac) hates me. So what's up with this? Am I the only
>>> one who thinks it's a fundamental limitation? Any hope it will be
>>> fixed anytime soon, or is it some deeper problem with Scaladoc 2?
>>>
>>> (Not reporting wrong links is horrible too... but at least I see
>>> people complaining about that.)
>>>
>>> --
>>> Best regards,
>>> Daniel Dekany
>>>
>>>
>>
>
Tue, 2011-02-08, 11:37
#5
Re: Linking to methods in Scaladoc 2: not supported?
On 08/02/2011 00:21, Daniel Dekany wrote:
> You can't link to methods in Scaladoc 2, right? I tried
> [[com.example.Class#method]], [[com.example.Class.method]],
> [[com.example.Class.method()]] etc., and they just end up being plain
> text in the HTML. Other projects that I have looked at either didn't
> have links to methods or just used instead of [[...]].
>
> What I find rather strange is that there is no buzz regarding this...
> or Google (and Trac) hates me. So what's up with this? Am I the only
> one who thinks it's a fundamental limitation? Any hope it will be
> fixed anytime soon, or is it some deeper problem with Scaladoc 2?
http://scala-programming-language.1934581.n4.nabble.com/A-criticism-of-S...
"The link to Scala classes like [[scala.collection.Set]] doesn't work (links to sites work)."
"I don't know if I must open one or several Trac tickets..."
Still waiting for an answer...
Tue, 2011-02-08, 13:07
#6
Re: Re: Linking to methods in Scaladoc 2: not supported?
Tuesday, February 8, 2011, 10:36:44 AM, Philippe Lhoste wrote:
> On 08/02/2011 00:21, Daniel Dekany wrote:
>> You can't link to methods in Scaladoc 2, right? I tried
>> [[com.example.Class#method]], [[com.example.Class.method]],
>> [[com.example.Class.method()]] etc., and they just end up being plain
>> text in the HTML. Other projects that I have looked at either didn't
>> have links to methods or just used instead of [[...]].
>>
>> What I find rather strange is that there is no buzz regarding this...
>> or Google (and Trac) hates me. So what's up with this? Am I the only
>> one who thinks it's a fundamental limitation? Any hope it will be
>> fixed anytime soon, or is it some deeper problem with Scaladoc 2?
>
> http://scala-programming-language.1934581.n4.nabble.com/A-criticism-of-S...
>
> "The link to Scala classes like [[scala.collection.Set]] doesn't work (links to sites work)."
> "I don't know if I must open one or several Trac tickets..."
I suppose those should link to the API docs at http://scala-lang.org.
BTW, last night I have looked at VScalaDoc2 and noticed that it has
the same limitations regarding the links: links to methods (and to
scala-lang classes) will end up being plain text in the HTML output,
plus wrong links aren't reported. Maybe it builds on some of the
ScalaDoc2 API-s internally... I don't know.
> Still waiting for an answer...
It seems it's not just the Scala IDE support that needs a lot more
time to be there... I guess it's difficult to find a viable business
model that would support developing these things.
Thu, 2011-02-10, 00:37
#7
Re: Linking to methods in Scaladoc 2: not supported?
On 2/7/11 3:21 PM, Daniel Dekany wrote:
> You can't link to methods in Scaladoc 2, right? I tried
> [[com.example.Class#method]], [[com.example.Class.method]],
> [[com.example.Class.method()]] etc., and they just end up being plain
> text in the HTML. Other projects that I have looked at either didn't
> have links to methods or just used instead of [[...]].
At some point I implemented repl help where tab completion would open a
web page with the scaladoc of the class or method being completed upon.
At least, I implemented the part where a web page opens up, and then I
discovered I couldn't link to methods, so I shelved it.
However I never opened a ticket or anything so I don't have much
standing to complain. Unless it's already open. If it isn't open I bet
you know what to do.
It has been discussed. The major limitation of a simple solution would
be ignoring alternatives of multiple overloaded methods. Would you
mind opening a Trac enhancement request? Depending on the feedback
from EPFL guys I may provide a implementation.
Cheers,
PF
2011/2/7 Daniel Dekany :
> You can't link to methods in Scaladoc 2, right? I tried
> [[com.example.Class#method]], [[com.example.Class.method]],
> [[com.example.Class.method()]] etc., and they just end up being plain
> text in the HTML. Other projects that I have looked at either didn't
> have links to methods or just used instead of [[...]].
>
> What I find rather strange is that there is no buzz regarding this...
> or Google (and Trac) hates me. So what's up with this? Am I the only
> one who thinks it's a fundamental limitation? Any hope it will be
> fixed anytime soon, or is it some deeper problem with Scaladoc 2?
>
> (Not reporting wrong links is horrible too... but at least I see
> people complaining about that.)
>
> --
> Best regards,
> Daniel Dekany
>
>