Skip to content

Commit

Permalink
Clean up REPL (#2638)
Browse files Browse the repository at this point in the history
* Introduce Commands for REPL

* Start modularization

* Add support for relation's project in the legend Pure compiler

* Start grouping extensions

* Categorize more extensions

* Fix REPL commands
  • Loading branch information
pierredebelen authored Feb 17, 2024
1 parent 57cb6f4 commit 6c6ba1f
Show file tree
Hide file tree
Showing 274 changed files with 2,688 additions and 569 deletions.
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 "Plan_Transformer";
}

@Override
public String group()
{
return "Version_Transformers";
}

@Override
public MutableList<PlanTransformer> getExtraPlanTransformers()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,98 +27,120 @@
<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>
<!-- Pure Language Parser / Compiler -->

<!-- Java compiled code support -->
<dependency>
<groupId>org.finos.legend.pure</groupId>
<artifactId>legend-pure-m2-store-relational-pure</artifactId>
<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 6c6ba1f

Please sign in to comment.