mirror of
https://github.com/apple/pkl.git
synced 2026-06-11 08:12:50 +02:00
Revert configuration cache (#1659)
This reverts the commits that enabled Gradle's configuration cache feature. IMO: this feature is too hard to use. We don't know if a task is valid for the configuration cache until it runs, and it's very hard to tell if something is safe when authoring Gradle code. For example, our publish tasks are currently failing; I don't know how I would fix this without running the publish task again on my dev machine. Also, some of our build scripts become more brittle because of this; for example, see https://github.com/apple/pkl/blob/bb07589eae0b3195a589559a3245cbc12c29b394/build-logic/src/main/kotlin/BuildInfo.kt#L291-L296
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.OutputStream
|
||||
import org.gradle.kotlin.dsl.support.serviceOf
|
||||
|
||||
@@ -117,15 +118,9 @@ private fun setupJavaExecutableRun(
|
||||
null -> "java"
|
||||
else -> launcher.get().executablePath.asFile.absolutePath
|
||||
}
|
||||
standardOutput = OutputStream.nullOutputStream()
|
||||
|
||||
doFirst { standardOutput = OutputStream.nullOutputStream() }
|
||||
|
||||
val javaExecutableFile = tasks.javaExecutable.map { it.outputs.files.singleFile }
|
||||
argumentProviders.add(
|
||||
CommandLineArgumentProvider {
|
||||
listOf("-jar", javaExecutableFile.get().absolutePath) + args.toList()
|
||||
}
|
||||
)
|
||||
args("-jar", tasks.javaExecutable.get().outputs.files.singleFile.toString(), *args)
|
||||
|
||||
doFirst { outputFile.get().asFile.delete() }
|
||||
|
||||
@@ -138,10 +133,7 @@ val evalTestFlags = arrayOf("eval", "-x", "1 + 1", "pkl:base")
|
||||
|
||||
fun Exec.useRootDirAndSuppressOutput() {
|
||||
workingDir = rootProject.layout.projectDirectory.asFile
|
||||
doFirst {
|
||||
// we only care that this exec doesn't fail
|
||||
standardOutput = OutputStream.nullOutputStream()
|
||||
}
|
||||
standardOutput = ByteArrayOutputStream() // we only care that this exec doesn't fail
|
||||
}
|
||||
|
||||
// 0.28 Preparing for JDK21 toolchains revealed that `testStartJavaExecutable` may pass, even though
|
||||
|
||||
Reference in New Issue
Block a user