Bug 272064 - devel/hs-spago fails to test/run/build project
Summary: devel/hs-spago fails to test/run/build project
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-haskell (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-18 11:07 UTC by Michael V
Modified: 2023-06-18 12:58 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (haskell)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael V 2023-06-18 11:07:29 UTC
Hi,

After installing `hs-purescript` and `hs-spago`, running `cargo build` in a fresh project fails with a git error:

```
18-06-23 13:06:09 /home/mik/Dev/purescript
mik@labo $ mkdir test
18-06-23 13:06:30 /home/mik/Dev/purescript
mik@labo $ cd test/                                                                                      
18-06-23 13:06:33 /home/mik/Dev/purescript/test
mik@labo $ spago init
[info] Initializing a sample project or migrating an existing one..
[info] Updating package-set tag to "psc-0.15.8-20230617"
Fetching the new one and generating hashes.. (this might take some time)
[info] Generating new hashes for the package set file so it will be cached.. (this might take some time)
[info] Set up a local Spago project.
[info] Try running `spago build`
18-06-23 13:06:38 /home/mik/Dev/purescript/test
mik@labo $ spago run
[info] Installing 3 dependencies.
[info] Searching for packages cache metadata..
[info] Recent packages cache metadata found, using it..
[info] Installing "prelude"
[info] Installing "effect"
[info] Installing "console"
[error] 
Failed to install dependency "console"
Git output:

fatal: destination path '.' already exists and is not an empty directory.


Aborting installation..
[error] 
Failed to install dependency "effect"
Git output:

fatal: destination path '.' already exists and is not an empty directory.


Aborting installation..
[error] 
Failed to install dependency "effect"
Git output:

fatal: destination path '.' already exists and is not an empty directory.


Aborting installation..
[error] 
Failed to install dependency "prelude"
Git output:

fatal: destination path '.' already exists and is not an empty directory.


Aborting installation..
[error] 
Failed to install dependency "console"
Git output:

fatal: destination path '.' already exists and is not an empty directory.


Aborting installation..
[error] Installation failed
[error] Error:
[error] ExitFailure 1
18-06-23 13:06:45 /home/mik/Dev/purescript/test
mik@labo $ 
```
Comment 1 Michael V 2023-06-18 11:18:13 UTC
it seems the version used in port are under the one upstream. (0.20.9 on FreeBSD and 0.21.0 upstream). 

Is there any specific reason for that ?

I am trying to build it from source right now.
Comment 2 Gleb Popov freebsd_committer freebsd_triage 2023-06-18 11:25:19 UTC
Looks like an upstream issue: https://github.com/purescript/spago/issues/957
Comment 3 Michael V 2023-06-18 12:10:49 UTC
Yes . There is this one too : https://github.com/purescript/spago/issues/894#issuecomment-1352511897

I don't know to deal with this. I tried to build from source but I thin  I need all haskell stack but I am using Haskell with ghcup in userland and I get error on make install.
Comment 4 Michael V 2023-06-18 12:13:21 UTC
I have tried from linux and it works. So I think to something related to FreeBSD maybe in git or haskell stack. I don't know.
Comment 5 Gleb Popov freebsd_committer freebsd_triage 2023-06-18 12:21:56 UTC
Spago is undergoing a complete rewrite in Purescript, so I doubt this issue will be looked at. IT is likely that the Purescript version from the master branch doesn't have the problem.
Comment 6 Michael V 2023-06-18 12:26:45 UTC
Well, I don't know... I would just try it...


> IT is likely that the Purescript version from the master branch doesn't have the problem.

I am not sure to get this. What do you mean ?
Comment 7 Michael V 2023-06-18 12:28:32 UTC
I tried to build it from source without succeed.

```
$ make install       
Error: [S-9443]
No setup information found for ghc-9.2.4 on your platform.
This probably means a GHC bindist has not yet been added for OS key 'freebsd64-ino64'.
Supported versions: ghc-8.4.3, ghc-8.4.4, ghc-8.6.2, ghc-8.6.3, ghc-8.6.4, ghc-8.6.5, ghc-8.8.1, ghc-8.8.2, ghc-8.8.3, ghc-8.8.4, ghc-8.10.3, ghc-8.10.4, ghc-8.10.6, ghc-8.10.7, ghc-9.0.2, ghc-9.2.5, ghc-9.2.6, ghc-9.2.7, ghc-9.2.8, ghc-9.4.5
*** Error code 1

Stop.
make: stopped in /usr/home/mik/Dev/purescript/spago-0.21.0
```
Comment 8 Gleb Popov freebsd_committer freebsd_triage 2023-06-18 12:40:01 UTC
(In reply to Michael V from comment #7)
The 0.21 release is still a Haskell one and most likely still contains a bug. You can hack stack.yaml file and use lts-20.25 as resolver. This should make it build fine.
Comment 9 Michael V 2023-06-18 12:58:53 UTC
thank you I can launch the build changing the resolver.