elm / error-message-catalog

A catalog of broken Elm programs / data to improve error messages
BSD 3-Clause "New" or "Revised" License
173 stars 17 forks source link

Check for import errors before cyclic imports #227

Closed drathier closed 6 years ago

drathier commented 7 years ago

If A imports a nonexisting function from B, and B imports whatever from A, you get an error about a cyclic dependency. Since the only thing A imports from B is nowhere to be found, it's a false alarm, and the real problem is that A is importing something that is exported from B, but not defined in B.

evancz commented 6 years ago

This is more of a feature suggestion I think.

Even if the thing you want from B does not exist, you still cannot have cyclic dependencies.

I think the idea is that you could resolve the cycle more easily if you had more information. If so, I'd say open a different issue with an SSCCE proving that this case exists in practice. This seems like it'd be quite hard to implement on first glance, so better examples make it more compelling to look into.