Skip to content

Commit

Permalink
develop change tokens in interpreted mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-klatt committed Oct 26, 2024
1 parent e7e709b commit ba53b0a
Show file tree
Hide file tree
Showing 100 changed files with 6,098 additions and 6,595 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static org.eclipse.collections.api.block.function.Function<Property, org.
if (property.defaultValue != null)
{
LambdaFunction<?> lambdaFunction = HelperValueSpecificationBuilder.buildLambda(Collections.singletonList(property.defaultValue.value), Collections.emptyList(), context);
defaultValue = new Root_meta_pure_metamodel_function_property_DefaultValue_Impl(null, SourceInformationHelper.toM3SourceInformation(property.defaultValue.sourceInformation), null);
defaultValue = new Root_meta_pure_metamodel_function_property_DefaultValue_Impl(null, SourceInformationHelper.toM3SourceInformation(property.defaultValue.sourceInformation), context.pureModel.getClass("meta::pure::metamodel::function::property::DefaultValue"));
defaultValue._functionDefinition(lambdaFunction);
}
GenericType returnGenericType = context.resolveGenericType(property.type, property.propertyTypeSourceInformation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Pure IDE Light is a development environment for Pure, the language underlying th
From the root of legend-engine, run the following to launch the Pure IDE Light server.

```
mvn -pl legend-engine-pure-ide-light exec:java -Dexec.mainClass="org.finos.legend.engine.ide.PureIDELight" -Dexec.args="server ./legend-engine-pure-ide-light/src/main/resources/ideLightConfig.json"
mvn -pl legend-engine-pure/legend-engine-pure-ide/legend-engine-pure-ide-light-http-server exec:java -Dexec.mainClass="org.finos.legend.engine.ide.PureIDELight" -Dexec.args="server ./legend-engine-pure/legend-engine-pure-ide/legend-engine-pure-ide-light-http-server/src/main/resources/ideLightConfig.json"
```

Then navigate to http://127.0.0.1/ide
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,16 @@
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-runtime-java-extension-interpreted-functions-legendCompiler</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-runtime-java-extension-interpreted-functions-javaCompiler</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-runtime-java-extension-compiled-functions-javaCompiler</artifactId>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>org.finos.legend.engine</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections-api</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-code-compiled-core</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-changetoken-pure</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,6 @@ public GenerateDiff(List<PackageableElement> newEntities, List<PackageableElemen
PureModelContextData pureModelContextData = pureModelContextDataBuilder.build();
executionSupport = new CompiledExecutionSupport(new JavaCompilerState(null, classLoader), new CompiledProcessorSupport(classLoader, MetadataLazy.fromClassLoader(classLoader, CodeRepositoryProviderHelper.findCodeRepositories().collect(CodeRepository::getName)), Sets.mutable.empty()), null, new CompositeCodeStorage(new VersionControlledClassLoaderCodeStorage(classLoader, Lists.mutable.of(CodeRepositoryProviderHelper.findPlatformCodeRepository()), null)), null, null, new ConsoleCompiled(), new FunctionCache(), new ClassCache(classLoader), null, Sets.mutable.empty(), CompiledExtensionLoader.extensions());
pureModel = new PureModel(pureModelContextData, Identity.getAnonymousIdentity().getName(), classLoader, DeploymentMode.PROD);
JavaSourceCodeGenerator javaSourceCodeGenerator = new JavaSourceCodeGenerator(new MixedProcessorSupport(pureModel.getExecutionSupport().getProcessorSupport()), new EmptyCodeStorage(), false, null, false, pureModel.getExecutionSupport().getCompiledExtensions(), "ChangeTokens", null, false);
MutableSet<String> allTypes = pureModel.getModelClasses().collect(a ->
core_pure_corefunctions_metaExtension.Root_meta_pure_functions_meta_fullPackageName_PackageableElement_1__String_1__String_1_((org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.PackageableElement) a, "::", pureModel.getExecutionSupport())).toSet();
MutableList<StringJavaSource> javaSources = Lists.mutable.empty();
javaSources.addAllIterable(javaSourceCodeGenerator.generatePureCoreHelperClasses(javaSourceCodeGenerator.getProcessorContext()));
javaSources.addAllIterable(javaSourceCodeGenerator.generateCode(allTypes));
try
{
compiler.compile(javaSources);
}
catch (PureJavaCompileException e)
{
throw new RuntimeException(e);
}
}

private static PureMap toPureMap(Map objectNode)
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit ba53b0a

Please sign in to comment.