roc-lang / roc

A fast, friendly, functional language.
https://roc-lang.org
Universal Permissive License v1.0
4.41k stars 310 forks source link

glue hangs if interface name does not match filename #4050

Closed BrianHicks closed 2 years ago

BrianHicks commented 2 years ago

On 57681be5420586fff80ca6c6f850a9bfc7e6a4c2, given the following files roc glue Package-Config.roc glue.rs will just hang forever.

Package-Config.roc:

platform "roc-lang/rbt"
    requires {} { init : SomeInterface.RecursiveThing }
    exposes [SomeInterface]
    packages {}
    imports [SomeInterface]
    provides [initForHost]

initForHost : SomeInterface.RecursiveThing
initForHost = init

SomeInterface.roc:

interface Rbt
    exposes [RecursiveThing]
    imports []

RecursiveThing : [RecursiveThing Str]

(RecursiveThing is not a great name for this extremely non-recursive type, but I was trying for a different SSCCE when I found this!)

BrianHicks commented 2 years ago

ahhhh, looks like interface Rbt in the filename SomeInterface.roc might be the problem here! But still it hangs forever if the name is wrong.

JanCVanB commented 2 years ago

This just happened to me, and it looks similar to #3440.