Backend "psgo" exited with error:1
Hello guys, I'm trying purescript-native but I have some issues during the build phase. Can you help me?
% yarn spago build
[1 of 1] Compiling Main
[info] Build succeeded.
psgo: failed
CallStack (from HasCallStack):
error, called at app/Main.hs:57:10 in main:Main
[error] Backend "psgo" exited with error:1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
% yarn purs --version
yarn run v1.22.18
0.15.7
% yarn spago --version
yarn run v1.22.18
0.20.9
% psgo --version
master, commit cd83d8c93b0c3af33d7a17d7be1f8864fd590776
spago.dhall
{ name = "my-project"
, dependencies = [ "console", "effect", "prelude" ]
, packages = ./packages.dhall
, sources = [ "src/**/*.purs", "test/**/*.purs" ]
, backend = "psgo"
}
Main.purs
module Main where
import Prelude
import Effect (Effect)
import Effect.Console (log)
main :: Effect Unit
main = do
log "test"
I hit this and found that it is failing to parse the new corefn. Perhaps it can be patched to handle it, but I started trying to upgrade the project to support the 0.15 compiler. I have a work in progress branch here updating to the latest purescript version:
https://github.com/andyarvanitis/purescript-native/compare/golang...joprice:purescript-native:upgrade-0.15?expand=1
There are still some issues left to figure out, such as the way unused dictionaries are now represented in the corefn, where they are marked as unused, so the go code does not include a parameter in the function definition. I included unused idents for now to tease out the other issues, but perhaps that will cause issues elsewhere where the idents really should be dropped.
There are also some additions to ffi that will have to be made, of which I've only done one so far:
https://github.com/andyarvanitis/purescript-native-go-ffi/compare/master...joprice:purescript-native-go-ffi:purescript-0.15?expand=1
I have the same problem. Please help