apple / pkl-go

Pkl bindings for the Go programming language
https://pkl-lang.org/go/current/index.html
Apache License 2.0
255 stars 22 forks source link

expected array length 2 but got 4 #91

Open blacktop opened 1 month ago

blacktop commented 1 month ago

Using Symbolicator.pkl

With xnu.pkl

I'm getting the error: expected array length 2 but got 4

?

Looking at your docs I can't see what I'm doing wrong?

blacktop commented 1 month ago

Adding amends "../pkl/Symbolicator.pkl" to the top of xnu.pkl seemed to fix it, but I have no idea why?

Should I be using import or something else? What would others use if they had their own signatures ?

HT154 commented 1 month ago

Heads up that your linked files don't appear to be visible publicly, so it's hard to try and diagnose what's happening here.

blacktop commented 1 month ago

@HT154 ?? I just opened this issue in a private tab and can get to both files just fine?

HT154 commented 1 month ago

Huh. The Github app errors on the links, but browser is fine. Sorry about that 😓

blacktop commented 1 month ago

closing due to this mostly just being me not understanding how pkls work, but that error wasn't very helpful ;)

bioball commented 1 month ago

Re-opening this; that error message indicates that there is at least some error condition that we should be catching but aren't.

bioball commented 1 month ago

@blacktop: is there a commit that you can point us to that reproduces this? On that branch, removing the amends header gives me another error.

But, yeah--the standard flow is to add the amends header like you are doing.

blacktop commented 1 month ago

@bioball this should be the commit right before I added amend https://github.com/blacktop/ipsw/commit/302e96e93ccafd091e697d3113cbe6f868b80e72