Skip to content

Latest commit

 

History

History
84 lines (72 loc) · 7.46 KB

scaladoc-settings-compatibility.md

File metadata and controls

84 lines (72 loc) · 7.46 KB
titletypedescriptionnumprevious-pagenext-page
Scaladoc settings compatibility between Scala2 and Scala3
section
This chapter lists all the scaladoc options for Scala 2 and Scala 3, and explains the relations between them.
26
options-new
plugin-intro

The current page is stating the status of scaladoc settings. The related Github issue can be found here for discussion

Scala2Scala3DescriptionCommentIs implemented?
-doc-format_Selects in which format documentation is rendered.Actually, old scaladoc supports only html, so it is in some way consistent with new scaladoc, which provides only html
-doc-title-projectThe overall name of the Scaladoc siteAliased in #11965
-doc-version-project-versionAliased in #11965
-doc-footer-project-footerA footer on every Scaladoc page, by default the EPFL/Lightbend copyright notice. Can be overridden with a custom footer.Fixed by #11965
-doc-no-compile_A directory containing sources which should be parsed for docstrings without compiling (e.g. AnyRef.scala)We don't need this as we have completely different approach to that issue using -Ydocument-synthetic-types flag for synthetic types
-doc-source-url-source-linksA URL pattern used to link to the source file, with some variables supported...Scala3 implementation provides richer syntax. You can find migration steps below this table.
-doc-external-doc-external-mappingsLinks describing locations of external dependencies' documentations.Scala3 implementation provides richer syntax. You can find migration steps below this table.
-jdk-api-doc-base-external-mappingsURL used to link Java API references.You can specify jdk via -external-mappings since they are generalized setting. You can find migration steps below this table
-doc-generator_The fully qualified name of a doclet class, which will be used to generate the documentation.We don't need this in Scala3
-doc-root-content-doc-root-contentThe file from which the root package documentation should be imported.
-implicits_We don't need this in Scala3 - Contextual extension methods are always documented in Scala 3
-implicits-debug_We don't need this in Scala3
-implicits-show-all_We don't need this in Scala3
-implicits-sound-shadowing_We don't need this in Scala3
-implicits-hide_We don't need this in Scala3
-diagrams_We don't need this in Scala3
-diagrams-debug_We don't need this in Scala3
-diagrams-dot-path_We don't need this in Scala3
-diagrams-max-classes_We don't need this in Scala3
-diagrams-max-implicits_We don't need this in Scala3
-diagrams-dot-timeout_We don't need this in Scala3
-diagrams-dot-restart_We don't need this in Scala3
-author-authorFixed by #11965
-raw-output_We don't need this in Scala3
-no-prefixes_We don't need this in Scala3
-skip-packages-skip-packages
-no-link-warnings_Not implemented yet
-expand-all-types_Setting has been removed
-groups-groups
-no-java-comments_We don't need this in Scala3
-doc-canonical-base-url-doc-canonical-base-urlA base URL to use as prefix and add canonical URLs to all pages. The canonical URL may be used by search engines to choose the URL that you want people to see in search results. If unset no canonical URLs are generated.Fixed by #11965
-private-privateShow all types and members. Unless specified, show only public and protected types and members.Fixed by #11965
_-siterootWe don't backport it to old scaladocN/A
_-project-logoShould we backport it to the old scaladoc?N/A
_-comment-syntaxWe don't backport it to the old scaladocN/A
_-revisionShould we backport it to the old scaladoc?N/A
_-social-linksShould we backport it to the old scaladoc?N/A
_-skip-by-idWe don't backport it to the old scaladocN/A
_-skip-by-regexWe don't backport it to the old scaladocN/A
_-snippet-compiler-argsWe don't backport it to the old scaladocN/A
_-Ydocument-synthetic-typesDocuments intrinsic types e. g. Any, Nothing. Setting is useful only for stdlib

Source links

Source links are used to point to source code at some remote repository like github or bitbucket. Hopefully, the new syntax is almost superset of the old syntax. To migrate to the new scaladoc syntax, make sure that you don't use any of these variables: €{TPL_OWNER} or €{FILE_PATH_EXT}. Otherwise you have to rewrite your source link, using either other variables or you can use new syntax, about which you can read more in the [Scaladoc documentation]({% link _overviews/scala3-scaladoc/settings.md %}). Note that new syntax let you specify prefixes of your files paths to match specific url in case your sources are scattered in different directories or even different repositories.

External mappings

This setting is a generalized form of the old settings for javadoc/scaladoc.

Example external mapping is:

-external-mappings:.*scala.*::scaladoc3::https://scala-lang.org/api/3.x/,.*java.*::javadoc::https://docs.oracle.com/javase/8/docs/api/ 

A mapping is of the form '<regex>::[scaladoc3|scaladoc|javadoc]::<path>'. You can supply several mappings, separated by commas, as shown in the example.

Given that the old syntaxes were:

  • for scaladoc - prefix#url
  • for javadoc - just URL

one must take the regex that will match fq name (for javadoc, it can be wildcard like java.*), then concatenate it using double colons :: with one of the 3 available documentation formats, then again append :: and then provide url for where the extednal documentation is hosted.

close