Skip to content

Comments

Bump jyjeanne/dita-ot-gradle from 2.8.2 to 2.8.4#664

Draft
infotexture wants to merge 2 commits intodevelopfrom
feature/dita-ot-gradle-283
Draft

Bump jyjeanne/dita-ot-gradle from 2.8.2 to 2.8.4#664
infotexture wants to merge 2 commits intodevelopfrom
feature/dita-ot-gradle-283

Conversation

@infotexture
Copy link
Member

Description

Upgrade jyjeanne/dita-ot-gradle to latest version v2.8.3

How Has This Been Tested?

Bump version in docs build script, run default dist task.

Signed-off-by: Roger Sheen <roger@infotexture.net>
@infotexture infotexture added the build Ant/Gradle build scripts & CI/CD issues label Feb 1, 2026
@infotexture
Copy link
Member Author

@jyjeanne Tested the new version with our docs build, still see unexpected errors that don't appear when running builds via the dita command (without the Gradle plug-in):

Errors: 4
    Processing file:/…/docs/topics/error-messages-details.xml to file:/…/docs/build/dita-temp/[hash1].xml
    Processing file:/…/docs/topics/error-messages.xml to file:/…/docs/build/dita-temp/[hash2].xml
    [ERROR] SVG graphic could not be built. Reason: org.apache.batik.bridge.BridgeException: 
        file:/…/docs/build/dita-temp/:-1
    org.apache.batik.bridge.BridgeException: file:/…/docs/build/dita-temp/:-1

The ones about the error-messages files also appeared with the previous version of the plug-in.

Could be an issue with the log parsing, perhaps related to the word "error" in the filenames.

The SVG one seems new, but this may be related to recent changes in DITA-OT 4.4.

Maybe FOP writes different messages to the log now?

@jyjeanne
Copy link
Contributor

jyjeanne commented Feb 7, 2026

@infotexture The false positive errors reported in the transformation report have been fixed in dita-ot-gradle v2.8.4.

What changed

The error detection logic has been rewritten to use DITA-OT structured message codes only
([PREFIX][NUMBER][SEVERITY]). The plugin now parses the severity suffix (I=Info, W=Warning, E=Error, F=Fatal) instead
of matching the word "error" anywhere in the log output.

This fixes all 3 reported bugs:

  • Filename false positives — Processing file:/.../error-messages.xml no longer counted as error (no DITA-OT code)
  • Stack trace double-counting — [ERROR] SVG graphic... from Apache FOP and BridgeException stack traces are ignored
    (not DITA-OT codes)
  • "Writing file" false positives — Writing file: messages no longer classified as errors

Test results (DITA-OT 4.4.0)

HTML: 0 errors, 2 warnings (was: 6 false errors)
PDF: 0 errors, 0 warnings (was: 4 false errors)

How to upgrade

Update build.gradle:

plugins {
     id 'io.github.jyjeanne.dita-ot-gradle' version '2.8.4'
 }

Optional — hide warning details in the report:

task html(type: DitaOtTask) {
    showWarnings false   // shows count only, hides details
}

Signed-off-by: Roger Sheen <roger@infotexture.net>
@infotexture infotexture changed the title Bump jyjeanne/dita-ot-gradle from 2.8.2 to 2.8.3 Bump jyjeanne/dita-ot-gradle from 2.8.2 to 2.8.4 Feb 8, 2026
@infotexture
Copy link
Member Author

infotexture commented Feb 8, 2026

@jyjeanne Thanks, confirmed that 2.8.4 fixes those extra errors. Much better. 🙏

I noticed what looks like extra progress information in the html task log.
Not critical, but just wanted to mention it:

  [==============================] 100% - Complete (2123 files)
  [==============================] 100% - Complete (2123 files)

  [[==============================]] 100% - Complete (2123 files, 12.5s)

There may be reasons for this that I'm not aware of, but it seems like 1 such entry would be enough.

@jyjeanne
Copy link
Contributor

@infotexture The duplicate progress lines are caused by two independent code paths both printing a "100% - Complete" line for the same transformation:

Path 1 — ProgressReporter.processOutput() (line 180)

When the DITA-OT output stream ends, updateProgress(Stage.COMPLETE) is called, which prints:
[==============================] 100% - Complete (2123 files)

Path 2 — AntExecutor (line 221)

Immediately after the process finishes, progressReporter.printSummary(exitCode == 0, duration) is called
unconditionally, which prints:
[==============================] 100% - Complete (2123 files, 12.5s)

It produces 2–3 lines

In non-terminal mode (CI, Gradle log capture), printProgressLine() uses logger.lifecycle() instead of carriage-return
overwriting (\r), so both lines appear as separate entries. The deduplication check at line 309 (if (line !=
lastProgressLine)) doesn't help because:

  • The first line comes from updateProgress() on the reader thread
  • The second line comes from printSummary() on the main thread — it has a different format (includes duration)
  • There may be a race where the same line prints twice before lastProgressLine is updated across threads
    (lastProgressLine isn't volatile or synchronized)

I made this changes :

Into file ProgressReporter.kt

  1. Removed updateProgress(Stage.COMPLETE) call from processOutput() (was line 178-181) — this was printing a redundant
    "100% - Complete" line before printSummary() printed the same thing with duration. Now printSummary() is the single
    source of the completion line.
  2. Fixed double brackets in printSummary() (lines 351, 353) — buildProgressBar() already returns [===], so wrapping it
    in [${...}] produced [[===]]. Changed to ${buildProgressBar(...)} (no outer brackets).

Then i review steps with label "Complete..." stage message

Before:
Initializing...
Preprocessing...
Transforming...
Complete... ← gone
[==============================] 100% - Complete (15 files, 3.7s)
After:
Initializing...
Preprocessing...
Transforming...
[==============================] 100% - Complete (15 files, 3.7s)

The information is not lost (the summary says "Complete"), but the style consistency is broken.

Instead of blanket-skipping COMPLETE in processLine(), skip it only in updateProgress() for DETAILED and SIMPLE
(which use printProgressLine). For MINIMAL, let the "Complete..." stage message through since it's a different format
from printSummary() and won't look like a duplicate. You can find bug fix into version 2.8.5 . I fix many other bugs during a Dita OT plugin development using it , and increase compatibility with DITA OT version 4.4

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

Labels

build Ant/Gradle build scripts & CI/CD issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants