Skip to content

Commit

Permalink
Clean up REPL (finos#2654)
Browse files Browse the repository at this point in the history
* Clean up REPL. Add support for the new relation project funciton in Engine

* Continue module clean up

* More module clean ups
  • Loading branch information
pierredebelen authored Feb 24, 2024
1 parent cfd48d9 commit c9ade05
Show file tree
Hide file tree
Showing 293 changed files with 3,268 additions and 636 deletions.
5 changes: 5 additions & 0 deletions legend-engine-config/legend-engine-configuration/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,14 @@
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-executionPlan-generation</artifactId>
</dependency>

<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections-api</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@

public class LegendPlanGeneratorExtension implements PlanGeneratorExtension
{
@Override
public String type()
{
return "Protocol_Version_Transformer";
}

@Override
public MutableList<String> group()
{
return org.eclipse.collections.impl.factory.Lists.mutable.with("Version_Transformer");
}

@Override
public MutableList<PlanTransformer> getExtraPlanTransformers()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,98 +27,124 @@
<name>Legend Engine - REPL - Client</name>

<dependencies>

<dependency>
<groupId>org.jline</groupId>
<artifactId>jline</artifactId>
<version>3.24.1</version>
</dependency>


<!-- Pure Language Parser / Compiler -->
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-repl-interface</artifactId>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m4</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections</artifactId>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m3-core</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections-api</artifactId>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-protocol</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-runtime-java-engine-compiled</artifactId>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-protocol-pure</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m2-dsl-store-pure</artifactId>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-language-pure-grammar</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m4</artifactId>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-language-pure-compiler</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m2-store-relational-pure</artifactId>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-shared-extensions</artifactId>
</dependency>
<!-- Pure Language Parser / Compiler -->

<!-- Java compiled code support -->
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-code-compiled-core</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m3-core</artifactId>
<artifactId>legend-pure-runtime-java-engine-compiled</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-repl-local</artifactId>
<artifactId>legend-engine-pure-platform-java</artifactId>
<scope>Runtime</scope>
</dependency>
<!-- Java compiled code support -->

<!-- Pure Plan Generation / Execution -->
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-executionPlan-execution</artifactId>
<artifactId>legend-engine-pure-code-core-extension</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-xt-relationalStore-executionPlan</artifactId>
<artifactId>legend-engine-executionPlan-generation</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-language-pure-compiler</artifactId>
<artifactId>legend-engine-executionPlan-execution</artifactId>
</dependency>
<!-- Pure Plan Generation / Execution -->

<!-- Relational -->
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-protocol-pure</artifactId>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m2-dsl-store-pure</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-language-pure-grammar</artifactId>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m2-store-relational-pure</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-code-core-extension</artifactId>
<artifactId>legend-engine-xt-relationalStore-executionPlan</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-executionPlan-generation</artifactId>
<artifactId>legend-engine-xt-relationalStore-grammar</artifactId>
<scope>Runtime</scope>
</dependency>
<!-- Relational -->

<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-pure-code-compiled-core</artifactId>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-shared-core</artifactId>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections-api</artifactId>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-protocol</artifactId>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>


<!-- TODO -> Itemize... Only using ErrorManagement import org.finos.legend.engine.shared.core.operational.errorManagement.EngineException; -->
<dependency>
<groupId>org.finos.legend.engine</groupId>
<artifactId>legend-engine-shared-core</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package org.finos.legend.engine.repl.local;
package org.finos.legend.engine.repl;

import org.eclipse.collections.api.RichIterable;
import org.eclipse.collections.api.tuple.Pair;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public String functionName()
public MutableList<CompletionItem> proposedParameters(AppliedFunction currentFunc, GenericType leftType, PureModel pureModel, Completer completer, ProcessingContext processingContext, ValueSpecification currentVS)
{
RichIterable<Root_meta_pure_runtime_PackageableRuntime> runtimes;

if (currentFunc.parameters.size() == 1)
{
runtimes = pureModel.getAllRuntimes();
Expand All @@ -49,7 +48,6 @@ public MutableList<CompletionItem> proposedParameters(AppliedFunction currentFun
{
String path = ((PackageableElementPtr) currentFunc.parameters.get(1)).fullPath;
runtimes = pureModel.getAllRuntimes().select(c -> PackageableElement.getUserPathForPackageableElement(c).startsWith(path));

}
return runtimes.collect(c -> new CompletionItem(PackageableElement.getUserPathForPackageableElement(c), PackageableElement.getUserPathForPackageableElement(c) + ")")).toList();
}
Expand Down
Loading

0 comments on commit c9ade05

Please sign in to comment.