Skip to content

Conversation

Schahen
Copy link
Collaborator

@Schahen Schahen commented Sep 30, 2025

This PR is a supposed fix for https://youtrack.jetbrains.com/issue/CMP-8990
Basically the problem is that copyRecursively does not guarantee execution flag to be preserved

Testing

./gradlew checkComposeCases

Release Notes

N/A


println(proc.errorStream.bufferedReader().readText())
// If process printed the version marker, it will already be in the console; still try to extract from stdout if available
// Can't read inputStream when inherited; attempt only if available
Copy link
Collaborator

Choose a reason for hiding this comment

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

As I see in the code above, it is always INHERIT, so it always fails?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@igordmn you are correct, this is the remnant of pre-setExecution flag attempt. let me fix it

Copy link
Collaborator

@igordmn igordmn left a comment

Choose a reason for hiding this comment

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

Besides try-catch LGTM

throw GradleException("Failed to start Gradle process. Command: ${command.joinToString(" ")}", e)
}

val finished = proc.waitFor(5, TimeUnit.MINUTES)
Copy link
Collaborator

@igordmn igordmn Sep 30, 2025

Choose a reason for hiding this comment

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

I still have this task failed on Windows:

D:\Work\compose-multiplatform\html>gradlew checkComposeCases -Pcompose.version=1.10.0+dev2995
[build] compose core version: 1.10.0+dev2995

> Configure project :buildSrc
Writing kotlin.version=2.2.10 into D:\Work\compose-multiplatform\html\buildSrc\build\kotlin.version

> Task :compose-compiler-integration:checkComposeCases
Running check for MutableStateDestructuringDeclarartion.kt, expectCompilationError = true, composeVersion = 1.10.0+dev2995
[compose-compiler-integration] Working directory: D:\Work\compose-multiplatform\html\compose-compiler-integration\build\temp\cloned-MutableStateDestructuringDeclarartion.kt
[compose-compiler-integration] Executing: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
Running check for CompanionGetValueOperatorComposable.kt, expectCompilationError = false, composeVersion = 1.10.0+dev2995
[compose-compiler-integration] Working directory: D:\Work\compose-multiplatform\html\compose-compiler-integration\build\temp\cloned-CompanionGetValueOperatorComposable.kt
[compose-compiler-integration] Executing: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
Running check for ComposableWithDefaultValuesDefinedByOtherParams.kt, expectCompilationError = false, composeVersion = 1.10.0+dev2995
[compose-compiler-integration] Working directory: D:\Work\compose-multiplatform\html\compose-compiler-integration\build\temp\cloned-ComposableWithDefaultValuesDefinedByOtherParams.kt
[compose-compiler-integration] Executing: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
Running check for ComposableWithNullableTypeParameter.kt, expectCompilationError = false, composeVersion = 1.10.0+dev2995
[compose-compiler-integration] Working directory: D:\Work\compose-multiplatform\html\compose-compiler-integration\build\temp\cloned-ComposableWithNullableTypeParameter.kt
[compose-compiler-integration] Executing: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
Running check for ComposableWithParamsWithDefaultValues.kt, expectCompilationError = false, composeVersion = 1.10.0+dev2995
[compose-compiler-integration] Working directory: D:\Work\compose-multiplatform\html\compose-compiler-integration\build\temp\cloned-ComposableWithParamsWithDefaultValues.kt
[compose-compiler-integration] Executing: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
Running check for ComposableWithTypedDefaultValues.kt, expectCompilationError = false, composeVersion = 1.10.0+dev2995
[compose-compiler-integration] Working directory: D:\Work\compose-multiplatform\html\compose-compiler-integration\build\temp\cloned-ComposableWithTypedDefaultValues.kt                                                                                                     
[compose-compiler-integration] Executing: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
Running check for ComposableWithTypeParams.kt, expectCompilationError = false, composeVersion = 1.10.0+dev2995
[compose-compiler-integration] Working directory: D:\Work\compose-multiplatform\html\compose-compiler-integration\build\temp\cloned-ComposableWithTypeParams.kt                                                                                                             
[compose-compiler-integration] Executing: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
Running check for InstanceGetValueOperatorComposable.kt, expectCompilationError = false, composeVersion = 1.10.0+dev2995
[compose-compiler-integration] Working directory: D:\Work\compose-multiplatform\html\compose-compiler-integration\build\temp\cloned-InstanceGetValueOperatorComposable.kt                                                                                                   
[compose-compiler-integration] Executing: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
Running check for PassingComposableToConstructor.kt, expectCompilationError = false, composeVersion = 1.10.0+dev2995
[compose-compiler-integration] Working directory: D:\Work\compose-multiplatform\html\compose-compiler-integration\build\temp\cloned-PassingComposableToConstructor.kt                                                                                                       
[compose-compiler-integration] Executing: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
Running check for WithComposableBlockUsingTypeParameterAndDefaultValue.kt, expectCompilationError = false, composeVersion = 1.10.0+dev2995
[compose-compiler-integration] Working directory: D:\Work\compose-multiplatform\html\compose-compiler-integration\build\temp\cloned-WithComposableBlockUsingTypeParameterAndDefaultValue.kt                                                                                 
[compose-compiler-integration] Executing: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
MutableStateDestructuringDeclarartion.kt : org.gradle.api.GradleException: Gradle process timed out for MutableStateDestructuringDeclarartion.kt. Command: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
##teamcity[testStarted name='compileTestCase_MutableStateDestructuringDeclarartion.kt']
##teamcity[testFailed name='compileTestCase_MutableStateDestructuringDeclarartion.kt']
##teamcity[testFinished name='compileTestCase_MutableStateDestructuringDeclarartion.kt']
CompanionGetValueOperatorComposable.kt : org.gradle.api.GradleException: Gradle process timed out for CompanionGetValueOperatorComposable.kt. Command: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
ComposableWithDefaultValuesDefinedByOtherParams.kt : org.gradle.api.GradleException: Gradle process timed out for ComposableWithDefaultValuesDefinedByOtherParams.kt. Command: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
ComposableWithNullableTypeParameter.kt : org.gradle.api.GradleException: Gradle process timed out for ComposableWithNullableTypeParameter.kt. Command: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
ComposableWithParamsWithDefaultValues.kt : org.gradle.api.GradleException: Gradle process timed out for ComposableWithParamsWithDefaultValues.kt. Command: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
ComposableWithTypedDefaultValues.kt : org.gradle.api.GradleException: Gradle process timed out for ComposableWithTypedDefaultValues.kt. Command: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info 
ComposableWithTypeParams.kt : org.gradle.api.GradleException: Gradle process timed out for ComposableWithTypeParams.kt. Command: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
InstanceGetValueOperatorComposable.kt : org.gradle.api.GradleException: Gradle process timed out for InstanceGetValueOperatorComposable.kt. Command: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info
PassingComposableToConstructor.kt : org.gradle.api.GradleException: Gradle process timed out for PassingComposableToConstructor.kt. Command: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info     
WithComposableBlockUsingTypeParameterAndDefaultValue.kt : org.gradle.api.GradleException: Gradle process timed out for WithComposableBlockUsingTypeParameterAndDefaultValue.kt. Command: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info

As I see, each gradlew call is very long. Maybe we should set 10 minutes?

It seems every test fails with timeout

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you have it successful on your machine? How long does it run?

Copy link
Collaborator

Choose a reason for hiding this comment

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

--info prints:

[compose-compiler-integration] Working directory: D:\Work\compose-multiplatform\html\compose-compiler-integration\build\temp\cloned-MutableStateDestructuringDeclarartion.kt
[compose-compiler-integration] Executing: cmd /c gradlew.bat build jsNodeDevelopmentRun -Pcompose.version=1.10.0+dev2995 -Pkotlin.version=2.2.10 --stacktrace --info

Detected overflow for D:\Work\compose-multiplatform\html
Overflow detected (type: OPERATING_SYSTEM) for watched path 'D:\Work\compose-multiplatform\html', invalidating
Not watching anything anymore

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@igordmn have we ever run this tests on windows?

@igordmn igordmn self-requested a review September 30, 2025 16:13
@Schahen Schahen merged commit 68f2a95 into master Sep 30, 2025
1 check passed
@Schahen Schahen deleted the sh/CMP-8990-muted-html-tests branch September 30, 2025 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants