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

Unexpected error on windows10 when running pkl-go-examples #97

Open
zerist opened this issue Aug 19, 2024 · 0 comments
Open

Unexpected error on windows10 when running pkl-go-examples #97

zerist opened this issue Aug 19, 2024 · 0 comments

Comments

@zerist
Copy link

zerist commented Aug 19, 2024

go version go1.22.5 windows/amd64
Pkl 0.26.3 (Windows 10.0, native)
pkl-gen-go 0.8.0

foo.pkl
foo: String = "hello" bar: Int = 5

main.go
`package main

import (
"context"
"fmt"

"github.com/apple/pkl-go/pkl"

)

type MyConfig struct {
Foo string pkl:"foo"
Bar int pkl:"bar"
}

func main() {
evaluator, err := pkl.NewEvaluator(context.Background(), pkl.PreconfiguredOptions)
if err != nil {
panic(err)
}
defer evaluator.Close()
var cfg MyConfig
if err = evaluator.EvaluateModule(context.Background(), pkl.FileSource("foo.pkl"), &cfg); err != nil {
panic(err)
}
fmt.Printf("Got module: %+v", cfg)
}
`

Just run it, then I got
`[Running] go run "d:\backup\pkl-go-examples\pkl-go-examples\main.go"
panic: org.pkl.core.PklBugException: An unexpected error has occurred. Would you mind filing a bug report?

goroutine 1 [running]:
main.main()
d:/backup/pkl-go-examples/pkl-go-examples/main.go:23 +0x1db
exit status 2

[Done] exited with code=1 in 3.145 seconds
`
How can fix it? Or how can I report this error?

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

1 participant