scaladoc(1)

πŸ“¦
version 2.11.12 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– scaladoc β€” bestie edition πŸ’–

okay so this is the scaladoc(1) page, from the USER COMMANDS chapter, and it's literally the documentation generator for the Scala 2 language. no cap. let's get into it ✨


✨ NAME ✨

scaladoc β€” Documentation generator for the Scala 2 language πŸŽ€


🌸 SYNOPSIS 🌸

scaladoc [ <options> ] <source files>

πŸ¦‹ PARAMETERS πŸ¦‹

  • <options> β€” Command line options, bestie. See OPTIONS below πŸ‘‡
  • <source files> β€” One or more source files to be compiled (such as MyClass.scala). yes you need at least one, she's not gonna read your mind πŸ’…

πŸ‘‘ DESCRIPTION πŸ‘‘

The scaladoc tool reads class and object definitions, written in the Scala 2 programming language, and generates their API as HTML files. it's giving "turn my code into a whole website" and honestly? iconic.

By default, the generator puts each HTML file in the same directory as its source file. You can specify a separate destination directory with -d (see OPTIONS, below). so if you want your docs somewhere else, speak now or forever hold your peace 🫢

The recognised format of comments in source is described in the online documentation πŸ“š


πŸ’… OPTIONS πŸ’…

⭐ Standard Options ⭐

  • -d <directory> β€” Specify where to generate documentation. this is the one that decides where all your cute HTML files land πŸŽ€
  • -version β€” Print product version and exit. short and sweet, she says her version then dips πŸ’¨
  • -help β€” Print a synopsis of available options. your girl's got a menu and she's happy to share it ✨

🌈 Documentation Options 🌈

  • -doc-title <title> β€” Define the overall title of the documentation, typically the name of the library being documented. main character energy for your whole doc set πŸ‘‘
  • -doc-version <version> β€” Define the overall version number of the documentation, typically the version of the library being documented. slay, version it properly 🧚
  • -doc-source-url <url> β€” Define a URL to be concatenated with source locations for link to source files. yes, it literally just gets glued onto the source locations, that's the whole vibe πŸ”—
  • -doc-external-doc <external-doc> β€” Define a comma-separated list of classpath_entry_path#doc_URL pairs describing external dependencies. note the # in there, that's the separator, don't lose it πŸ’€

πŸ’€ Compiler Options πŸ’€

  • -verbose β€” Output messages about what the compiler is doing. she's gonna narrate her whole process, and honestly we love that for her πŸ™ˆ
  • -deprecation β€” Indicate whether source should be compiled with deprecation information; defaults to off (accepted values are: on, off, yes and no)

Available since Scala version 2.2.1

ok so the default is off, meaning if you don't say anything she's not gonna bother. and the accepted values are literally on, off, yes and no β€” pick one bestie 🌸
  • -classpath <path> β€” Specify where to find user class files (on Unix-based systems a colon-separated list of paths, on Windows-based systems, a semicolon-separate list of paths). This does not override the built-in ("boot") search path.

The default class path is the current directory. Setting the CLASSPATH variable or using the -classpath command-line option overrides that default, so if you want to include the current directory in the search path, you must include "." in the new settings.

lowkey the most important gotcha on this whole page: the moment you override the classpath, the default current-directory behaviour is gone. if you still want it in there you have to literally write "." yourself. no takebacks 🫠
  • -sourcepath <path> β€” Specify where to find input source files. where she goes looking for your .scala files πŸ”
  • -bootclasspath <path> β€” Override location of bootstrap class files (where to find the standard built-in classes, such as "scala.List"). this is the boot search path, and yeah she'll let you override it πŸ’…
  • -extdirs <dirs> β€” Override location of installed extensions.
  • -encoding <encoding> β€” Specify character encoding used by source files.

The default value is platform-specific (Linux: "UTF8", Windows: "Cp1252"). Executing the following code in the Scala interpreter will return the default value on your system:

scala> new java.io.InputStreamReader(System.in).getEncoding
so Linux defaults to "UTF8" and Windows defaults to "Cp1252", and if you wanna double check what YOUR machine is on, run that little snippet above in the Scala interpreter. she'll tell you the truth 🧚

πŸ”₯ EXIT STATUS πŸ”₯

scaladoc returns a zero exit status if it succeeds at processing the specified input files. Non zero is returned in case of failure.

so: 0 = we ate πŸ’…, anything else = we did not eat 😭


πŸ’œ AUTHORS πŸ’œ

This version of Scaladoc was written by Gilles Dubochet with contributions by Pedro Furlanetto and Johannes Rudolph. It is based on the original Scaladoc (Sean McDirmid, Geoffrey Washburn, Vincent Cremet and StΓ©phane Micheloud), on vScaladoc (David Bernard), as well as on an unreleased version of Scaladoc 2 (Manohar Jonnalagedda).

shoutout to the whole lineage fr fr, this tool has ancestors and they all deserve their flowers 🌸🌺🌷


🌟 SEE ALSO 🌟

fsc(1), scala(1), scalac(1), scalap(1)


and that's the whole page bestie!! this one's version 2.0, dated June 2010 β€” yeah she's vintage but she still serves πŸ’–βœ¨ go generate some docs, ily, bye πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from