Skip to content
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

Issue #14759: Enhanced cmdline options documentation by tabular format #14799

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MANISH-K-07
Copy link
Contributor

Aims to close #14759

WIP ....

@MANISH-K-07

This comment was marked as duplicate.

@MANISH-K-07 MANISH-K-07 force-pushed the tableDocs branch 2 times, most recently from 21b1d74 to 9796faf Compare April 16, 2024 12:49
@MANISH-K-07

This comment was marked as duplicate.

@MANISH-K-07

This comment was marked as duplicate.

@MANISH-K-07
Copy link
Contributor Author

MANISH-K-07 commented Apr 16, 2024

The anchors are working just as suggested at #14759 (comment)

Not yet sure why the test is unable to read option -c description from doc. (failure)
Looking into it....

@MANISH-K-07 MANISH-K-07 marked this pull request as ready for review April 17, 2024 12:53
@MANISH-K-07
Copy link
Contributor Author

@romani , @rnveach , @nrmancuso , any thoughts on this ?

@nrmancuso
Copy link
Member

@romani , @rnveach , @nrmancuso , any thoughts on this ?

The table looks great, let's make CI happy

@MANISH-K-07
Copy link
Contributor Author

let's make CI happy

Still trying to debug why the -c option node is not being read despite the fact that it is available in the table :(

@MANISH-K-07
Copy link
Contributor Author

@romani , @nrmancuso ,
I am having a bit of trouble debugging the test file. Could you please help me with why the firstChild is not being mapped?

@@ -49,7 +49,8 @@ public void validateCliDocSections() throws Exception {
final Map<String, String> cmdDesc = new HashMap<>();

final NodeList sections = getSectionsFromXdoc("src/xdocs/cmdline.xml.vm");
final Set<String> cmdOptions = getListById(sections.item(2), "CLI_Options");
final Set<String> cmdOptions =
getListById(sections.item(2), "Command_line_usage_Command_line_options");
Copy link
Member

Choose a reason for hiding this comment

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

What is 2 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nrmancuso , 2 is the section index of the XML (considering 0-based), I believe.

  1. Content
  2. Description
  3. Command Line Usage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nrmancuso , could you please assign this PR to yourself.

Copy link
Member

Choose a reason for hiding this comment

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

@nrmancuso , could you please assign this PR to yourself.

No need to assign reviewers until CI is green. CI is the first reviewer :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No need to assign reviewers until CI is green. CI is the first reviewer :)

Got it @nrmancuso , please see #14799 (comment).

I seem to be falling short on what I'm missing while debug 😕
Theoretically, the siblings are read only after firstChild is mapped and so on, but not sure why this (-c) is being skipped and continued to next node.

Copy link
Member

@romani romani May 11, 2024

Choose a reason for hiding this comment

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

This PR changes xml a lot, but test that does selection from this xml is not changed. getListById should be changed a bit.

Copy link
Member

Choose a reason for hiding this comment

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

It use to be:

<ul id="CLI_Options">
        <li>
          <code>-c

Becomes a way more complicated and different:

....
<tbody>
              <tr>
                <td>
                  <a name="c"/>
                  <a href="#c">
                    <strong>-c</strong> configurationFile
                  </a>

So getListById should be rewritten.
@MANISH-K-07 , do need help to write a code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will look into it at the earliest @romani

@nrmancuso nrmancuso removed their request for review April 20, 2024 13:24
@romani
Copy link
Member

romani commented May 11, 2024

@MANISH-K-07 , please help to finish this PR

@MANISH-K-07
Copy link
Contributor Author

@MANISH-K-07 , please help to finish this PR

#14799 (comment) still no thought on this..

@romani
Copy link
Member

romani commented May 11, 2024

[ERROR] CliOptionsXdocsSyncTest.validateCliDocSections:75 CLI Option: -c present in Main.java but not documented in cmdline.xml.vm
expected not to be: null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance Command Line documentation by organizing options in Tabular format
3 participants