LUCENE-10285: try to force ordering of internal tasks, in spite of making top-level wrapper dependencies. (#549)

This commit is contained in:
Dawid Weiss 2021-12-17 19:12:09 +01:00 committed by GitHub
parent 1e8b94a1bb
commit b48cac0206
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 3 deletions

View File

@ -150,11 +150,15 @@ configure(project(":lucene:analysis:common")) {
}
def generateUAX29URLEmailTokenizer = wrapWithPersistentChecksums(generateUAX29URLEmailTokenizerInternal, [ andThenTasks: ["spotlessJava", "spotlessJavaApply"] ])
// UAX29URLEmailTokenizerImpl.jflex includes: ASCIITLD.jflex
// so we make sure it is up to date. Also, make sure the ordering of internal
// tasks is enforced (just scheduling top-level wrappers doesn't mean their subtask graphs cannot be reordered).
configure (generateUAX29URLEmailTokenizer) {
// UAX29URLEmailTokenizerImpl.jflex includes: ASCIITLD.jflex
// so we make sure it is up to date.
dependsOn "generateTlds"
}
configure (generateUAX29URLEmailTokenizerInternal) {
mustRunAfter "generateTldsInternal"
}
task generateHTMLCharacterEntitiesInternal() {
def target = file('src/java/org/apache/lucene/analysis/charfilter/HTMLCharacterEntities.jflex')
@ -194,10 +198,13 @@ configure(project(":lucene:analysis:common")) {
}
def generateHTMLStripCharFilter = wrapWithPersistentChecksums(generateHTMLStripCharFilterInternal, [ andThenTasks: ["spotlessJava", "spotlessJavaApply"] ])
// HTMLStripCharFilter.jflex includes HTMLCharacterEntities.jflex so we make sure it's up to date.
configure(generateHTMLStripCharFilter) {
// HTMLStripCharFilter.jflex includes HTMLCharacterEntities.jflex so we make sure it's up to date.
dependsOn "generateHTMLCharacterEntities"
}
configure(generateHTMLStripCharFilterInternal) {
dependsOn "generateHTMLCharacterEntitiesInternal"
}
regenerate.dependsOn wrapWithPersistentChecksums(generateWikipediaTokenizerInternal, [ andThenTasks: ["spotlessJava", "spotlessJavaApply"] ]),
wrapWithPersistentChecksums(generateClassicTokenizerInternal, [ andThenTasks: ["spotlessJava", "spotlessJavaApply"] ]),