diff --git a/packages/safe-ds-lang/src/language/generation/safe-ds-python-generator.ts b/packages/safe-ds-lang/src/language/generation/safe-ds-python-generator.ts index 193fcc9f0..7bd647ada 100644 --- a/packages/safe-ds-lang/src/language/generation/safe-ds-python-generator.ts +++ b/packages/safe-ds-lang/src/language/generation/safe-ds-python-generator.ts @@ -105,7 +105,7 @@ const BLOCK_LAMBDA_PREFIX = `${CODEGEN_PREFIX}block_lambda_`; const BLOCK_LAMBDA_RESULT_PREFIX = `${CODEGEN_PREFIX}block_lambda_result_`; const YIELD_PREFIX = `${CODEGEN_PREFIX}yield_`; -const RUNNER_SERVER_PIPELINE_MANAGER_PACKAGE = 'safeds_runner.server.pipeline_manager'; +const RUNNER_PACKAGE = 'safeds_runner'; const PYTHON_INDENT = ' '; const SPACING = new CompositeGeneratorNode(NL, NL); @@ -648,11 +648,11 @@ export class SafeDsPythonGenerator { if (frame.isInsidePipeline && !generateLambda && !frame.disableRunnerIntegration) { for (const savableAssignment of assignees.filter(isSdsPlaceholder)) { // should always be SdsPlaceholder - frame.addImport({ importPath: RUNNER_SERVER_PIPELINE_MANAGER_PACKAGE }); + frame.addImport({ importPath: RUNNER_PACKAGE }); assignmentStatements.push( expandTracedToNode( savableAssignment, - )`${RUNNER_SERVER_PIPELINE_MANAGER_PACKAGE}.runner_save_placeholder('${savableAssignment.name}', ${savableAssignment.name})`, + )`${RUNNER_PACKAGE}.save_placeholder('${savableAssignment.name}', ${savableAssignment.name})`, ); } } @@ -954,7 +954,7 @@ export class SafeDsPythonGenerator { if (!this.isMemoizableCall(expression) || frame.disableRunnerIntegration) { return generatedPythonCall; } - frame.addImport({ importPath: RUNNER_SERVER_PIPELINE_MANAGER_PACKAGE }); + frame.addImport({ importPath: RUNNER_PACKAGE }); const hiddenParameters = this.getMemoizedCallHiddenParameters(expression, frame); const callable = this.nodeMapper.callToCallable(expression); const memoizedArgs = getParameters(callable).map( @@ -962,7 +962,7 @@ export class SafeDsPythonGenerator { ); return expandTracedToNode( expression, - )`${RUNNER_SERVER_PIPELINE_MANAGER_PACKAGE}.runner_memoized_function_call("${this.generateFullyQualifiedFunctionName( + )`${RUNNER_PACKAGE}.memoized_call("${this.generateFullyQualifiedFunctionName( expression, )}", lambda *_ : ${generatedPythonCall}, [${joinTracedToNode(expression.argumentList, 'arguments')( memoizedArgs, @@ -983,7 +983,7 @@ export class SafeDsPythonGenerator { frame: GenerationInfoFrame, thisParam: CompositeGeneratorNode | undefined = undefined, ): CompositeGeneratorNode { - frame.addImport({ importPath: RUNNER_SERVER_PIPELINE_MANAGER_PACKAGE }); + frame.addImport({ importPath: RUNNER_PACKAGE }); const hiddenParameters = this.getMemoizedCallHiddenParameters(expression, frame); const callable = this.nodeMapper.callToCallable(expression); const memoizedArgs = getParameters(callable).map( @@ -995,9 +995,7 @@ export class SafeDsPythonGenerator { Parameter.isOptional(this.nodeMapper.argumentToParameter(arg)), ); const fullyQualifiedTargetName = this.generateFullyQualifiedFunctionName(expression); - return expandTracedToNode( - expression, - )`${RUNNER_SERVER_PIPELINE_MANAGER_PACKAGE}.runner_memoized_function_call("${fullyQualifiedTargetName}", ${ + return expandTracedToNode(expression)`${RUNNER_PACKAGE}.memoized_call("${fullyQualifiedTargetName}", ${ containsOptionalArgs ? 'lambda *_ : ' : '' }${ containsOptionalArgs @@ -1026,9 +1024,7 @@ export class SafeDsPythonGenerator { if (reason instanceof FileRead) { if (typeof reason.path === 'string') { hiddenParameters.push( - expandTracedToNode( - expression, - )`${RUNNER_SERVER_PIPELINE_MANAGER_PACKAGE}.runner_filemtime('${reason.path}')`, + expandTracedToNode(expression)`${RUNNER_PACKAGE}.file_mtime('${reason.path}')`, ); } else if (isSdsParameter(reason.path)) { const argument = this.nodeMapper @@ -1041,9 +1037,7 @@ export class SafeDsPythonGenerator { ); } hiddenParameters.push( - expandTracedToNode( - argument, - )`${RUNNER_SERVER_PIPELINE_MANAGER_PACKAGE}.runner_filemtime(${this.generateArgument( + expandTracedToNode(argument)`${RUNNER_PACKAGE}.file_mtime(${this.generateArgument( argument, frame, )})`, diff --git a/packages/safe-ds-lang/src/language/runner/safe-ds-runner.ts b/packages/safe-ds-lang/src/language/runner/safe-ds-runner.ts index 83ceec10c..c2a64e7b5 100644 --- a/packages/safe-ds-lang/src/language/runner/safe-ds-runner.ts +++ b/packages/safe-ds-lang/src/language/runner/safe-ds-runner.ts @@ -21,7 +21,7 @@ import semver from 'semver'; // Most of the functionality cannot be tested automatically as a functioning runner setup would always be required -const SUPPORTED_VERSION_RANGE = '>=0.6.0 <0.7.0'; +const SUPPORTED_VERSION_RANGE = '~0.7.0'; export class SafeDsRunner { private readonly annotations: SafeDsAnnotations; diff --git a/packages/safe-ds-lang/tests/language/generation/creator.ts b/packages/safe-ds-lang/tests/language/generation/creator.ts index 46985f56c..68aa1663b 100644 --- a/packages/safe-ds-lang/tests/language/generation/creator.ts +++ b/packages/safe-ds-lang/tests/language/generation/creator.ts @@ -5,7 +5,6 @@ import { uriToShortenedTestResourceName, } from '../../helpers/testResources.js'; import path from 'path'; -import fs from 'fs'; import { createSafeDsServices } from '../../../src/language/index.js'; import { ErrorsInCodeError, getErrorsAtURI } from '../../helpers/diagnostics.js'; import { findTestChecks } from '../../helpers/testChecks.js'; @@ -29,7 +28,7 @@ export const createGenerationTests = async (): Promise => { const createGenerationTest = async (parentDirectory: URI, inputUris: URI[]): Promise => { const outputRoot = URI.file(path.join(parentDirectory.fsPath, 'generated')); - const expectedOutputFiles = readExpectedOutputFiles(outputRoot); + const expectedOutputUris = listExpectedOutputFiles(outputRoot); let runUntil: Location | undefined; // Load all files, so they get linked @@ -80,33 +79,19 @@ const createGenerationTest = async (parentDirectory: URI, inputUris: URI[]): Pro testName: `[${shortenedResourceName}]`, inputUris, outputRoot, - expectedOutputFiles, + expectedOutputUris, runUntil, disableRunnerIntegration: !shortenedResourceName.startsWith(runnerIntegration), }; }; /** - * Read all expected output files. + * List all expected output files. * - * @param outputRoot Where the actual output files are supposed to be located. + * @param outputRoot The directory, where output files are located. */ -const readExpectedOutputFiles = (outputRoot: URI): ExpectedOutputFile[] => { - return listTestFilesWithExtensions(uriToShortenedTestResourceName(outputRoot), ['py', 'map']) - .sort((a, b) => { - // List .py files first, so they get compared first - if (a.fsPath.endsWith('.map') && b.fsPath.endsWith('.py')) { - return 1; - } - - return -1; - }) - .map((uri) => { - return { - uri, - code: fs.readFileSync(uri.fsPath).toString(), - }; - }); +const listExpectedOutputFiles = (outputRoot: URI): URI[] => { + return listTestFilesWithExtensions(uriToShortenedTestResourceName(outputRoot), ['py', 'map']); }; /** @@ -122,7 +107,7 @@ const invalidTest = (level: 'FILE' | 'SUITE', error: TestDescriptionError): Gene testName, inputUris: [], outputRoot: URI.file(''), - expectedOutputFiles: [], + expectedOutputUris: [], error, disableRunnerIntegration: false, }; @@ -143,9 +128,9 @@ interface GenerationTest extends TestDescription { outputRoot: URI; /** - * The expected generated code. + * The expected output files. */ - expectedOutputFiles: ExpectedOutputFile[]; + expectedOutputUris: URI[]; /** * Location after which execution should be stopped. @@ -153,26 +138,11 @@ interface GenerationTest extends TestDescription { runUntil?: Location; /** - * Whether the test should run with runner integration (memoization & placeholder saving) disabled + * Whether the test should run with runner integration (memoization & placeholder saving) disabled. */ disableRunnerIntegration: boolean; } -/** - * A file containing the expected output. - */ -interface ExpectedOutputFile { - /** - * URI of the output file. - */ - uri: URI; - - /** - * Content of the output file. - */ - code: string; -} - /** * Found multiple test checks. */ diff --git a/packages/safe-ds-lang/tests/language/generation/safe-ds-python-generator.test.ts b/packages/safe-ds-lang/tests/language/generation/safe-ds-python-generator.test.ts index 496659a62..340a37318 100644 --- a/packages/safe-ds-lang/tests/language/generation/safe-ds-python-generator.test.ts +++ b/packages/safe-ds-lang/tests/language/generation/safe-ds-python-generator.test.ts @@ -52,7 +52,7 @@ describe('generation', async () => { // File paths must match const actualOutputPaths = Array.from(actualOutputs.keys()).sort(); - const expectedOutputPaths = test.expectedOutputFiles.map((file) => file.uri.toString()).sort(); + const expectedOutputPaths = test.expectedOutputUris.map((uri) => uri.toString()).sort(); expect(actualOutputPaths).toStrictEqual(expectedOutputPaths); }); }); diff --git a/packages/safe-ds-lang/tests/resources/generation/runner integration/expressions/call/generated/tests/generator/callWithRunnerIntegration/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/runner integration/expressions/call/generated/tests/generator/callWithRunnerIntegration/gen_input.py index ddea38268..7e2cfd90b 100644 --- a/packages/safe-ds-lang/tests/resources/generation/runner integration/expressions/call/generated/tests/generator/callWithRunnerIntegration/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/runner integration/expressions/call/generated/tests/generator/callWithRunnerIntegration/gen_input.py @@ -1,6 +1,6 @@ # Imports ---------------------------------------------------------------------- -import safeds_runner.server.pipeline_manager +import safeds_runner from typing import Any, Callable, TypeVar # Type variables --------------------------------------------------------------- @@ -15,20 +15,20 @@ def __gen_null_safe_call(receiver: Any, callable: Callable[[], __gen_T]) -> __ge # Pipelines -------------------------------------------------------------------- def test(): - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.callWithRunnerIntegration.g", lambda *_ : g(1, param2=2), [1, 2], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.callWithRunnerIntegration.g", lambda *_ : g(2, param2=1), [2, 1], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.callWithRunnerIntegration.h", lambda *_ : h(1, param_2=2), [1, 2], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.callWithRunnerIntegration.h", lambda *_ : h(2, param_2=1), [2, 1], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.callWithRunnerIntegration.h", h, [2, 0], [])) + f(safeds_runner.memoized_call("tests.generator.callWithRunnerIntegration.g", lambda *_ : g(1, param2=2), [1, 2], [])) + f(safeds_runner.memoized_call("tests.generator.callWithRunnerIntegration.g", lambda *_ : g(2, param2=1), [2, 1], [])) + f(safeds_runner.memoized_call("tests.generator.callWithRunnerIntegration.h", lambda *_ : h(1, param_2=2), [1, 2], [])) + f(safeds_runner.memoized_call("tests.generator.callWithRunnerIntegration.h", lambda *_ : h(2, param_2=1), [2, 1], [])) + f(safeds_runner.memoized_call("tests.generator.callWithRunnerIntegration.h", h, [2, 0], [])) 'abc'.i() 'abc'.j(123) k(456, 1.23) - __gen_null_safe_call(f, lambda: f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.callWithRunnerIntegration.g", lambda *_ : g(1, param2=2), [1, 2], []))) - __gen_null_safe_call(f, lambda: f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.callWithRunnerIntegration.g", lambda *_ : g(2, param2=1), [2, 1], []))) - __gen_null_safe_call(f, lambda: f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.callWithRunnerIntegration.h", lambda *_ : h(1, param_2=2), [1, 2], []))) - __gen_null_safe_call(f, lambda: f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.callWithRunnerIntegration.h", lambda *_ : h(2, param_2=1), [2, 1], []))) - __gen_null_safe_call(f, lambda: f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.callWithRunnerIntegration.h", h, [2, 0], []))) + __gen_null_safe_call(f, lambda: f(safeds_runner.memoized_call("tests.generator.callWithRunnerIntegration.g", lambda *_ : g(1, param2=2), [1, 2], []))) + __gen_null_safe_call(f, lambda: f(safeds_runner.memoized_call("tests.generator.callWithRunnerIntegration.g", lambda *_ : g(2, param2=1), [2, 1], []))) + __gen_null_safe_call(f, lambda: f(safeds_runner.memoized_call("tests.generator.callWithRunnerIntegration.h", lambda *_ : h(1, param_2=2), [1, 2], []))) + __gen_null_safe_call(f, lambda: f(safeds_runner.memoized_call("tests.generator.callWithRunnerIntegration.h", lambda *_ : h(2, param_2=1), [2, 1], []))) + __gen_null_safe_call(f, lambda: f(safeds_runner.memoized_call("tests.generator.callWithRunnerIntegration.h", h, [2, 0], []))) __gen_null_safe_call(i, lambda: 'abc'.i()) __gen_null_safe_call(j, lambda: 'abc'.j(123)) __gen_null_safe_call(k, lambda: k(456, 1.23)) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.callWithRunnerIntegration.readFile", readFile, [], [safeds_runner.server.pipeline_manager.runner_filemtime('a.txt')])) + f(safeds_runner.memoized_call("tests.generator.callWithRunnerIntegration.readFile", readFile, [], [safeds_runner.file_mtime('a.txt')])) diff --git a/packages/safe-ds-lang/tests/resources/generation/runner integration/expressions/call/generated/tests/generator/callWithRunnerIntegration/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/runner integration/expressions/call/generated/tests/generator/callWithRunnerIntegration/gen_input.py.map index 94e183b39..0ad85b9dc 100644 --- a/packages/safe-ds-lang/tests/resources/generation/runner integration/expressions/call/generated/tests/generator/callWithRunnerIntegration/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/runner integration/expressions/call/generated/tests/generator/callWithRunnerIntegration/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["test","f","g","param2","h","i","j","k","readfile"],"mappings":"AAAA;;;;;;;;;;;;;;;;AA6BA,IAASA,IAAI;IACTC,CAAC,CAAE,+HAAAC,CAAC,CAAC,CAAC,EAxBNC,MAAM,CAwBE,CAAC,IAAJ,CAAC,EAAE,CAAC;IACTF,CAAC,CAAE,+HAAAC,CAAC,CAAsB,CAAC,EAzB3BC,MAAM,CAyBQ,CAAC,IAAW,CAAC,EAAb,CAAC;IACfF,CAAC,CAAE,+HAAAG,CAAC,CAAC,CAAC,EArBiBD,OAAM,CAqBrB,CAAC,IAAJ,CAAC,EAAE,CAAC;IACTF,CAAC,CAAE,+HAAAG,CAAC,CAAsB,CAAC,EAtBJD,OAAM,CAsBf,CAAC,IAAW,CAAC,EAAb,CAAC;IACfF,CAAC,CAAE,mHAAAG,CAAC,GAAU,CAAC,EAvBsB,CAAC;IAwBpC,KAAK;IACL,KAAK,GAAE,GAAG;IACZ,EAAQ,GAAG,EAAT,IAAI;IAEL,oBAAC,CAAFH,CAAC,UAADA,CAAC,CAAG,+HAAAC,CAAC,CAAC,CAAC,EAjCPC,MAAM,CAiCG,CAAC,IAAJ,CAAC,EAAE,CAAC;IACT,oBAAC,CAAFF,CAAC,UAADA,CAAC,CAAG,+HAAAC,CAAC,CAAsB,CAAC,EAlC5BC,MAAM,CAkCS,CAAC,IAAW,CAAC,EAAb,CAAC;IACf,oBAAC,CAAFF,CAAC,UAADA,CAAC,CAAG,+HAAAG,CAAC,CAAC,CAAC,EA9BgBD,OAAM,CA8BpB,CAAC,IAAJ,CAAC,EAAE,CAAC;IACT,oBAAC,CAAFF,CAAC,UAADA,CAAC,CAAG,+HAAAG,CAAC,CAAsB,CAAC,EA/BLD,OAAM,CA+Bd,CAAC,IAAW,CAAC,EAAb,CAAC;IACf,oBAAC,CAAFF,CAAC,UAADA,CAAC,CAAG,mHAAAG,CAAC,GAAU,CAAC,EAhCqB,CAAC;IAiCrC,oBAAC,CAAFC,CAAC,UAAE,KAAK;IACP,oBAAC,CAAFC,CAAC,UAAE,KAAK,GAAE,GAAG;IACZ,oBAAC,CAAFC,CAAC,UAAD,EAAS,GAAG,EAAT,IAAI;IAEPN,CAAC,CAAC,0HAAAO,QAAQ,OAAR,+DAAU","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["test","f","g","param2","h","i","j","k","readfile"],"mappings":"AAAA;;;;;;;;;;;;;;;;AA6BA,IAASA,IAAI;IACTC,CAAC,CAAE,uFAAAC,CAAC,CAAC,CAAC,EAxBNC,MAAM,CAwBE,CAAC,IAAJ,CAAC,EAAE,CAAC;IACTF,CAAC,CAAE,uFAAAC,CAAC,CAAsB,CAAC,EAzB3BC,MAAM,CAyBQ,CAAC,IAAW,CAAC,EAAb,CAAC;IACfF,CAAC,CAAE,uFAAAG,CAAC,CAAC,CAAC,EArBiBD,OAAM,CAqBrB,CAAC,IAAJ,CAAC,EAAE,CAAC;IACTF,CAAC,CAAE,uFAAAG,CAAC,CAAsB,CAAC,EAtBJD,OAAM,CAsBf,CAAC,IAAW,CAAC,EAAb,CAAC;IACfF,CAAC,CAAE,2EAAAG,CAAC,GAAU,CAAC,EAvBsB,CAAC;IAwBpC,KAAK;IACL,KAAK,GAAE,GAAG;IACZ,EAAQ,GAAG,EAAT,IAAI;IAEL,oBAAC,CAAFH,CAAC,UAADA,CAAC,CAAG,uFAAAC,CAAC,CAAC,CAAC,EAjCPC,MAAM,CAiCG,CAAC,IAAJ,CAAC,EAAE,CAAC;IACT,oBAAC,CAAFF,CAAC,UAADA,CAAC,CAAG,uFAAAC,CAAC,CAAsB,CAAC,EAlC5BC,MAAM,CAkCS,CAAC,IAAW,CAAC,EAAb,CAAC;IACf,oBAAC,CAAFF,CAAC,UAADA,CAAC,CAAG,uFAAAG,CAAC,CAAC,CAAC,EA9BgBD,OAAM,CA8BpB,CAAC,IAAJ,CAAC,EAAE,CAAC;IACT,oBAAC,CAAFF,CAAC,UAADA,CAAC,CAAG,uFAAAG,CAAC,CAAsB,CAAC,EA/BLD,OAAM,CA+Bd,CAAC,IAAW,CAAC,EAAb,CAAC;IACf,oBAAC,CAAFF,CAAC,UAADA,CAAC,CAAG,2EAAAG,CAAC,GAAU,CAAC,EAhCqB,CAAC;IAiCrC,oBAAC,CAAFC,CAAC,UAAE,KAAK;IACP,oBAAC,CAAFC,CAAC,UAAE,KAAK,GAAE,GAAG;IACZ,oBAAC,CAAFC,CAAC,UAAD,EAAS,GAAG,EAAT,IAAI;IAEPN,CAAC,CAAC,kFAAAO,QAAQ,OAAR,iCAAU","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/runner integration/expressions/member access/generated/tests/generator/memberAccessWithRunnerIntegration/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/runner integration/expressions/member access/generated/tests/generator/memberAccessWithRunnerIntegration/gen_input.py index 60a79e4c5..11186b7a6 100644 --- a/packages/safe-ds-lang/tests/resources/generation/runner integration/expressions/member access/generated/tests/generator/memberAccessWithRunnerIntegration/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/runner integration/expressions/member access/generated/tests/generator/memberAccessWithRunnerIntegration/gen_input.py @@ -1,6 +1,6 @@ # Imports ---------------------------------------------------------------------- -import safeds_runner.server.pipeline_manager +import safeds_runner from typing import Any, TypeVar # Type variables --------------------------------------------------------------- @@ -15,14 +15,14 @@ def __gen_null_safe_member_access(receiver: Any, member_name: str) -> __gen_T | # Pipelines -------------------------------------------------------------------- def test(): - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccessWithRunnerIntegration.g", g, [], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccessWithRunnerIntegration.h", h, [], [])[0]) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccessWithRunnerIntegration.h", h, [], [])[1]) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccessWithRunnerIntegration.C", C, [], []).a) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccessWithRunnerIntegration.C", C, [], []).c) - f(__gen_null_safe_member_access(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccessWithRunnerIntegration.factory", factory, [], []), 'a')) - f(__gen_null_safe_member_access(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccessWithRunnerIntegration.factory", factory, [], []), 'c')) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccessWithRunnerIntegration.C.i", lambda *_ : 1.i(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccessWithRunnerIntegration.C", C, [], [])), [1], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccessWithRunnerIntegration.C.j", C.j, [safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccessWithRunnerIntegration.C", C, [], []), 123], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccessWithRunnerIntegration.C.k2", C.k2, [safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccessWithRunnerIntegration.C", C, [], []), 'abc'], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccessWithRunnerIntegration.C.from_csv_file", C.from_csv_file, ['abc.csv'], [safeds_runner.server.pipeline_manager.runner_filemtime('abc.csv')])) + f(safeds_runner.memoized_call("tests.generator.memberAccessWithRunnerIntegration.g", g, [], [])) + f(safeds_runner.memoized_call("tests.generator.memberAccessWithRunnerIntegration.h", h, [], [])[0]) + f(safeds_runner.memoized_call("tests.generator.memberAccessWithRunnerIntegration.h", h, [], [])[1]) + f(safeds_runner.memoized_call("tests.generator.memberAccessWithRunnerIntegration.C", C, [], []).a) + f(safeds_runner.memoized_call("tests.generator.memberAccessWithRunnerIntegration.C", C, [], []).c) + f(__gen_null_safe_member_access(safeds_runner.memoized_call("tests.generator.memberAccessWithRunnerIntegration.factory", factory, [], []), 'a')) + f(__gen_null_safe_member_access(safeds_runner.memoized_call("tests.generator.memberAccessWithRunnerIntegration.factory", factory, [], []), 'c')) + f(safeds_runner.memoized_call("tests.generator.memberAccessWithRunnerIntegration.C.i", lambda *_ : 1.i(safeds_runner.memoized_call("tests.generator.memberAccessWithRunnerIntegration.C", C, [], [])), [1], [])) + f(safeds_runner.memoized_call("tests.generator.memberAccessWithRunnerIntegration.C.j", C.j, [safeds_runner.memoized_call("tests.generator.memberAccessWithRunnerIntegration.C", C, [], []), 123], [])) + f(safeds_runner.memoized_call("tests.generator.memberAccessWithRunnerIntegration.C.k2", C.k2, [safeds_runner.memoized_call("tests.generator.memberAccessWithRunnerIntegration.C", C, [], []), 'abc'], [])) + f(safeds_runner.memoized_call("tests.generator.memberAccessWithRunnerIntegration.C.from_csv_file", C.from_csv_file, ['abc.csv'], [safeds_runner.file_mtime('abc.csv')])) diff --git a/packages/safe-ds-lang/tests/resources/generation/runner integration/expressions/member access/generated/tests/generator/memberAccessWithRunnerIntegration/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/runner integration/expressions/member access/generated/tests/generator/memberAccessWithRunnerIntegration/gen_input.py.map index f68f74228..003e6b8e5 100644 --- a/packages/safe-ds-lang/tests/resources/generation/runner integration/expressions/member access/generated/tests/generator/memberAccessWithRunnerIntegration/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/runner integration/expressions/member access/generated/tests/generator/memberAccessWithRunnerIntegration/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["test","f","g","h","result1","result2","c","a","b","factory","j","k","from_csv_file"],"mappings":"AAAA;;;;;;;;;;;;;;;;AA4BA,IAASA,IAAI;IACTC,CAAC,CAAC,2HAAAC,CAAC;IACHD,CAAC,CAAC,2HAAAE,CAAC,UAAGC,CAAO;IACbH,CAAC,CAAC,2HAAAE,CAAC,UAAGE,CAAO;IACbJ,CAAC,CAAC,2HAAAK,CAAC,UAAGC,CAAC;IACPN,CAAC,CAAC,2HAAAK,CAAC,UAAGE,CAAC;IACPP,CAAC,CAAU,6BAAC,CAAV,iIAAAQ,OAAO,YAAIF,CAAC;IACdN,CAAC,CAAU,6BAAC,CAAV,iIAAAQ,OAAO,YAAID,CAAC;IACdP,CAAC,CAAC,yIAAM,CAAC,GAAP,2HAAAK,CAAC,aAAK,CAAC;IACTL,CAAC,CAAC,6HAAAK,CAAC,CAAGI,CAAC,GAAL,2HAAAJ,CAAC,WAAK,GAAG;IACXL,CAAC,CAAC,8HAAAK,CAAC,CAAGK,EAAC,GAAL,2HAAAL,CAAC,WAAK,KAAK;IACbL,CAAC,CAAC,yIAAAK,CAAC,CAACM,aAAa,GAAC,SAAS,IAAT,uDAAA,SAAS","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["test","f","g","h","result1","result2","c","a","b","factory","j","k","from_csv_file"],"mappings":"AAAA;;;;;;;;;;;;;;;;AA4BA,IAASA,IAAI;IACTC,CAAC,CAAC,mFAAAC,CAAC;IACHD,CAAC,CAAC,mFAAAE,CAAC,UAAGC,CAAO;IACbH,CAAC,CAAC,mFAAAE,CAAC,UAAGE,CAAO;IACbJ,CAAC,CAAC,mFAAAK,CAAC,UAAGC,CAAC;IACPN,CAAC,CAAC,mFAAAK,CAAC,UAAGE,CAAC;IACPP,CAAC,CAAU,6BAAC,CAAV,yFAAAQ,OAAO,YAAIF,CAAC;IACdN,CAAC,CAAU,6BAAC,CAAV,yFAAAQ,OAAO,YAAID,CAAC;IACdP,CAAC,CAAC,iGAAM,CAAC,GAAP,mFAAAK,CAAC,aAAK,CAAC;IACTL,CAAC,CAAC,qFAAAK,CAAC,CAAGI,CAAC,GAAL,mFAAAJ,CAAC,WAAK,GAAG;IACXL,CAAC,CAAC,sFAAAK,CAAC,CAAGK,EAAC,GAAL,mFAAAL,CAAC,WAAK,KAAK;IACbL,CAAC,CAAC,iGAAAK,CAAC,CAACM,aAAa,GAAC,SAAS,IAAT,yBAAA,SAAS","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/general/generated/tests/generator/importsWithRunnerIntegration/gen_context_same_package.py b/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/general/generated/tests/generator/importsWithRunnerIntegration/gen_context_same_package.py index c02d2060c..58622ce67 100644 --- a/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/general/generated/tests/generator/importsWithRunnerIntegration/gen_context_same_package.py +++ b/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/general/generated/tests/generator/importsWithRunnerIntegration/gen_context_same_package.py @@ -1,13 +1,13 @@ # Imports ---------------------------------------------------------------------- -import safeds_runner.server.pipeline_manager +import safeds_runner # Segments --------------------------------------------------------------------- def segment1InSamePackage(): - __gen_yield_result = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.importsWithRunnerIntegration.impureFunction", impureFunction, [], []) + __gen_yield_result = safeds_runner.memoized_call("tests.generator.importsWithRunnerIntegration.impureFunction", impureFunction, [], []) return __gen_yield_result def segment2InSamePackage(): - __gen_yield_result = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.importsWithRunnerIntegration.impureFunction", impureFunction, [], []) + __gen_yield_result = safeds_runner.memoized_call("tests.generator.importsWithRunnerIntegration.impureFunction", impureFunction, [], []) return __gen_yield_result diff --git a/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/general/generated/tests/generator/importsWithRunnerIntegration/gen_context_same_package.py.map b/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/general/generated/tests/generator/importsWithRunnerIntegration/gen_context_same_package.py.map index 21bd02cef..6d172254f 100644 --- a/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/general/generated/tests/generator/importsWithRunnerIntegration/gen_context_same_package.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/general/generated/tests/generator/importsWithRunnerIntegration/gen_context_same_package.py.map @@ -1 +1 @@ -{"version":3,"sources":["context same package.sdstest"],"names":["segment1insamepackage","result","impurefunction","segment2insamepackage"],"mappings":"AAAA;;;;;;AAIA,IAAQA,qBAAqB;IACzB,YAAMC,MAAM,GAAG,mIAAAC,cAAc;IADD,OAAG;;AAInC,IAAQC,qBAAqB;IACzB,YAAMF,MAAM,GAAG,mIAAAC,cAAc;IADD,OAAG","file":"gen_context_same_package.py"} \ No newline at end of file +{"version":3,"sources":["context same package.sdstest"],"names":["segment1insamepackage","result","impurefunction","segment2insamepackage"],"mappings":"AAAA;;;;;;AAIA,IAAQA,qBAAqB;IACzB,YAAMC,MAAM,GAAG,2FAAAC,cAAc;IADD,OAAG;;AAInC,IAAQC,qBAAqB;IACzB,YAAMF,MAAM,GAAG,2FAAAC,cAAc;IADD,OAAG","file":"gen_context_same_package.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/general/generated/tests/generator/importsWithRunnerIntegration/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/general/generated/tests/generator/importsWithRunnerIntegration/gen_input.py index 38ba90040..d5f37e74c 100644 --- a/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/general/generated/tests/generator/importsWithRunnerIntegration/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/general/generated/tests/generator/importsWithRunnerIntegration/gen_input.py @@ -1,6 +1,6 @@ # Imports ---------------------------------------------------------------------- -import safeds_runner.server.pipeline_manager +import safeds_runner from special_location import function1InCompilationUnitWithPythonModule, function2InCompilationUnitWithPythonModule as h from tests.generator.differentPackageWithRunnerIntegration import function1InDifferentPackage, function2InDifferentPackage as g from tests.generator.importsWithRunnerIntegration.gen_context_same_package import segment1InSamePackage, segment2InSamePackage @@ -12,11 +12,11 @@ def test(): f(segment1InSamePackage()) f(segment2InSamePackage()) f(segment2InSamePackage()) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.differentPackageWithRunnerIntegration.function1InDifferentPackage", function1InDifferentPackage, [], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.differentPackageWithRunnerIntegration.function1InDifferentPackage", function1InDifferentPackage, [], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.differentPackageWithRunnerIntegration.function2InDifferentPackage", g, [], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.differentPackageWithRunnerIntegration.function2InDifferentPackage", g, [], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("special_location.function1InCompilationUnitWithPythonModule", function1InCompilationUnitWithPythonModule, [], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("special_location.function1InCompilationUnitWithPythonModule", function1InCompilationUnitWithPythonModule, [], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("special_location.function2InCompilationUnitWithPythonModule", h, [], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("special_location.function2InCompilationUnitWithPythonModule", h, [], [])) + f(safeds_runner.memoized_call("tests.generator.differentPackageWithRunnerIntegration.function1InDifferentPackage", function1InDifferentPackage, [], [])) + f(safeds_runner.memoized_call("tests.generator.differentPackageWithRunnerIntegration.function1InDifferentPackage", function1InDifferentPackage, [], [])) + f(safeds_runner.memoized_call("tests.generator.differentPackageWithRunnerIntegration.function2InDifferentPackage", g, [], [])) + f(safeds_runner.memoized_call("tests.generator.differentPackageWithRunnerIntegration.function2InDifferentPackage", g, [], [])) + f(safeds_runner.memoized_call("special_location.function1InCompilationUnitWithPythonModule", function1InCompilationUnitWithPythonModule, [], [])) + f(safeds_runner.memoized_call("special_location.function1InCompilationUnitWithPythonModule", function1InCompilationUnitWithPythonModule, [], [])) + f(safeds_runner.memoized_call("special_location.function2InCompilationUnitWithPythonModule", h, [], [])) + f(safeds_runner.memoized_call("special_location.function2InCompilationUnitWithPythonModule", h, [], [])) diff --git a/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/general/generated/tests/generator/importsWithRunnerIntegration/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/general/generated/tests/generator/importsWithRunnerIntegration/gen_input.py.map index b1c181d5d..39fdacc61 100644 --- a/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/general/generated/tests/generator/importsWithRunnerIntegration/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/general/generated/tests/generator/importsWithRunnerIntegration/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["test","f","segment1insamepackage","segment2insamepackage","function1indifferentpackage","g","function1incompilationunitwithpythonmodule","h"],"mappings":"AAAA;;;;;;;;;AASA,IAASA,IAAI;IACTC,CAAC,CAACC,qBAAqB;IACvBD,CAAC,CAACC,qBAAqB;IACvBD,CAAC,CAACE,qBAAqB;IACvBF,CAAC,CAACE,qBAAqB;IAEvBF,CAAC,CAAC,yJAAAG,2BAA2B;IAC7BH,CAAC,CAAC,yJAAAG,2BAA2B;IAC7BH,CAAC,CAAC,yJAAAI,CAAC;IACHJ,CAAC,CAAC,yJAAAI,CAAC;IAEHJ,CAAC,CAAC,mIAAAK,0CAA0C;IAC5CL,CAAC,CAAC,mIAAAK,0CAA0C;IAC5CL,CAAC,CAAC,mIAAAM,CAAC;IACHN,CAAC,CAAC,mIAAAM,CAAC","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["test","f","segment1insamepackage","segment2insamepackage","function1indifferentpackage","g","function1incompilationunitwithpythonmodule","h"],"mappings":"AAAA;;;;;;;;;AASA,IAASA,IAAI;IACTC,CAAC,CAACC,qBAAqB;IACvBD,CAAC,CAACC,qBAAqB;IACvBD,CAAC,CAACE,qBAAqB;IACvBF,CAAC,CAACE,qBAAqB;IAEvBF,CAAC,CAAC,iHAAAG,2BAA2B;IAC7BH,CAAC,CAAC,iHAAAG,2BAA2B;IAC7BH,CAAC,CAAC,iHAAAI,CAAC;IACHJ,CAAC,CAAC,iHAAAI,CAAC;IAEHJ,CAAC,CAAC,2FAAAK,0CAA0C;IAC5CL,CAAC,CAAC,2FAAAK,0CAA0C;IAC5CL,CAAC,CAAC,2FAAAM,CAAC;IACHN,CAAC,CAAC,2FAAAM,CAAC","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/wildcard/generated/tests/generator/wildcardWithRunnerIntegration/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/wildcard/generated/tests/generator/wildcardWithRunnerIntegration/gen_input.py index 1ae1dd525..2ab74b656 100644 --- a/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/wildcard/generated/tests/generator/wildcardWithRunnerIntegration/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/wildcard/generated/tests/generator/wildcardWithRunnerIntegration/gen_input.py @@ -1,17 +1,17 @@ # Imports ---------------------------------------------------------------------- -import safeds_runner.server.pipeline_manager +import safeds_runner from special_location import function1InCompilationUnitWithPythonModule, function2InCompilationUnitWithPythonModule from tests.generator.differentPackageWildcardWithRunnerIntegration import function1InDifferentPackage, function2InDifferentPackage # Pipelines -------------------------------------------------------------------- def test(): - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.differentPackageWildcardWithRunnerIntegration.function1InDifferentPackage", function1InDifferentPackage, [], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.differentPackageWildcardWithRunnerIntegration.function1InDifferentPackage", function1InDifferentPackage, [], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.differentPackageWildcardWithRunnerIntegration.function2InDifferentPackage", function2InDifferentPackage, [], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.differentPackageWildcardWithRunnerIntegration.function2InDifferentPackage", function2InDifferentPackage, [], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("special_location.function1InCompilationUnitWithPythonModule", function1InCompilationUnitWithPythonModule, [], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("special_location.function1InCompilationUnitWithPythonModule", function1InCompilationUnitWithPythonModule, [], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("special_location.function2InCompilationUnitWithPythonModule", function2InCompilationUnitWithPythonModule, [], [])) - f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("special_location.function2InCompilationUnitWithPythonModule", function2InCompilationUnitWithPythonModule, [], [])) + f(safeds_runner.memoized_call("tests.generator.differentPackageWildcardWithRunnerIntegration.function1InDifferentPackage", function1InDifferentPackage, [], [])) + f(safeds_runner.memoized_call("tests.generator.differentPackageWildcardWithRunnerIntegration.function1InDifferentPackage", function1InDifferentPackage, [], [])) + f(safeds_runner.memoized_call("tests.generator.differentPackageWildcardWithRunnerIntegration.function2InDifferentPackage", function2InDifferentPackage, [], [])) + f(safeds_runner.memoized_call("tests.generator.differentPackageWildcardWithRunnerIntegration.function2InDifferentPackage", function2InDifferentPackage, [], [])) + f(safeds_runner.memoized_call("special_location.function1InCompilationUnitWithPythonModule", function1InCompilationUnitWithPythonModule, [], [])) + f(safeds_runner.memoized_call("special_location.function1InCompilationUnitWithPythonModule", function1InCompilationUnitWithPythonModule, [], [])) + f(safeds_runner.memoized_call("special_location.function2InCompilationUnitWithPythonModule", function2InCompilationUnitWithPythonModule, [], [])) + f(safeds_runner.memoized_call("special_location.function2InCompilationUnitWithPythonModule", function2InCompilationUnitWithPythonModule, [], [])) diff --git a/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/wildcard/generated/tests/generator/wildcardWithRunnerIntegration/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/wildcard/generated/tests/generator/wildcardWithRunnerIntegration/gen_input.py.map index 468b461aa..d08dc91b0 100644 --- a/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/wildcard/generated/tests/generator/wildcardWithRunnerIntegration/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/runner integration/imports/wildcard/generated/tests/generator/wildcardWithRunnerIntegration/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["test","f","function1indifferentpackage","function2indifferentpackage","function1incompilationunitwithpythonmodule","function2incompilationunitwithpythonmodule"],"mappings":"AAAA;;;;;;;;AAOA,IAASA,IAAI;IACTC,CAAC,CAAC,iKAAAC,2BAA2B;IAC7BD,CAAC,CAAC,iKAAAC,2BAA2B;IAC7BD,CAAC,CAAC,iKAAAE,2BAA2B;IAC7BF,CAAC,CAAC,iKAAAE,2BAA2B;IAE7BF,CAAC,CAAC,mIAAAG,0CAA0C;IAC5CH,CAAC,CAAC,mIAAAG,0CAA0C;IAC5CH,CAAC,CAAC,mIAAAI,0CAA0C;IAC5CJ,CAAC,CAAC,mIAAAI,0CAA0C","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["test","f","function1indifferentpackage","function2indifferentpackage","function1incompilationunitwithpythonmodule","function2incompilationunitwithpythonmodule"],"mappings":"AAAA;;;;;;;;AAOA,IAASA,IAAI;IACTC,CAAC,CAAC,yHAAAC,2BAA2B;IAC7BD,CAAC,CAAC,yHAAAC,2BAA2B;IAC7BD,CAAC,CAAC,yHAAAE,2BAA2B;IAC7BF,CAAC,CAAC,yHAAAE,2BAA2B;IAE7BF,CAAC,CAAC,2FAAAG,0CAA0C;IAC5CH,CAAC,CAAC,2FAAAG,0CAA0C;IAC5CH,CAAC,CAAC,2FAAAI,0CAA0C;IAC5CJ,CAAC,CAAC,2FAAAI,0CAA0C","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/runner integration/statements/assignment/generated/tests/generator/assignmentWithRunnerIntegration/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/runner integration/statements/assignment/generated/tests/generator/assignmentWithRunnerIntegration/gen_input.py index 9ee01b90c..4675cb26a 100644 --- a/packages/safe-ds-lang/tests/resources/generation/runner integration/statements/assignment/generated/tests/generator/assignmentWithRunnerIntegration/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/runner integration/statements/assignment/generated/tests/generator/assignmentWithRunnerIntegration/gen_input.py @@ -1,6 +1,6 @@ # Imports ---------------------------------------------------------------------- -import safeds_runner.server.pipeline_manager +import safeds_runner # Segments --------------------------------------------------------------------- @@ -17,15 +17,15 @@ def testSegment(): def testPipeline(): g() a, _, _ = g() - safeds_runner.server.pipeline_manager.runner_save_placeholder('a', a) + safeds_runner.save_placeholder('a', a) x, _, _ = g() - safeds_runner.server.pipeline_manager.runner_save_placeholder('x', x) + safeds_runner.save_placeholder('x', x) f1(a) f1(x) l, m, n = g() - safeds_runner.server.pipeline_manager.runner_save_placeholder('l', l) - safeds_runner.server.pipeline_manager.runner_save_placeholder('m', m) - safeds_runner.server.pipeline_manager.runner_save_placeholder('n', n) + safeds_runner.save_placeholder('l', l) + safeds_runner.save_placeholder('m', m) + safeds_runner.save_placeholder('n', n) f1(l) f1(m) f1(n)