mirror of
https://github.com/apple/pkl.git
synced 2026-03-24 18:11:27 +01:00
Follow up for trace pretty printing (#1227)
This commit is contained in:
@@ -40,7 +40,7 @@ internal class BinaryEvaluator(
|
||||
moduleCacheDir: Path?,
|
||||
declaredDependencies: DeclaredDependencies?,
|
||||
outputFormat: String?,
|
||||
traceMode: TraceMode?,
|
||||
traceMode: TraceMode,
|
||||
) :
|
||||
EvaluatorImpl(
|
||||
transformer,
|
||||
|
||||
@@ -25,6 +25,7 @@ import java.util.regex.Pattern
|
||||
import kotlin.random.Random
|
||||
import org.pkl.core.*
|
||||
import org.pkl.core.evaluatorSettings.PklEvaluatorSettings
|
||||
import org.pkl.core.evaluatorSettings.TraceMode
|
||||
import org.pkl.core.externalreader.ExternalReaderProcess
|
||||
import org.pkl.core.externalreader.ExternalResourceResolver
|
||||
import org.pkl.core.externalreader.ModuleReaderSpec
|
||||
@@ -227,7 +228,7 @@ class Server(private val transport: MessageTransport) : AutoCloseable {
|
||||
cacheDir,
|
||||
dependencies,
|
||||
message.outputFormat,
|
||||
message.traceMode,
|
||||
message.traceMode ?: TraceMode.COMPACT,
|
||||
)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
throw ProtocolException(e.message ?: "Failed to create an evalutor. $e", e)
|
||||
|
||||
@@ -21,6 +21,7 @@ import kotlin.reflect.KClass
|
||||
import org.junit.platform.commons.annotation.Testable
|
||||
import org.pkl.commons.test.InputOutputTestEngine
|
||||
import org.pkl.core.*
|
||||
import org.pkl.core.evaluatorSettings.TraceMode
|
||||
import org.pkl.core.http.HttpClient
|
||||
import org.pkl.core.module.ModuleKeyFactories
|
||||
|
||||
@@ -56,7 +57,7 @@ class BinaryEvaluatorSnippetTestEngine : InputOutputTestEngine() {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
TraceMode.COMPACT,
|
||||
)
|
||||
|
||||
private fun String.stripFilePaths() =
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.assertj.core.api.Assertions.assertThat
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.junit.jupiter.api.assertThrows
|
||||
import org.pkl.core.*
|
||||
import org.pkl.core.evaluatorSettings.TraceMode
|
||||
import org.pkl.core.http.HttpClient
|
||||
import org.pkl.core.module.ModuleKeyFactories
|
||||
import org.pkl.core.resource.ResourceReaders
|
||||
@@ -45,7 +46,7 @@ class BinaryEvaluatorTest {
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
TraceMode.COMPACT,
|
||||
)
|
||||
|
||||
private fun evaluate(text: String, expression: String?) =
|
||||
|
||||
Reference in New Issue
Block a user