#`bkref ToState ` is panicking
1 messages ยท Page 1 of 1 (latest)
Thanks! Yeah my next question would be wheter it's bkref that's nil (in which case our code just probably needs to check and handle it) or if it's within the .ToState() impl, which I think means we need a fix upstream (if it hasn't been made already)
I'll try to suss that out. Is there a better way to test than simply building + running via mage engine:dev?
Probably not really... it's not the sort of thing that can be unit tested as far as I think, you kind need the whole system up and running more or less
Cool. At least I'm not wasting cycles completely unnecessarily ๐
bkref is nil
If I change
st, err := bkref.ToState()
if err != nil {
return nil, err
}
to
var st llb.State
if bkref == nil {
st = llb.Scratch()
} else {
st, err = bkref.ToState()
if err != nil {
return nil, err
}
}
It runs.
Awesome! :shipit: ๐