[
https://issues.apache.org/jira/browse/CALCITE-5786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17735502#comment-17735502
]
Julian Hyde edited comment on CALCITE-5786 at 6/21/23 1:14 AM:
---------------------------------------------------------------
The effect of that fix would be that incremental builds would be flaky for IDE
users. They wouldn't even know what they were doing wrong. So I don't think
it's the right fix.
What do you think of the following? When running Quidm tests, a file such as
{noformat}
core/src/test/resources/sql/agg.iq
{noformat}
which is copied to
{noformat}
core/build/resources/test/sql/agg.iq
{noformat}
should generate its output to
{noformat}
core/build/quidem/test/sql/agg.iq
{noformat}
Similarly, when running DiffRepository tests, a file such as
{noformat}
core/src/test/resources/org/apache/calcite/test/SqlToRelConverterTest.xml
{noformat}
which is copied to
{noformat}
core/build/resources/test/org/apache/calcite/test/SqlToRelConverterTest.xml
{noformat}
should generate its output to
{noformat}
core/build/diffrepo/test/org/apache/calcite/test/SqlToRelConverterTest.xml
{noformat}
In each of these cases, files 1 and 2 will be the same file 3 will be different
if the test fails. If the new output is better, the developer should copy file
3 to file 1 and commit.
Do you think that those new {{quidem}} and {{diffrepo}} directories will work
correctly with Gradle?
was (Author: julianhyde):
The effect of that fix would be that incremental builds would be flaky for IDE
users. They wouldn't even know what they were doing wrong.
Ideally,
{noformat}
core/src/test/resources/sql/agg.iq
{noformat}
which is copied to
{noformat}
core/build/resources/test/sql/agg.iq
{noformat}
should generate its output to
{noformat}
core/build/quidem/test/sql/agg.iq
{noformat}
Similarly,
{noformat}
core/src/test/resources/org/apache/calcite/test/SqlToRelConverterTest.xml
{noformat}
which is copied to
{noformat}
core/build/resources/test/org/apache/calcite/test/SqlToRelConverterTest.xml
{noformat}
should generate its output to
{noformat}
core/build/diffrepo/test/org/apache/calcite/test/SqlToRelConverterTest.xml
{noformat}
In each of these cases, files 1 and 2 will be the same file 3 will be different
if the test fails. If the new output is better, the developer should copy file
3 to file 1 and commit.
Do you think that those new {{quidem}} and {{diffrepo}} directories will work
correctly with Gradle?
> QuidemTest and DiffRepository have incremental build issues
> -----------------------------------------------------------
>
> Key: CALCITE-5786
> URL: https://issues.apache.org/jira/browse/CALCITE-5786
> Project: Calcite
> Issue Type: Improvement
> Components: build, tests
> Reporter: Akshay Dayal
> Priority: Minor
> Labels: pull-request-available
> Attachments: Screenshot 2023-06-17 at 1.01.29 AM.png, Screenshot
> 2023-06-17 at 6.42.57 PM.png, Screenshot 2023-06-17 at 6.43.20 PM.png
>
>
> QuidemTest and DiffRepository have incremental build issues. The reason is
> that they write output to {{build/resources/test}}.
> The {{test}} tasks treat {{build/resources/test}} as an input, so if there
> are changes made to the directory the {{test}} tasks are considered no longer
> UP-TO-DATE.
> Currently {{QuidemTest}} and {{DiffRepository}}, which are used by tests,
> write to this directory. DiffRepository writes test results to be compared
> with expected results. {{QuidemTest}} creates some sql files which are used
> during testing. This causes issues with incremental build support for the
> {{test}} tasks. I'm attaching screenshots from a build scan to show this.
> Neither of these need to be written to the {{build/resources/test}}
> directory, they can be put somewhere else in the {{build}} directory and
> therefore not cause issues with incremental build support.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)