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

LUCENE-9333: Add gradle task to compile changes.txt to a html #1468

Merged
merged 2 commits into from
Apr 30, 2020
Merged

LUCENE-9333: Add gradle task to compile changes.txt to a html #1468

merged 2 commits into from
Apr 30, 2020

Conversation

mocobeta
Copy link
Contributor

@mocobeta mocobeta commented Apr 29, 2020

Description

This PR adds "documentation" gradle task (equivalent of ant's "documentation") and its sub task "changesToHtml" (equivalent of ant's "changes-to-html" that compiles CHANGES.txt into Changes.html).

The output directories are lucene/build/documentation (for lucene) and solr/build/documentation (for solr). Those are not used by ant; ant outputs docs into lucene/build/docs and solr/build/docs.

"documentation" task is incomplete for now; please see the TODO comment.

Gradle command

# root project task that collects all sub tasks
$ ./gradlew documentation

or

# sub task for each project
$ ./gradlew :lucene:changesToHtml
$ ./gradlew :solr:changesToHtml

Tests

I checked md5 hash for the compiled Changes.html to verify the gradle task generates exact same file as ant (when version property is set to 9.0.0).

lucene-solr $ md5sum lucene/build/docs/changes/Changes.html  # generate by ant
e5ddb897e191915be0fe9f23bdd0edf0  lucene/build/docs/changes/Changes.html
lucene-solr $ md5sum lucene/build/documentation/changes/Changes.html  # generated by gradle
e5ddb897e191915be0fe9f23bdd0edf0  lucene/build/documentation/changes/Changes.html
lucene-solr $ md5sum solr/build/docs/changes/Changes.html  # generate by ant
0076f4eb251c44a0b6effc9d8e958cd9  solr/build/docs/changes/Changes.html
# Changes.html generated by gradle
lucene-solr $ md5sum solr/build/documentation/changes/Changes.html  # generated by gradle
0076f4eb251c44a0b6effc9d8e958cd9  solr/build/documentation/changes/Changes.html

Note about RDF processing

Not fully sure, but there is no equivalent gradle task for ant.xmlproperties as far as I know.
We could remove the ant call by writing our custom XPath processor which will be built on groovy's XmlSluper. I didn't do so here but just cloned the original Ant task. To me it would be preferable to replace the DOAP RDF with a JSON (or simply a CSV) instead of adding another XML processing code, if we want to completely drop the ant convention. ?

Copy link
Contributor

@dweiss dweiss left a comment

Choose a reason for hiding this comment

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

Looks great to me. Thank you for ensuring the generated file is the same! Ant's xmlproperty can stay in - this can be cleaned up after ant counterpart is removed.

@mocobeta
Copy link
Contributor Author

Thanks, I will merge it to upstream soon.

@mocobeta mocobeta merged commit 5354f7e into apache:master Apr 30, 2020
MarcusSorealheis added a commit to MarcusSorealheis/lucene-solr that referenced this pull request Apr 30, 2020
* upstream/master:
  SOLR-14237: Fix HDFS nightly test failure
  LUCENE-9278: concatenate paths for sourcepath using path separator rather than whitespace (which causes invalid option to be passed to javadoc).
  LUCENE-9333: Add gradle task to compile changes.txt to a html (apache#1468)
  update CHANGES for apache#807
  Fix tests to survive nightly runs with many documents
  SOLR-14173: Don't use JQuery-Slim as it breaks the sidebar sub-menu system.
  SOLR-14237: A new panel with security info in admin UI's dashboard
  SOLR-14237: A new panel with security info in admin UI's dashboard
  LUCENE-7788: fail precommit on unparameterised log messages and examine for wasted work/objects
  SOLR-14173: Change left nav item highlighting to fix menu jumpiness when hovering/selecting
  LUCENE-9349: TermInSetQuery should use consumeMatchingTerms in visit() (apache#1465)
  LUCENE-9089: update FST usage example
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.

2 participants