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

Declare input for quarkusGenerateCode gradle task #16672

Merged
merged 1 commit into from
Apr 28, 2021

Conversation

glefloch
Copy link
Member

This declares the following directories as task input:

  • src/main/avro
  • src/main/proto
  • src/test/avro
  • src/test/proto

This allows to the task to be detected as UP-TO-DATE by gradle.

close #16661

@glefloch glefloch requested a review from aloubyansky April 21, 2021 07:23
@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle labels Apr 21, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Apr 21, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building 1d233b3

Status Name Step Test failures Logs Raw logs
Devtools Tests - JDK 11 Windows ⚠️ Check → Logs Raw logs
Gradle Tests - JDK 11 Linux Build Test failures Logs Raw logs
Gradle Tests - JDK 11 Windows ⚠️ Check → Logs Raw logs
JVM Tests - JDK 11 ⚠️ Check → Logs Raw logs
JVM Tests - JDK 15 ⚠️ Check → Logs Raw logs
Maven Tests - JDK 11 ⚠️ Check → Logs Raw logs
Maven Tests - JDK 11 Windows ⚠️ Check → Logs Raw logs
MicroProfile TCKs Tests ⚠️ Check → Logs Raw logs
🚫 Native Tests - ${{ matrix.category }}
Native Tests - Read JSON matrix ⚠️ Check → Logs Raw logs
🚫 Native Tests - Windows - ${{ matrix.category }}

Full information is available in the Build summary check run.

Test Failures

⚙️ Gradle Tests - JDK 11 Linux #

📦 integration-tests/gradle

io.quarkus.gradle.GrpcMultiModuleQuarkusBuildTest.testProtocErrorOutput() line 39 - More details - Source on GitHub

io.quarkus.gradle.GrpcMultiModuleQuarkusBuildTest.testGrpcMultiModuleBuild() line 27 - More details - Source on GitHub

io.quarkus.gradle.KotlinGRPCProjectBuildTest.testBasicMultiModuleBuild() line 15 - More details - Source on GitHub

io.quarkus.gradle.devmode.AvroDevModeTest.main() line 15 - More details - Source on GitHub

Path testSrc = src.resolve(SourceSet.TEST_SOURCE_SET_NAME);
for (String codeGenerationSource : CODE_GENERATION_SOURCES) {
sourcesDirectories.add(mainSrc.resolve(codeGenerationSource).toFile());
sourcesDirectories.add(testSrc.resolve(codeGenerationSource).toFile());
Copy link
Member

Choose a reason for hiding this comment

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

Would it makes sense to check whether these paths exist before adding them?

Copy link
Member

Choose a reason for hiding this comment

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

Or would it be too early at this point?

Copy link
Member Author

Choose a reason for hiding this comment

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

No I think that's doable. I will need to do some refactoring, the generated code is not the default source set location (we have a subfolder per type of file: proto, avdl, ...) and thus, each generated java file needs to be registered to the compileJava task which is not the case when the task is UP-TO-DATE..

@glefloch
Copy link
Member Author

@aloubyansky I updated the code to declare both input and output. I also check if the path exists before adding it to the Set

@quarkus-bot
Copy link

quarkus-bot bot commented Apr 23, 2021

This workflow status is outdated as a new workflow run has been triggered.

Failing Jobs - Building ee80391

Status Name Step Test failures Logs Raw logs
Gradle Tests - JDK 11 Linux Build Test failures Logs Raw logs
Gradle Tests - JDK 11 Windows Build Test failures Logs Raw logs

Full information is available in the Build summary check run.

Test Failures

⚙️ Gradle Tests - JDK 11 Linux #

📦 integration-tests/gradle

io.quarkus.gradle.QuarkusPluginFunctionalTest.canDetectUpToDateBuild() line 67 - More details - Source on GitHub

io.quarkus.gradle.builder.QuarkusModelBuilderTest.shouldLoadMultiModuleModel() line 65 - More details - Source on GitHub

io.quarkus.gradle.builder.QuarkusModelBuilderTest.shouldLoadSimpleModuleModel() line 50 - More details - Source on GitHub


⚙️ Gradle Tests - JDK 11 Windows #

📦 integration-tests/gradle

io.quarkus.gradle.builder.QuarkusModelBuilderTest.shouldLoadMultiModuleModel() line 65 - More details - Source on GitHub

io.quarkus.gradle.builder.QuarkusModelBuilderTest.shouldLoadSimpleModuleModel() line 50 - More details - Source on GitHub

@gsmet
Copy link
Member

gsmet commented Apr 26, 2021

@glefloch failures look related?

@glefloch
Copy link
Member Author

Yes I need to update the assertions for two of the three failures and look at the third one.

@glefloch
Copy link
Member Author

@aloubyansky could you have a look at this one? this should help fixing #13882 as generated source directory will be available from main sourceSet

Copy link
Member

@aloubyansky aloubyansky left a comment

Choose a reason for hiding this comment

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

Sorry, I thought I approved it before. Thanks @glefloch

@aloubyansky aloubyansky merged commit b3caaa6 into quarkusio:main Apr 28, 2021
@quarkus-bot quarkus-bot bot added this to the 2.0 - main milestone Apr 28, 2021
@glefloch glefloch deleted the fix/16661 branch April 28, 2021 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QuarkusGenerateCode gradle task is not incremental
3 participants