Can an interface import from another interface?
I expected yes, as an interface has an import section in its header... but it's just freezing/hanging the type checker
yes
do you have a minimal reproducer?
one moment
:face_palm:
nevermind.
Fun edge case, though!
was it a cyclic import?
Foo.roc
interface Foo
exposes []
imports [Bar]
baz = Bar.baz
Bar.roc
interface Foo
exposes [baz]
imports []
baz = 123
jan@mackey rocbox % roc check Bar.roc
0 errors and 0 warnings found in 13 ms.
jan@mackey rocbox % roc check Foo.roc
Naming the child the same as the parent hangs the type checker
ah yeah. that’s been a long standing open issue
A copy/paste mistake, and an easy one to make :/
probably worth bumping the priority on that issue. it happens way too often
https://github.com/roc-lang/roc/issues/3440
and/or
https://github.com/roc-lang/roc/issues/4050
?
Bumped. Thank you, @Ayaz Hafiz !
I don't know, but could this issue be related somehow?
https://github.com/roc-lang/roc/issues/4094
Yes, it looks like interface/module resolution has one or more ways to get silently stuck, which is frustrating for app developers (as is having to put all interfaces in the same directory as your app)
This should all be fixed by https://github.com/roc-lang/roc/pull/4125
I was going to mark this topic as resolved but looks like I don't have sufficient permissions
Anton has marked this topic as resolved.
:tada: Thank you, @Ayaz Hafiz & @Folkert de Vries !
Last updated: Jul 06 2025 at 12:14 UTC