asciidoctor / asciidoctor-gradle-plugin

A Gradle plugin that uses Asciidoctor via JRuby to process AsciiDoc source files within the project.
https://asciidoctor.github.io/asciidoctor-gradle-plugin/
Apache License 2.0
285 stars 120 forks source link

3.3.1 does not track secondary inputs in subdirectories #599

Open marcphilipp opened 3 years ago

marcphilipp commented 3 years ago

While working on the JUnit 5 build, I noticed that secondary inputs are no longer tracked.

Steps to reproduce

  1. Clone https://github.com/marcphilipp/gradle-sandbox
  2. Run ./gradlew asciidoctor in asciidoctor-secondary-sources
  3. Change content in src/docs/asciidoc/subdir/include.adoc
  4. Run ./gradlew asciidoctor again

The task is reported as up-to-date but should have been rerun.

Analysis

I added some diagnostic output to the task that shows the problem. For some reason the secondary inputs are empty on 3.3.1 and 3.3.2.

With 3.3.0 the task prints:

> Task :asciidoctor
[/Users/marc/Repositories/gradle/sandbox/asciidoctor-secondary-sources/src/docs/asciidoc/subdir/index.adoc]
[/Users/marc/Repositories/gradle/sandbox/asciidoctor-secondary-sources/src/docs/asciidoc/subdir/include.adoc]

With 3.3.1 and 3.3.2 it prints:

> Task :asciidoctor
[/Users/marc/Repositories/gradle/sandbox/asciidoctor-secondary-sources/src/docs/asciidoc/subdir/index.adoc]
[]
ysb33r commented 1 year ago

Please try 4.0.0-alpha.1 and tell me if the problem still exists

marcphilipp commented 1 year ago

I just updated the above reproducer project and it seems the issue still exists with 4.0.0-alpha.1.

ysb33r commented 1 year ago

OK thanks. I'll have a look into that.