Skip to content

8373922: Enhance Taglet API to support relative URLs#30120

Closed
hns wants to merge 9 commits intoopenjdk:masterfrom
hns:JDK-8373922
Closed

8373922: Enhance Taglet API to support relative URLs#30120
hns wants to merge 9 commits intoopenjdk:masterfrom
hns:JDK-8373922

Conversation

@hns
Copy link
Copy Markdown
Member

@hns hns commented Mar 6, 2026

Please review an enhancement that adds a new default toString method to the jdk.javadoc.doclet.Taglet interface which receives the path to the documentation root directory as additional argument of type java.net.URI. (The initial version of this PR used java.nio.file.Path which was of course a blunder as that class uses a platform-dependent separator.)

This makes it possible to create correct relative URLs when a tag is rendered outside of its element's resource (such as in a summary page), which was previously impossible using the public Taglet API. It also makes it easier to build relative URLs in the common case where a tag is rendered in its element's normal location.

I also added the changes for JDK-8379520 to make use of the new API in JDK build Taglets to this PR. The changes to the JSpec and ToolGuide taglets consist in undoing the changes from JDK-8373909 and replacing it with the new functionality.

For SealedGraph it's a bit more involved, because in order to be able to use the pathToRoot URI I had to change the naming of .svg files for nested classes to not use subdirectories for enclosing classes so that these files use the same directory as all the other files from that package.



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
  • Change requires CSR request JDK-8375025 to be approved

Issues

  • JDK-8373922: Enhance Taglet API to support relative URLs (Enhancement - P4)
  • JDK-8379520: Make use of new Taglet.toString method in JDK build taglets (Task - P4)
  • JDK-8375025: Enhance Taglet API to support relative URLs (CSR)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 30120

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Mar 6, 2026

👋 Welcome back hannesw! 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
Copy Markdown

openjdk bot commented Mar 6, 2026

@hns 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:

8373922: Enhance Taglet API to support relative URLs
8379520: Make use of new Taglet.toString method in JDK build taglets

Reviewed-by: liach

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 12 new commits pushed to the master branch:

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 openjdk bot added csr Pull request needs approved CSR before integration javadoc javadoc-dev@openjdk.org labels Mar 6, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 6, 2026

@hns The following label will be automatically applied to this pull request:

  • javadoc

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

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 6, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge bot commented Mar 6, 2026

Webrevs

@liach
Copy link
Copy Markdown
Member

liach commented Mar 6, 2026

Can we remove the hack used by JSpec taglet as a POC of this new API? Or do you plan to do in a later RFE?

@hns
Copy link
Copy Markdown
Member Author

hns commented Mar 9, 2026

@liach I've filed a separate issue JDK-8379520 for the Taglet cleanup, but I'm adding the changes to this PR as I think it's good to see the new API in use. I can move it to a separate PR if necessary.

@hns
Copy link
Copy Markdown
Member Author

hns commented Mar 9, 2026

/issue add JDK-8379520

@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 9, 2026

@hns
Adding additional issue to issue list: 8379520: Make use of new Taglet.toString method in JDK build taglets.

@openjdk openjdk bot added the build build-dev@openjdk.org label Mar 9, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Mar 9, 2026

@hns build has been added to this pull request based on files touched in new commit(s).

Copy link
Copy Markdown
Member

@liach liach left a comment

Choose a reason for hiding this comment

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

Great!

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper bot commented Apr 7, 2026

@hns This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply issue a /touch or /keepalive command to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 15, 2026

@hns this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout JDK-8373922
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added merge-conflict Pull request has merge conflict with target branch and removed rfr Pull request is ready for review labels Apr 15, 2026
@hns
Copy link
Copy Markdown
Member Author

hns commented Apr 15, 2026

/template append

@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 15, 2026

@hns The pull request template has been appended to the pull request body

@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 15, 2026
@openjdk openjdk bot removed merge-conflict Pull request has merge conflict with target branch csr Pull request needs approved CSR before integration labels Apr 15, 2026
@hns hns requested a review from liach April 16, 2026 06:45
@hns
Copy link
Copy Markdown
Member Author

hns commented Apr 16, 2026

@liach could you please re-approve this PR?
The changes since your first review are changes to the doc comment due to CSR review, and merging of your changes to SealedGraph taglet.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Apr 16, 2026
@hns
Copy link
Copy Markdown
Member Author

hns commented Apr 16, 2026

Thanks!

/integrate

@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 16, 2026

Going to push as commit 35ad47b.
Since your change was applied there have been 13 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Apr 16, 2026
@openjdk openjdk bot closed this Apr 16, 2026
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 16, 2026
@openjdk
Copy link
Copy Markdown

openjdk bot commented Apr 16, 2026

@hns Pushed as commit 35ad47b.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build build-dev@openjdk.org integrated Pull request has been integrated javadoc javadoc-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

2 participants