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

Backend "psgo" exited with error:1 #80

Open
LcMaculan opened this issue Dec 27, 2022 · 2 comments
Open

Backend "psgo" exited with error:1 #80

LcMaculan opened this issue Dec 27, 2022 · 2 comments

Comments

@LcMaculan
Copy link

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"
@joprice
Copy link

joprice commented Mar 19, 2023

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

@leoxiang66
Copy link

I have the same problem. Please help

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

3 participants