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
support non-fully-qualified type links in scaladoc comments #3695
Comments
Imported From: https://issues.scala-lang.org/browse/SI-3695?orig=1 |
@adriaanm said: |
@VladUreche said (edited on Jul 23, 2012 11:19:11 AM UTC): Quick crash course on using Scaladoc links
==========================================
- Links relative to the current template should work. Make sure to use fully qualified names
if the member is inherited into other templates or is inherited by implicit conversions (as
they will be expanded relative to the containing template)
Disambiguating terms and types: Prefix terms with '$' and types with '!' in case both names are in use:
- [[scala.collection.immutable.List!.apply class List's apply method]] and
- [[scala.collection.immutable.List$.apply object List's apply method]]
Disambiguating overloaded members: If a term is overloaded, you can indicate the first part of its signature followed by *:
- [[[scala.collection.immutable.List$.fill[A](Int)(?A):List[A]* Fill with a single parameter]]]
- [[[scala.collection.immutable.List$.fill[A](Int,Int)(?A):List[List[A]]* Fill with a two parameters]]]
Notes:
- you can use any number of matching square brackets to avoid interference with the signature
- you can use \. to escape dots in prefixes (don't forget to use * at the end to match the signature!)
- you can use \# to escape hashes, otherwise they will be considered as delimiters, like dots. Another crash course on links: [http://www.slideshare.net/VladUreche/scaladoc-reflection/17] |
Bruno Bieth (mustaghattack) said: As of scala 2.10.3 the following doesn't work for me: package a
class A {
def nice() {}
def nice(s: String) {
}
}
class B {
/**
* A link to [[A.nice(String)]]
* @see [[A.nice(String)]]
*/
def ooh() {
}
} I get methodlink.scala:10: warning: Could not find any member to link for "A.nice(String)".
/**
^
one warning found Are method links a work in progress? Should I fill a bug report? About the documentation.. Thanks |
@VladUreche said: Also, regarding the problem you're facing, did you try |
Bruno Bieth (mustaghattack) said: methodlink.scala:10: warning: Could not find any member to link for "A.nice(s:".
/**
^
one warning found |
Eric Pederson (ericacm) said: |
@VladUreche said: |
@VladUreche said:
|
@adriaanm said: The most important fields for planners: assignee, affected version, fix-by versions. Fix by backlog means we're not planning to work on this in the near future. |
Eric Pederson (ericacm) said: |
Bruno Bieth (mustaghattack) said: method-link.scala:10: warning: Could not find any member to link for "A.nice(String)".
/**
^
method-link.scala:18: warning: Could not find any member to link for "A.nice(s:".
/**
^
method-link.scala:26: warning: Could not find any member to link for "A.nice(s:String)".
/**
^
three warnings found |
Alan Johnson (acjohnson55) said: |
@VladUreche said: |
Alan Johnson (acjohnson55) said: Thanks! |
Any chance on progress here? |
@LDVSOFT in Scala 2, this is highly unlikely to ever be addressed by the core team. perhaps you or another volunteer would like to tackle it. in a Scala 3 context, you might look into whether Dottydoc and/or Tastydoc (see scala/scala3#7668) have the same limitation |
Given that scala has powerful imports, plus we can rename/alias types, it would be great if we could just use the same name/expression for types in scaladoc comments as we use in the code - rather than having to use fully qualified names in link.
e.g.
/** something [[List]] */
rather than
/** something [[scala.collection.immutable.List]] */
The text was updated successfully, but these errors were encountered: