Yes, that’s true, it should be fairly similar. Sorry I may have come across as dismisive, thank you for checking that and pointing me in the right direction.
No you did not - I made a mistake and did not check (I read about the move but honestly did not make the connection while looking for the code - it did not even register that this is the wrong “language” I’m looking at).
Don’t worry I’m just curious and would love to help out with this
I have this issue too on FreeBSD 14.0 . When I try a spago run on a fresh repo and with the book source code. @bensnowball How did you manage this problem on your side? I hope you may have found a workaround by now. Let me know please.
Ah, I somehow missed this post - for future reference, feel free to tag me in Spago-related issues
This is a strange issue, and I can’t quite explain what’s happening, but it seems to be fairly common.
My first question would be: does this still happen with the new Spago? (i.e. the purescript rewrite)
You can get it with npm install spago@next
.
Thank you. I have just tried with next version it seems better. But I get an error for purescript compatibility:
$ spago init
Initializing a new project...
❌ No package set is compatible with your compiler version 0.15.9
Compatible versions:
0.15.4
0.15.7
0.15.8
bsd package hs-purescript
installing 0.15.9 version indeed.
Sorry, this isn’t much help, but I ended up going back to using Pulp and Bower. I don’t recommend that unless you have to. I’ll try using the new Spago & report back tomorrow.
One other thing, perhaps I’m misunderstanding your package set problem (which I don’t know much about), but might that be fixed by specifying a package set version like so?
it’s worth a try but I guess it’s worth pinging @f-f with this - seems like the version check in spago@next is more demanding.
Maybe an entry in the package-set repos latest-compatible-sets or moving forward to 0.15.9
there would be a better solution.
Thank you I didn’t know thid --tag parameter. I will try
Hey - seems a 0.15.9 package-set was just released - it probably works now without --tag ...
out of the box for you.
Yay! spago@next works out of the box on FreeBSD (at least with purs 0.15.8), so much easier, thanks to everyone involved!
I just have a minor question for @f-f or anyone else: In a project where build, bundle & everything else works, when I try to open the REPL with spago repl
nothing happens, it just returns to the shell prompt, without even an error message. I do have psci-support
installed so it isn’t that. Also the REPL does work ‘manually’ with purs repl 'src/**/*.purs' '.spago/**/*.purs'
. I’ve have looked in the issues but there doesn’t seem to be anything like this already reported.
EDIT: I just noticed Run.purs is a stub so presumably this is currently the expected behavior. But to anyone else with the same problem the “purs repl” work around above is close enough.
sorry I have just tried the tag parameter and I am very confused by the output I got:
24-06-23 11:02:19 /home/mik/Dev/purescript/test
mik@labo $ spago init --tag "psc-0.15.9-20230619"
spago init
Unexpected argument:
--tag
Initialise a new project
--help,-h Show this help message.
--no-color,--monochrome Force logging without ANSI color escape sequences
--quiet,-q Suppress all spago logging
--set Optional package set version to be used instead of the latest one.
--verbose,-v Enable additional debug logging, e.g. printing `purs` commands
24-06-23 11:03:17 /home/mik/Dev/purescript/test
mik@labo $ spago --version
0.93.6
@bensnowball how do you use 0.15.8 ?
@CarstenKoenig without tag I got the same error as before:
24-06-23 11:05:04 /home/mik/Dev/purescript/test
mik@labo $ npm install -g spago@next
changed 55 packages in 4s
24-06-23 11:08:11 /home/mik/Dev/purescript/test
mik@labo $ spago --version
0.93.6
24-06-23 11:08:14 /home/mik/Dev/purescript/test
mik@labo $ spago init
Refreshing the Registry Index...
Initializing a new project...
❌ No package set is compatible with your compiler version 0.15.9
Compatible versions:
0.15.4
0.15.7
0.15.8
I’m still looking, thank you
Yes but you should be able to use the --set
:
spago init --set 27.3.0
in this case it should be safe to use the latest one
EDIT: I’d still try to use non-next spago
for now - your first try seems to be with spago@next too. Because on 0.21.0 it works for me:
$ spago --version0.21.0
$ spago init --tag "psc-0.15.9-20230619"
[info] Initializing a sample project or migrating an existing one..
[info] Updating package-set tag to "psc-0.15.9-20230619"
...
I usually don’t use global installs - I do something like this:
npm init -y
npm install --save-dev purescript spago
npx spago init
and an ocassional npx spago upgrade-set
if I want to update dependencies.
(I use pnpm
but the idea is the same)
ah thank you it works. I saw this --set option but didn’t understand what it was for. I realize now that it’s the version of the repos “package set”.
I am at the very beginning of my learning path. sorry for that.
no need to apologize - I’m a PureScript user for quite a few years now and right now I cannot say that I totally understand what is going on with spago@next (to my fault - the info is out there but I did not find the time to really read/understand the great work done).
I’m sure the situation will be much clearer to beginners once spago@next and the new repository is finished/launched as default - for now I prefer the package-set style with old spago / and the tags for compiler/date
Yes I usually use pnpm. I wanted to do a simple global installation to start with while I got familiar with ps.
I will try the legacy version in the future I think.
Ok just try spago 0.21.0 and get this weird “Abort” message:
mik@labo $ npm install -g spago
added 80 packages, removed 40 packages, and changed 15 packages in 7s
24-06-23 11:45:24 /home/mik/Dev/purescript/purescript-book/exercises/chapter2
mik@labo $ spago --version
Abort
24-06-23 11:45:30 /home/mik/Dev/purescript/purescript-book/exercises/chapter2
mik@labo $ spago
Abort
24-06-23 11:45:36 /home/mik/Dev/purescript/purescript-book/exercises/chapter2
mik@labo $ whereis spago
spago: /home/mik/.npm-packages/bin/spago
24-06-23 11:46:21 /home/mik/Dev/purescript/purescript-book/exercises/chapter2
mik@labo $ npm uninstall -g spago
removed 95 packages in 163ms
24-06-23 11:46:28 /home/mik/Dev/purescript/purescript-book/exercises/chapter2
mik@labo $ npm uninstall -g spago@0.21.0
up to date in 148ms
24-06-23 11:48:24 /home/mik/Dev/purescript/purescript-book/exercises/chapter2
mik@labo $ npm install -g spago@0.21.0
added 95 packages in 1s
24-06-23 11:48:30 /home/mik/Dev/purescript/purescript-book/exercises/chapter2
mik@labo $ spago --version
Abort
So to sumarize:
- spago legacy npm version(0.21.0) doesn’t work on Freebsd,
- spago freebsd port seems to work, but fails on purescript book exercises
- spago@next works well on FreeBSD for new projects but fails running the book exercises.
The good news is I can use spago@next for my new project. For learning from the examples’ book I will run spago from a debian VM.
Thanks again for your help.
to be honest: no clue
can you try spago --version -v
(-v
for verbose output)?
same output:
24-06-23 12:02:30 /home/mik/Dev/purescript/purescript-book/exercises/chapter2
mik@labo $ spago --version -v
Abort
I saw when I install from pkg a dependency to libxslt, so I tried to install this lib and then install spago from npm. I hoped the problem come from this missing dependency but got the same “Abort” message.