Runtime error when invoking pkl-gen-go
m-mizutani opened this issue · 2 comments
m-mizutani commented
I attempted to invoke pkl-gen-go
, but encountered an error right away. Based on my understanding, the command is supposed to display a banner. How can I prevent the error from occurring?
Environment
- OS: macOS Sonoma 14.3
- go: version go1.22.0 darwin/arm64
- pkl-go: v0.5.2
Reproduce
$ pkl-gen-go
panic: –– Pkl Error ––
Cannot find resource `resources/VERSION.txt`.
22 | local version = read("resources/VERSION.txt").text.trim()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
at pkl.golang.GeneratorSettings#version (file:///Users/mizutani/.go/pkg/mod/github.com/apple/pkl-go@v0.5.2/codegen/src/GeneratorSettings.pkl)
70 | generatorScriptPath: String = "package://pkg.pkl-lang.org/pkl-go/pkl.golang@\(version)#/Generator.pkl"
^^^^^^^
at pkl.golang.GeneratorSettings#generatorScriptPath (file:///Users/mizutani/.go/pkg/mod/github.com/apple/pkl-go@v0.5.2/codegen/src/GeneratorSettings.pkl)
goroutine 1 [running]:
main.init.0()
/Users/mizutani/.go/pkg/mod/github.com/apple/pkl-go@v0.5.2/cmd/pkl-gen-go/pkl-gen-go.go:180 +0x700
bioball commented
There's currently a bug when you install via go install
. For now, you'll need to download the binaries directly, from https://github.com/apple/pkl-go/releases/tag/v0.5.2.
This will be fixed in #9
m-mizutani commented
Thank you for your support! It works with downloaded binary.
Please close this issue
Let me close the issue