Skip to content

Write javadoc comments using the markdown format #8371

@SamCarlberg

Description

@SamCarlberg

Java 23 added a markdown-based format for javadoc comments. This will require, at the very least, an infrastructure change to build with Java 25, which may prevent targeting the main branch.

Markdown is a simpler format, easier to read than HTML (especially javadoc's flavor of HTML with its special tags), and is consistent with common communication mediums like github comments, CD posts, and slack and discord messages.

For example, command v3's HTML documentation for Scheduler.run():

  /**
   * Updates the command scheduler. This will run operations in the following order:
   *
   * <ol>
   *   <li>Run sideloaded functions from {@link #sideload(Consumer)} and {@link
   *       #addPeriodic(Runnable)}
   *   <li>Update trigger bindings to queue and cancel bound commands
   *   <li>Queue default commands for mechanisms that do not have a queued or running command
   *   <li>Promote queued commands to the running set
   *   <li>For every command in the running set, mount and run that command until it calls {@link
   *       Coroutine#yield()} or exits
   * </ol>
   *
   * <p>This method is intended to be called in a periodic loop like {@link
   * TimedRobot#robotPeriodic()}
   */
  public void run() {

Could be written in markdown as:

  /// Updates the command scheduler. This will run operations in the following order:
  /// 
  /// 1. Run sideloaded functions from [#sideload(Consumer)] and [#addPeriodic(Runnable)]
  /// 2. Update trigger bindings to queue and cancel bound commands
  /// 3. Queue default commands for mechanisms that do not have a queued or running command
  /// 4. Promote queued commands to the running set
  /// 5. For every command in the running set, mount and run that command until it calls [Coroutine#yield()] or exits
  /// 
  /// This method is intended to be called in a periodic loop like [TimedRobot#robotPeriodic()]
  public void run() {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions