roc icon indicating copy to clipboard operation
roc copied to clipboard

roc hangs with multiple packages

Open lukewilliamboswell opened this issue 3 years ago • 1 comments

This may not be supported yet, however I thought I would log an issue as both roc check and roc run hang on the following code.

app "hangs"
    packages { pf: "cli-platform/main.roc", ps: "Parser.roc" }
    imports [
        pf.Program.{ Program },
        pf.Stdout,
        ps.Parser.{ Parser },
    ]
    provides [main] to pf

main : Program
main =
    Stdout.line "This code hangs due to Parser.roc package"
    |> Program.quick

lukewilliamboswell avatar Oct 13 '22 07:10 lukewilliamboswell

roc check and roc run should not hang here but I think this will do what you want:

app "hangs"
    packages { pf: "cli-platform/main.roc" }
    imports [
        pf.Program.{ Program },
        pf.Stdout,
        Parser.{ Parser },
    ]
    provides [main] to pf

main : Program
main =
    Stdout.line "This code hangs due to Parser.roc package"
    |> Program.quick

To import things from the same directory you do not need to declare anything in packages.

Anton-4 avatar Oct 13 '22 07:10 Anton-4

Resolved.

The following works as expected.

app "hangs"
    packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.1.2/3bKbbmgtIfOyC6FviJ9o8F8xqKutmXgjCJx3bMfVTSo.tar.br" }
    imports [
        pf.Stdout,
        Parser.{ Parser },
    ]
    provides [main] to pf

main =
    Stdout.line "This code hangs due to Parser.roc package"

lukewilliamboswell avatar Jan 16 '23 16:01 lukewilliamboswell