eayus / sirdi

Package manager for Idris
GNU General Public License v3.0
35 stars 11 forks source link

How to build sirdi? #13

Closed srid closed 2 years ago

srid commented 2 years ago

Please add instructions to build this project in its README. I tried compiling build.idr, but it fails on Idris2 (0.5.1).

❯ idris2 -c build.idr
1/1: Building build (build.idr)
Error: While processing right hand side of cloneDep. Sorry, I can't find any elaboration which works. All errors:
If Prelude.::: When unifying:
    List ?a
and:
    String
Mismatch between: List ?a and String.

build:32:27--32:28
 28 | 
 29 | cloneDep : String -> String -> IO ()
 30 | cloneDep pkg url =
 31 |     unless !(exists $ "build" </> pkg)
 32 |         $ ignore $ system ["git", "clone", url, "build" </> pkg]
                                ^

If Prelude.Stream.::: When unifying:
    Stream ?a
and:
    String
Mismatch between: Stream ?a and String.

build:32:27--32:28
 28 | 
 29 | cloneDep : String -> String -> IO ()
 30 | cloneDep pkg url =
 31 |     unless !(exists $ "build" </> pkg)
 32 |         $ ignore $ system ["git", "clone", url, "build" </> pkg]
                                ^

Error: While processing right hand side of fetchDep. Sorry, I can't find any elaboration which works. All errors:
If Prelude.::: When unifying:
    List ?a
and:
    String
Mismatch between: List ?a and String.

build:39:31--39:32
 35 | fetchDep (pkg, url, commit) = do
 36 |     cloneDep pkg url
 37 |     whenJust commit
 38 |         $ \commit => ignore $ inDir ("build" </> pkg)
 39 |             $ ignore $ system ["git", "checkout", "--detach", commit]
                                    ^

If Prelude.Stream.::: When unifying:
    Stream ?a
and:
    String
Mismatch between: Stream ?a and String.

build:39:31--39:32
 35 | fetchDep (pkg, url, commit) = do
 36 |     cloneDep pkg url
 37 |     whenJust commit
 38 |         $ \commit => ignore $ inDir ("build" </> pkg)
 39 |             $ ignore $ system ["git", "checkout", "--detach", commit]
                                    ^

Error: While processing right hand side of buildDep. Sorry, I can't find any elaboration which works. All errors:
If Prelude.::: When unifying:
    List ?a
and:
    String
Mismatch between: List ?a and String.

build:45:16--45:17
 41 | buildDep : (String, String, Maybe String) -> IO ()
 42 | buildDep (pkg, url, _) = do
 43 |     Just 0 <- inDir ("build" </> pkg) $ do
 44 |         putStrLn "building \{pkg}"
 45 |         system ["idris2", "--build", pkg <.> "ipkg"]
                     ^

If Prelude.Stream.::: When unifying:
    Stream ?a
and:
    String
Mismatch between: Stream ?a and String.

build:45:16--45:17
 41 | buildDep : (String, String, Maybe String) -> IO ()
 42 | buildDep (pkg, url, _) = do
 43 |     Just 0 <- inDir ("build" </> pkg) $ do
 44 |         putStrLn "building \{pkg}"
 45 |         system ["idris2", "--build", pkg <.> "ipkg"]
eayus commented 2 years ago

You'll have to download a newer Idris version, by cloning it from here (https://github.com/idris-lang/Idris2/) and building it yourself. Then your build command should work. In the future, we'll make an effort to make sure that sirdi always builds on the latest released version, but since it's still in development that's not a priority right now