go module initialization
I had issues getting the tests working due to the go module having a replace directive, but not a requires directive. Running a go get for each module after writing the files works to get the tests to run. I'll put up a pr for that change after I verify it a bit more.
Here's the fix on my wip branch for the new compiler version: https://github.com/joprice/purescript-native/commit/c749c91e0237ad529e8e113dff9c3b6de7e15d09#diff-d3e498a88b4c374b1edbd8693542a73e944d51a24a64a683658926ba655bc6ffR179-R196
Thanks for your PRs! I haven't been keeping up with purescript (or obviously my project) for quite some time, but it is nice to see some recent activity. Are you using it for anything interesting?
No problem. I'm only using it for experiments so far, but it fits the bill of a high level functional language that compiles to a relatively small self-contained binary, which is what excites me about it.
@joprice I'm trying to build this today and I'm struggling quite a bit. Do you have any tips?
This is the branch I believe I had mostly working, but I may have left it in a bad state https://github.com/andyarvanitis/purescript-native/compare/golang...joprice:purescript-native:upgrade-0.15. . I can try rebuilding and see if something has bit rotted, but curious what issues you're seeing?
@joprice Very cool, I got it to work with your branch and fiddling with some useSystemGhc: true
Now I have:
module project.localhost/purescript-native/output provides package project.localhost/purescript-native/output/Main and is replaced but not required; to add it:
go get project.localhost/purescript-native/output
psgo: callProcess: go "build" "project.localhost/purescript-native/output/Main" (exit 1): failed
When doing spago build. Is this what this ticket is about?
Okay, just heeding all these warnings makes it work. Exciting!
Even found some old notes:
https://gist.github.com/i-am-the-slime/1ad096a51d155e619dae64f9829c2804
Those are some thorough notes. Seems more like a getting started tutorial that should be added to the readme.
For some of the steps with Go module handling I was trying to tuck under the covers so you could just spago run and have it all work, but I only did Go years before they added modules so I’m not sure how you’re supposed to work with them exactly, whether the control should be left to the user.