Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack Overflow Error #663

Open
apostolos-geyer opened this issue Oct 1, 2024 · 1 comment
Open

Stack Overflow Error #663

apostolos-geyer opened this issue Oct 1, 2024 · 1 comment

Comments

@apostolos-geyer
Copy link

running pkl eval Conn.pkl

also, i know that i wasnt using the types right, but the IDE didn't say anything and i wanted to see what would happen :)

file Conn.pkl:

open module Conn

import "Conn.pkl"

conn_id: String = ""

const local function conn(id: String): Conn = new Conn { conn_id = id }

function s3(_bucket: String) = new Mixin<S3> {
  bucket = _bucket
}

connections = new Mapping {
  default { key ->
    conn_id = "\(key)_cloud"
  }
  ["bento"] {}
  ["idp"] {}
  ["databricks"] {}
  ["polaris_api"] = conn("polaris_api")
  ["samba"] = conn("nas_drive")

  ["sql"] = new CloudOnPremConn {
    onPrem = conn("sql_server")
    cloud = conn("azure_db_rw")
  }
  ["s3"] = new CloudOnPremConn {
    onPrem = conn("s3") |> s3("eyj0americasbucket02")
    cloud = conn("s3_polaris_cloud") |> s3("eyj0cloudamericabucket01")
  }
}

s3: CloudOnPremConn = new {
  onPrem = new S3 {
    conn_id = "s3"
    bucket = "eyj0americasbucket02"
  }
  cloud = new S3 {
    conn_id = "s3_polaris_cloud"
    bucket = "eyj0cloudamericabucket01"
  }
}

class CloudOnPremConn {
  onPrem: Conn
  cloud: Conn
}

class S3 extends Conn {
  bucket: String
}

here's the dump from the error:

An unexpected error has occurred. Would you mind filing a bug report?
Cmd+Double-click the link below to open an issue.
Please copy and paste the entire error output into the issue's description, provided you can share it.

https://github.com/apple/pkl/issues/new

java.lang.StackOverflowError

–– Pkl Error ––
Stack overflow

Pkl 0.26.3 (macOS 14.4.1, native)

java.lang.StackOverflowError
at org.graalvm.nativeimage.builder/com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.newStackOverflowError0(StackOverflowCheckImpl.java:329)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.newStackOverflowError(StackOverflowCheckImpl.java:325)
at org.graalvm.nativeimage.builder/com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.throwNewStackOverflowError(StackOverflowCheckImpl.java:305)
at com.oracle.svm.svm_enterprise/com.oracle.svm.enterprise.truffle.SubstrateEnterpriseOptimizedCallTarget.compiledEntryReturnObject(stripped:421)
at com.oracle.svm.svm_enterprise/com.oracle.svm.enterprise.truffle.SubstrateEnterpriseOptimizedCallTarget.a(stripped:281)
at com.oracle.svm.svm_enterprise/com.oracle.svm.enterprise.truffle.SubstrateEnterpriseOptimizedCallTarget.doInvoke(stripped:250)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callIndirect(OptimizedCallTarget.java:486)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedIndirectCallNode.call(OptimizedIndirectCallNode.java:52)
at org.pkl.core.runtime.VmUtils.doReadMember(VmUtils.java:305)
at org.pkl.core.runtime.VmUtils.readMemberOrNull(VmUtils.java:245)
at org.pkl.core.runtime.VmUtils.readMemberOrNull(VmUtils.java:203)
at org.pkl.core.ast.expression.member.ReadSuperEntryNode.executeGeneric(ReadSuperEntryNode.java:70)
at org.pkl.core.ast.expression.literal.EmptyObjectLiteralNodeGen.executeGeneric(EmptyObjectLiteralNodeGen.java:74)
at org.pkl.core.ast.PklRootNode.executeBody(PklRootNode.java:41)
at org.pkl.core.ast.MemberNode.executeBody(MemberNode.java:53)
at org.pkl.core.ast.member.UntypedObjectMemberNode.execute(UntypedObjectMemberNode.java:36)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.executeRootNode(OptimizedCallTarget.java:718)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.profiledPERoot(OptimizedCallTarget.java:641)
at com.oracle.svm.svm_enterprise/com.oracle.svm.enterprise.truffle.SubstrateEnterpriseOptimizedCallTarget.compiledEntryReturnObject(stripped:422)
at com.oracle.svm.svm_enterprise/com.oracle.svm.enterprise.truffle.SubstrateEnterpriseOptimizedCallTarget.a(stripped:281)
at com.oracle.svm.svm_enterprise/com.oracle.svm.enterprise.truffle.SubstrateEnterpriseOptimizedCallTarget.doInvoke(stripped:250)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callIndirect(OptimizedCallTarget.java:486)
at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.call(OptimizedCallTarget.java:467)
at org.graalvm.truffle/com.oracle.truffle.api.nodes.IndirectCallNode$1.call(IndirectCallNode.java:91)
at org.pkl.core.runtime.VmUtils.doReadMember(VmUtils.java:305)
at org.pkl.core.runtime.VmUtils.doReadMember(VmUtils.java:218)
at org.pkl.core.runtime.VmObject.force(VmObject.java:177)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:116)
at org.pkl.core.stdlib.AbstractRenderer.visitMapping(AbstractRenderer.java:329)
at org.pkl.core.runtime.VmMapping.accept(VmMapping.java:117)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitProperty(PcfRenderer.java:273)
at org.pkl.core.stdlib.AbstractRenderer.doVisitProperty(AbstractRenderer.java:195)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitTyped$0(AbstractRenderer.java:256)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:141)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitTyped(AbstractRenderer.java:252)
at org.pkl.core.stdlib.base.PcfRenderer.visitTyped(PcfRenderer.java:73)
at org.pkl.core.runtime.VmTyped.accept(VmTyped.java:168)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitEntryValue(PcfRenderer.java:254)
at org.pkl.core.stdlib.AbstractRenderer.doVisitEntry(AbstractRenderer.java:219)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitMapping$3(AbstractRenderer.java:332)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitMapping(AbstractRenderer.java:329)
at org.pkl.core.runtime.VmMapping.accept(VmMapping.java:117)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitProperty(PcfRenderer.java:273)
at org.pkl.core.stdlib.AbstractRenderer.doVisitProperty(AbstractRenderer.java:195)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitTyped$0(AbstractRenderer.java:256)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:141)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitTyped(AbstractRenderer.java:252)
at org.pkl.core.stdlib.base.PcfRenderer.visitTyped(PcfRenderer.java:73)
at org.pkl.core.runtime.VmTyped.accept(VmTyped.java:168)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitEntryValue(PcfRenderer.java:254)
at org.pkl.core.stdlib.AbstractRenderer.doVisitEntry(AbstractRenderer.java:219)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitMapping$3(AbstractRenderer.java:332)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitMapping(AbstractRenderer.java:329)
at org.pkl.core.runtime.VmMapping.accept(VmMapping.java:117)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitProperty(PcfRenderer.java:273)
at org.pkl.core.stdlib.AbstractRenderer.doVisitProperty(AbstractRenderer.java:195)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitTyped$0(AbstractRenderer.java:256)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:141)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitTyped(AbstractRenderer.java:252)
at org.pkl.core.stdlib.base.PcfRenderer.visitTyped(PcfRenderer.java:73)
at org.pkl.core.runtime.VmTyped.accept(VmTyped.java:168)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitEntryValue(PcfRenderer.java:254)
at org.pkl.core.stdlib.AbstractRenderer.doVisitEntry(AbstractRenderer.java:219)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitMapping$3(AbstractRenderer.java:332)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitMapping(AbstractRenderer.java:329)
at org.pkl.core.runtime.VmMapping.accept(VmMapping.java:117)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitProperty(PcfRenderer.java:273)
at org.pkl.core.stdlib.AbstractRenderer.doVisitProperty(AbstractRenderer.java:195)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitTyped$0(AbstractRenderer.java:256)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:141)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitTyped(AbstractRenderer.java:252)
at org.pkl.core.stdlib.base.PcfRenderer.visitTyped(PcfRenderer.java:73)
at org.pkl.core.runtime.VmTyped.accept(VmTyped.java:168)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitEntryValue(PcfRenderer.java:254)
at org.pkl.core.stdlib.AbstractRenderer.doVisitEntry(AbstractRenderer.java:219)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitMapping$3(AbstractRenderer.java:332)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitMapping(AbstractRenderer.java:329)
at org.pkl.core.runtime.VmMapping.accept(VmMapping.java:117)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitProperty(PcfRenderer.java:273)
at org.pkl.core.stdlib.AbstractRenderer.doVisitProperty(AbstractRenderer.java:195)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitTyped$0(AbstractRenderer.java:256)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:141)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitTyped(AbstractRenderer.java:252)
at org.pkl.core.stdlib.base.PcfRenderer.visitTyped(PcfRenderer.java:73)
at org.pkl.core.runtime.VmTyped.accept(VmTyped.java:168)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitEntryValue(PcfRenderer.java:254)
at org.pkl.core.stdlib.AbstractRenderer.doVisitEntry(AbstractRenderer.java:219)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitMapping$3(AbstractRenderer.java:332)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitMapping(AbstractRenderer.java:329)
at org.pkl.core.runtime.VmMapping.accept(VmMapping.java:117)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitProperty(PcfRenderer.java:273)
at org.pkl.core.stdlib.AbstractRenderer.doVisitProperty(AbstractRenderer.java:195)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitTyped$0(AbstractRenderer.java:256)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:141)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitTyped(AbstractRenderer.java:252)
at org.pkl.core.stdlib.base.PcfRenderer.visitTyped(PcfRenderer.java:73)
at org.pkl.core.runtime.VmTyped.accept(VmTyped.java:168)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitEntryValue(PcfRenderer.java:254)
at org.pkl.core.stdlib.AbstractRenderer.doVisitEntry(AbstractRenderer.java:219)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitMapping$3(AbstractRenderer.java:332)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitMapping(AbstractRenderer.java:329)
at org.pkl.core.runtime.VmMapping.accept(VmMapping.java:117)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitProperty(PcfRenderer.java:273)
at org.pkl.core.stdlib.AbstractRenderer.doVisitProperty(AbstractRenderer.java:195)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitTyped$0(AbstractRenderer.java:256)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:141)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitTyped(AbstractRenderer.java:252)
at org.pkl.core.stdlib.base.PcfRenderer.visitTyped(PcfRenderer.java:73)
at org.pkl.core.runtime.VmTyped.accept(VmTyped.java:168)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitEntryValue(PcfRenderer.java:254)
at org.pkl.core.stdlib.AbstractRenderer.doVisitEntry(AbstractRenderer.java:219)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitMapping$3(AbstractRenderer.java:332)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitMapping(AbstractRenderer.java:329)
at org.pkl.core.runtime.VmMapping.accept(VmMapping.java:117)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitProperty(PcfRenderer.java:273)
at org.pkl.core.stdlib.AbstractRenderer.doVisitProperty(AbstractRenderer.java:195)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitTyped$0(AbstractRenderer.java:256)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:141)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitTyped(AbstractRenderer.java:252)
at org.pkl.core.stdlib.base.PcfRenderer.visitTyped(PcfRenderer.java:73)
at org.pkl.core.runtime.VmTyped.accept(VmTyped.java:168)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitEntryValue(PcfRenderer.java:254)
at org.pkl.core.stdlib.AbstractRenderer.doVisitEntry(AbstractRenderer.java:219)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitMapping$3(AbstractRenderer.java:332)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitMapping(AbstractRenderer.java:329)
at org.pkl.core.runtime.VmMapping.accept(VmMapping.java:117)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitProperty(PcfRenderer.java:273)
at org.pkl.core.stdlib.AbstractRenderer.doVisitProperty(AbstractRenderer.java:195)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitTyped$0(AbstractRenderer.java:256)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:141)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitTyped(AbstractRenderer.java:252)
at org.pkl.core.stdlib.base.PcfRenderer.visitTyped(PcfRenderer.java:73)
at org.pkl.core.runtime.VmTyped.accept(VmTyped.java:168)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitEntryValue(PcfRenderer.java:254)
at org.pkl.core.stdlib.AbstractRenderer.doVisitEntry(AbstractRenderer.java:219)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitMapping$3(AbstractRenderer.java:332)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitMapping(AbstractRenderer.java:329)
at org.pkl.core.runtime.VmMapping.accept(VmMapping.java:117)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitProperty(PcfRenderer.java:273)
at org.pkl.core.stdlib.AbstractRenderer.doVisitProperty(AbstractRenderer.java:195)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitTyped$0(AbstractRenderer.java:256)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:141)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitTyped(AbstractRenderer.java:252)
at org.pkl.core.stdlib.base.PcfRenderer.visitTyped(PcfRenderer.java:73)
at org.pkl.core.runtime.VmTyped.accept(VmTyped.java:168)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitEntryValue(PcfRenderer.java:254)
at org.pkl.core.stdlib.AbstractRenderer.doVisitEntry(AbstractRenderer.java:219)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitMapping$3(AbstractRenderer.java:332)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitMapping(AbstractRenderer.java:329)
at org.pkl.core.runtime.VmMapping.accept(VmMapping.java:117)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitProperty(PcfRenderer.java:273)
at org.pkl.core.stdlib.AbstractRenderer.doVisitProperty(AbstractRenderer.java:195)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitTyped$0(AbstractRenderer.java:256)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:141)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitTyped(AbstractRenderer.java:252)
at org.pkl.core.stdlib.base.PcfRenderer.visitTyped(PcfRenderer.java:73)
at org.pkl.core.runtime.VmTyped.accept(VmTyped.java:168)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitEntryValue(PcfRenderer.java:254)
at org.pkl.core.stdlib.AbstractRenderer.doVisitEntry(AbstractRenderer.java:219)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitMapping$3(AbstractRenderer.java:332)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitMapping(AbstractRenderer.java:329)
at org.pkl.core.runtime.VmMapping.accept(VmMapping.java:117)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitProperty(PcfRenderer.java:273)
at org.pkl.core.stdlib.AbstractRenderer.doVisitProperty(AbstractRenderer.java:195)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitTyped$0(AbstractRenderer.java:256)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:141)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitTyped(AbstractRenderer.java:252)
at org.pkl.core.stdlib.base.PcfRenderer.visitTyped(PcfRenderer.java:73)
at org.pkl.core.runtime.VmTyped.accept(VmTyped.java:168)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitEntryValue(PcfRenderer.java:254)
at org.pkl.core.stdlib.AbstractRenderer.doVisitEntry(AbstractRenderer.java:219)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitMapping$3(AbstractRenderer.java:332)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitMapping(AbstractRenderer.java:329)
at org.pkl.core.runtime.VmMapping.accept(VmMapping.java:117)
at org.pkl.core.runtime.VmValueVisitor.visit(VmValueVisitor.java:65)
at org.pkl.core.stdlib.AbstractRenderer.visit(AbstractRenderer.java:126)
at org.pkl.core.stdlib.base.PcfRenderer.visitProperty(PcfRenderer.java:273)
at org.pkl.core.stdlib.AbstractRenderer.doVisitProperty(AbstractRenderer.java:195)
at org.pkl.core.stdlib.AbstractRenderer.lambda$visitTyped$0(AbstractRenderer.java:256)
at org.pkl.core.runtime.VmObject.lambda$iterateAlreadyForcedMemberValues$1(VmObject.java:132)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:148)
at org.pkl.core.runtime.VmObject.iterateMembers(VmObject.java:141)
at org.pkl.core.runtime.VmObject.iterateAlreadyForcedMemberValues(VmObject.java:124)
at org.pkl.core.runtime.VmObject.forceAndIterateMemberValues(VmObject.java:117)
at org.pkl.core.stdlib.AbstractRenderer.visitTyped(AbstractRenderer.java:252)
at org.pkl.core.stdlib.base.PcfRenderer.visitTyped(PcfRenderer.java:73)
at org.pkl.core.runtime.VmTyped.accept(VmTyped.java:168)
... etc etc etc

@bioball
Copy link
Contributor

bioball commented Oct 3, 2024

You have a circular object that you are attempting to render. We should improve the error message here, although it's correct that it's throwing here.

Here's one circular path:

Conn.pkl -> s3 -> onPrem -> s3 -> onPrem -> s3 -> onPrem -> s3 -> ...

Somethings that can help you out is to separate your classes, so that s3 and connections are not properties of the Conn.

Here's one way to do it:

// Conn.pkl
open module Conn

import "Conn.pkl"

conn_id: String = ""

class CloudOnPremConn {
  onPrem: Conn?
  cloud: Conn?
}

class S3 extends Conn {
  bucket: String
}
// Connections.pkl
import "Conn.pkl"

connections: Mapping<String, Conn>

s3: Conn.CloudOnPremConn
// myConnections.pkl
amends "Connections.pkl"

import "Conn.pkl"

connections {
  default { key ->
    conn_id = "\(key)_cloud"
  }
  ["bento"] {}
  ["idp"] {}
  ["databricks"] {}
}

s3 {
  onPrem = new Conn.S3 {
    conn_id = "s3"
    bucket = "eyj0americasbucket02"
  }
  cloud = new Conn.S3 {
    conn_id = "s3_polaris_cloud"
    bucket = "eyj0cloudamericabucket01"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@bioball @apostolos-geyer and others