Lucene - Core
  1. Lucene - Core
  2. LUCENE-4944

changes2html.pl does not detect duplicate sections in the changes.txt

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.2
    • Fix Version/s: 4.3.1
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      When reviewing the release artifacts of Lucene 4.3, I noticed that CHANGES.txt contains a section "api changes" 2 times. The changes2html converter should maybe complain about that and fail the build. Otherwise the generated HTML contains the same anchor element two times for one release and the open/close logic breaks (it only open/closes the first one, although you click on the second one).

        Activity

        Hide
        Shalin Shekhar Mangar added a comment -

        Bulk closing after 4.3.1 release

        Show
        Shalin Shekhar Mangar added a comment - Bulk closing after 4.3.1 release
        Hide
        Shalin Shekhar Mangar added a comment -

        Back ported to 4.3.1 r1483377 and r1483379.

        Show
        Shalin Shekhar Mangar added a comment - Back ported to 4.3.1 r1483377 and r1483379.
        Hide
        Steve Rowe added a comment -

        If there are no objections, I'd like to backport this to 4.3.1.

        Show
        Steve Rowe added a comment - If there are no objections, I'd like to backport this to 4.3.1.
        Hide
        Steve Rowe added a comment -

        This is covered now I think - thanks Mike for adding the smoke test check.

        Show
        Steve Rowe added a comment - This is covered now I think - thanks Mike for adding the smoke test check.
        Hide
        Steve Rowe added a comment -

        I committed a change to changes2html.pl that produces the following message when I revert trunk lucene/CHANGES.txt to just before Hoss removed the duplicate 'API Changes' section under the 4.3.0 release:

        Buildfile: /Users/sarowe/svn/lucene/dev/trunk/lucene/build.xml

        changes-to-html:
        [get] Getting: https://issues.apache.org/jira/rest/api/2/project/LUCENE
        [get] To: /Users/sarowe/svn/lucene/dev/trunk/lucene/build/docs/changes/jiraVersionList.json
        [exec] Section 'API Changes' appears more than once under release '4.3.0' at /Users/sarowe/svn/lucene/dev/trunk/lucene/site/changes/changes2html.pl line 128.

        BUILD FAILED
        /Users/sarowe/svn/lucene/dev/trunk/lucene/build.xml:552: The following error occurred while executing this line:
        /Users/sarowe/svn/lucene/dev/trunk/lucene/common-build.xml:2073: exec returned: 255

        I also included a change to prepend 'v' to all section id attributes, e.g.

        <h2><a id="v5.0.0" href="javascript:toggleList('v5.0.0')">Release 5.0.0 </a></h2>
        
        Show
        Steve Rowe added a comment - I committed a change to changes2html.pl that produces the following message when I revert trunk lucene/CHANGES.txt to just before Hoss removed the duplicate 'API Changes' section under the 4.3.0 release: Buildfile: /Users/sarowe/svn/lucene/dev/trunk/lucene/build.xml changes-to-html: [get] Getting: https://issues.apache.org/jira/rest/api/2/project/LUCENE [get] To: /Users/sarowe/svn/lucene/dev/trunk/lucene/build/docs/changes/jiraVersionList.json [exec] Section 'API Changes' appears more than once under release '4.3.0' at /Users/sarowe/svn/lucene/dev/trunk/lucene/site/changes/changes2html.pl line 128. BUILD FAILED /Users/sarowe/svn/lucene/dev/trunk/lucene/build.xml:552: The following error occurred while executing this line: /Users/sarowe/svn/lucene/dev/trunk/lucene/common-build.xml:2073: exec returned: 255 I also included a change to prepend 'v' to all section id attributes, e.g. <h2> <a id= "v5.0.0" href= "javascript:toggleList('v5.0.0')" > Release 5.0.0 </a> </h2>
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] sarowe
        http://svn.apache.org/viewvc?view=revision&revision=1470092

        LUCENE-4944: Prepend 'v' to (currently numeric) id attributes for release sections, and fail with a nice message when encountering the same section more than once within a single release. (merged trunk r1470088)

        Show
        Commit Tag Bot added a comment - [branch_4x commit] sarowe http://svn.apache.org/viewvc?view=revision&revision=1470092 LUCENE-4944 : Prepend 'v' to (currently numeric) id attributes for release sections, and fail with a nice message when encountering the same section more than once within a single release. (merged trunk r1470088)
        Hide
        Commit Tag Bot added a comment -

        [trunk commit] sarowe
        http://svn.apache.org/viewvc?view=revision&revision=1470088

        LUCENE-4944: Prepend 'v' to (currently numeric) id attributes for release sections, and fail with a nice message when encountering the same section more than once within a single release.

        Show
        Commit Tag Bot added a comment - [trunk commit] sarowe http://svn.apache.org/viewvc?view=revision&revision=1470088 LUCENE-4944 : Prepend 'v' to (currently numeric) id attributes for release sections, and fail with a nice message when encountering the same section more than once within a single release.
        Hide
        Commit Tag Bot added a comment -

        [trunk commit] mikemccand
        http://svn.apache.org/viewvc?view=revision&revision=1469966

        LUCENE-4944: smoke tester detects duplicate sections in changes.html

        Show
        Commit Tag Bot added a comment - [trunk commit] mikemccand http://svn.apache.org/viewvc?view=revision&revision=1469966 LUCENE-4944 : smoke tester detects duplicate sections in changes.html
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] mikemccand
        http://svn.apache.org/viewvc?view=revision&revision=1469965

        LUCENE-4944: smoke tester detects duplicate sections in changes.html

        Show
        Commit Tag Bot added a comment - [branch_4x commit] mikemccand http://svn.apache.org/viewvc?view=revision&revision=1469965 LUCENE-4944 : smoke tester detects duplicate sections in changes.html
        Hide
        Michael McCandless added a comment -

        Alternatively, smokeTester could look for this. It might be cleaner than doing it in changes2html.pl

        I'll add this to smokeTester ...

        Show
        Michael McCandless added a comment - Alternatively, smokeTester could look for this. It might be cleaner than doing it in changes2html.pl I'll add this to smokeTester ...
        Hide
        Steve Rowe added a comment -

        Maybe we should fix this, too (to make it valid HTML). All anchors begin with version number, it may be the best to add a "v" in front.

        Thanks Uwe, I didn't realize that, adding "v" in front is a good idea. I'll work on this, and on detecting multiple same-named sections per-release, in changes2html.pl.

        Show
        Steve Rowe added a comment - Maybe we should fix this, too (to make it valid HTML). All anchors begin with version number, it may be the best to add a "v" in front. Thanks Uwe, I didn't realize that, adding "v" in front is a good idea. I'll work on this, and on detecting multiple same-named sections per-release, in changes2html.pl.
        Hide
        Uwe Schindler added a comment -

        I have a firefox browser with the HTMLTidy plugin, it complains about the duplicate attribute, but also:

        ID and NAME must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

        Maybe we should fix this, too (to make it valid HTML). All anchors begin with version number, it may be the best to add a "v" in front.

        Show
        Uwe Schindler added a comment - I have a firefox browser with the HTMLTidy plugin, it complains about the duplicate attribute, but also: ID and NAME must begin with a letter ( [A-Za-z] ) and may be followed by any number of letters, digits ( [0-9] ), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). Maybe we should fix this, too (to make it valid HTML). All anchors begin with version number, it may be the best to add a "v" in front.
        Hide
        Robert Muir added a comment -

        The JTidy integration is not perfect. if you look at jtidy-macro in common-build.xml you will see a big TODO.

        Basically we just use the built-in ant-task. I struggled getting it to work at all... it could use another pass.

        Show
        Robert Muir added a comment - The JTidy integration is not perfect. if you look at jtidy-macro in common-build.xml you will see a big TODO. Basically we just use the built-in ant-task. I struggled getting it to work at all... it could use another pass.
        Hide
        Uwe Schindler added a comment -

        It is strange that JTidy does not already detect this bug! The resulting HTML has multiple identical "id=" attributes, and that clearly violates the HTML spec. Maybe we miss a option enforcing this in the JTidy ANT target? Making JTidy fail would be the simpliest and most logical thing to do.

        Show
        Uwe Schindler added a comment - It is strange that JTidy does not already detect this bug! The resulting HTML has multiple identical "id=" attributes, and that clearly violates the HTML spec. Maybe we miss a option enforcing this in the JTidy ANT target? Making JTidy fail would be the simpliest and most logical thing to do.
        Hide
        Robert Muir added a comment -

        Alternatively, smokeTester could look for this. It might be cleaner than doing it in changes2html.pl

        Show
        Robert Muir added a comment - Alternatively, smokeTester could look for this. It might be cleaner than doing it in changes2html.pl

          People

          • Assignee:
            Unassigned
            Reporter:
            Uwe Schindler
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development