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
Ignore missing source roots for incremental compilation #8195
Conversation
@@ -569,6 +569,25 @@ sourceSets { | |||
output.contains("Full recompilation is required because the source roots could not be inferred.") | |||
} | |||
|
|||
def "missing files are ignored of source roots"() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of
=> as
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@@ -569,6 +569,25 @@ sourceSets { | |||
output.contains("Full recompilation is required because the source roots could not be inferred.") | |||
} | |||
|
|||
def "missing files are ignored of source roots"() { | |||
buildFile << "compileJava.source([file('extra-java'), file('other'), fileTree('missing-tree'), file('missing-file')])" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's break this into multiple lines.
Also, what is the difference between other
and missing-file
? Seems to be both missing. For simplicity's sake we could also put the sources under src/main/java
so we could remove extra-java
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I now only add missing-tree
and missing-file
.
|
||
then: | ||
outputs.recompiledClasses("A", "B") | ||
!output.contains("Full recompilation is required because the source roots could not be inferred.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not an isolated problem, but I feel such tests are way too brittle. Can we at least get this string from a constant in the production code maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can remove this line, given that a full recompilation would always meant the C
is compiled as well.
@lptr PTAL! |
Fixes #8194.