Skip to content

8344056: Use markdown format for man pages #22081

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

Closed
wants to merge 9 commits into from

Conversation

magicus
Copy link
Member

@magicus magicus commented Nov 13, 2024

Currently, the man pages are stored as troff (a text format) in the open repo, and a content-wise identical copy is stored as markdown (another text format) in the closed repo.

Since markdown is preferred to troff in terms of editing, we make changes to the man pages in markdown and then convert it to troff.

This closed-markdown to open-troff processing needs to be done manually by an Oracle engineer. This is done regularly at the start and end of a new release cycle, adding to the burden of creating a new release. It is also done (if any of the reviewers knows about the process) whenever an Oracle engineer updates a man page. If a community contributor changes the behavior of a tool, an Oracle engineer needs to change the documentation for them, since they cannot do it themselves.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8344056: Use markdown format for man pages (Bug - P3)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22081/head:pull/22081
$ git checkout pull/22081

Update a local copy of the PR:
$ git checkout pull/22081
$ git pull https://git.openjdk.org/jdk.git pull/22081/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22081

View PR using the GUI difftool:
$ git pr show -t 22081

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22081.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 13, 2024

👋 Welcome back ihse! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 13, 2024

@magicus This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8344056: Use markdown format for man pages

Reviewed-by: cstein, iris, dholmes

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 84 new commits pushed to the master branch:

  • 80e37a9: 8344265: RISC-V: Remove unused function get_previous_sp_entry
  • e1c4b49: 8343237: Improve the copying of the available set of Currencies
  • 41a627b: 8343876: Enhancements to jpackage test lib
  • aa10ec7: 8343123: Nimbus: javax/swing/JInternalFrame/bug6726866.java does not have green undecorated window
  • fec0d1c: 8343777: Add since checker tests to Internationalisation modules
  • d0b770c: 8344289: SM cleanup in jdk.internal.util
  • a91d4c0: 8344233: Remove calls to SecurityManager and doPrivileged in java.net.ProxySelector and sun.net.spi.DefaultProxySelector after JEP 486 integration
  • d2e4b51: 8344186: Cleanup sun.net.www.MimeTable after JEP 486 integration
  • da40388: 8344315: Clean up sun.net.www.protocol.jrt.JavaRuntimeURLConnection after JEP 486 integration
  • 2c509a1: 8344326: Move jpackage tests from "jdk.jpackage.tests" package to the default package
  • ... and 74 more: https://git.openjdk.org/jdk/compare/7be77725eab6f45d8f8d23f2ba0d18d2d89a40aa...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk
Copy link

openjdk bot commented Nov 13, 2024

@magicus The following labels will be automatically applied to this pull request:

  • build
  • client
  • compiler
  • core-libs
  • hotspot-jfr
  • javadoc
  • kulla
  • net
  • security
  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added javadoc javadoc-dev@openjdk.org serviceability serviceability-dev@openjdk.org security security-dev@openjdk.org build build-dev@openjdk.org client client-libs-dev@openjdk.org core-libs core-libs-dev@openjdk.org net net-dev@openjdk.org compiler compiler-dev@openjdk.org kulla kulla-dev@openjdk.org hotspot-jfr hotspot-jfr-dev@openjdk.org labels Nov 13, 2024
@jonathan-gibbons
Copy link
Contributor

jonathan-gibbons commented Nov 13, 2024

Without looking in detail at the changes, this is indeed a welcome and long-overdue change!

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 13, 2024
@mlbridge
Copy link

mlbridge bot commented Nov 13, 2024

Webrevs

@kevinjwalls
Copy link
Contributor

I think this means the one-true-master copy of a man page is now the public .md file.
All contributors can now change and improve man pages, and would be expected to make necessary man page updates when making other changes.
(Which is great, I just didn't see it being explicitly said.)

@sormuras
Copy link
Member

sormuras commented Nov 13, 2024

So glad to see progress here!

return findRootDir().resolve("src/jdk.javadoc/share/man/javadoc.1");

should read return findRootDir().resolve("src/jdk.javadoc/share/man/javadoc.md"); now.

If only one could suggest changes in files not touched by a pull request: https://github.com/orgs/community/discussions/9099

@jonathan-gibbons
Copy link
Contributor

jonathan-gibbons commented Nov 13, 2024

I think this means the one-true-master copy of a man page is now the public .md file. All contributors can now change and improve man pages, and would be expected to make necessary man page updates when making other changes. (Which is great, I just didn't see it being explicitly said.)

Yes, related:
Non-trivial updates to these pages should be approved in a CSR, maybe along with any code changes that may make such an update necessary.

Also related:
Note the format is that supported by pandoc, as embodied in the build system. In particular, definition lists are used quite heavily in these pages, which may not be supported in live previews provided by an IDE. As with any doc change, authors/editors are strongly encouraged to review the generated form of any pages that are being edited.

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to finally see this happen!

Just one glitch with the GPL headers.

Thanks

Copy link
Member

@sormuras sormuras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A missing .1 to .md file extension change in javadoc's manpage self-test CheckManPageOptions.java is causing the CI to fail.

Details in #22081 (comment)

Copy link
Member

@dfuch dfuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The jwebserver.md looks OK to me.

@sormuras
Copy link
Member

Now CheckManPageOptions finds the .md file (good) and its checks fail (bad). A candidate for an ignore list as fixing it is out of scope of this PR?

@magicus
Copy link
Member Author

magicus commented Nov 14, 2024

Now CheckManPageOptions finds the .md file (good) and its checks fail (bad).

sigh

A candidate for an ignore list as fixing it is out of scope of this PR?

Let me have a look at it first. It seems the test has the indention to handle markdown files, so maybe there is an easy fix.

Copy link
Member

@irisclark irisclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating all the licenses to GPL.

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 15, 2024
@dholmes-ora
Copy link
Member

Now CheckManPageOptions finds the .md file (good) and its checks fail (bad).

sigh

A candidate for an ignore list as fixing it is out of scope of this PR?

Let me have a look at it first. It seems the test has the indention to handle markdown files, so maybe there is an easy fix.

I'm somewhat surprised that the full src tree is available to this test when it runs. I was expecting it to examine the .1 files in the JDK image.

@magicus
Copy link
Member Author

magicus commented Nov 15, 2024

The CheckManPageOptions test had regexps that were not up to date with the latest changes in the markdown file. I fixed those and now the test passes.

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Nov 15, 2024
@magicus
Copy link
Member Author

magicus commented Nov 15, 2024

@dholmes-ora

I was expecting it to examine the .1 files in the JDK image.

It's been like that since the test was created in https://bugs.openjdk.org/browse/JDK-8274211, so there is no change in this PR.

@magicus magicus requested a review from dholmes-ora November 15, 2024 18:21
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Nov 18, 2024
@magicus
Copy link
Member Author

magicus commented Nov 18, 2024

/integrate

@openjdk
Copy link

openjdk bot commented Nov 18, 2024

Going to push as commit 475feb0.
Since your change was applied there have been 90 commits pushed to the master branch:

  • 6c2ae44: 8344204: IGV: Button to enable/disable cutting of long edges
  • 4a7ce1d: 8344205: [PPC]: failing assertion: sharedRuntime_ppc.cpp:1652: cookie not found
  • b6c2122: 8316151: [macos14] ActionListenerCalledTwiceTest.java fails on macOS 14
  • 543e355: 8344298: Test tools/sincechecker/modules/jdk.hotspot.agent/JdkHotspotAgentCheckSince.java fails on platforms without sa
  • 92b2631: 8327652: S390x: Implements SLP support
  • a47d9ba: 8344349: Problemlist jdk/jfr/jvm/TestVirtualThreadExclusion.java before JDK-8344199 resolved
  • 80e37a9: 8344265: RISC-V: Remove unused function get_previous_sp_entry
  • e1c4b49: 8343237: Improve the copying of the available set of Currencies
  • 41a627b: 8343876: Enhancements to jpackage test lib
  • aa10ec7: 8343123: Nimbus: javax/swing/JInternalFrame/bug6726866.java does not have green undecorated window
  • ... and 80 more: https://git.openjdk.org/jdk/compare/7be77725eab6f45d8f8d23f2ba0d18d2d89a40aa...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Nov 18, 2024
@openjdk openjdk bot closed this Nov 18, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 18, 2024
@openjdk
Copy link

openjdk bot commented Nov 18, 2024

@magicus Pushed as commit 475feb0.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@magicus magicus deleted the open-markdown-man-pages branch November 18, 2024 09:25
@eirbjo
Copy link
Contributor

eirbjo commented Nov 19, 2024

Is the warning log when pandoc is not installed a bit loud?

% make images
Building target 'images' in configuration 'macosx-x86_64-server-release'
Warning: pandoc not found. Not generating man pages
Warning: pandoc not found. Not generating man pages
Warning: pandoc not found. Not generating man pages
Warning: pandoc not found. Not generating man pages
Warning: pandoc not found. Not generating man pages
Warning: pandoc not found. Not generating man pages
Warning: pandoc not found. Not generating man pages
Warning: pandoc not found. Not generating man pages
Warning: pandoc not found. Not generating man pages
Warning: pandoc not found. Not generating man pages
Warning: pandoc not found. Not generating man pages
Warning: pandoc not found. Not generating man pages
Warning: pandoc not found. Not generating man pages
Warning: pandoc not found. Not generating man pages
Warning: pandoc not found. Not generating man pages
Warning: pandoc not found. Not generating man pages
Warning: pandoc not found. Not generating man pages
Finished building target 'images' in configuration 'macosx-x86_64-server-release'

@magicus
Copy link
Member Author

magicus commented Nov 20, 2024

@eirbjo Yes, that was not intentional. https://bugs.openjdk.org/browse/JDK-8344559.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org client client-libs-dev@openjdk.org compiler compiler-dev@openjdk.org core-libs core-libs-dev@openjdk.org hotspot-jfr hotspot-jfr-dev@openjdk.org integrated Pull request has been integrated javadoc javadoc-dev@openjdk.org kulla kulla-dev@openjdk.org net net-dev@openjdk.org security security-dev@openjdk.org serviceability serviceability-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

8 participants