-
Notifications
You must be signed in to change notification settings - Fork 465
False detection of self cycle error with an explicit module type #5368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I believe this is a remnant of an old bug of ocamldep: ocaml/ocaml#4618 This seems to be considered by the community as one of the many limitations of ocamldep, as this and many other ocamldep bugs are marked either stale, suspended, or not fixable. I think self-cycles should not be considered as fatal error, as the result reported from |
Can I open a PR to disable self-reference errors? I believe it's not very good to reject codes which should be valid. If a source file does indeed contain a self-reference, it would fail to typecheck & compile anyway. |
Would you know where to look to check where this behaviour originates. |
|
Great! |
PR opened: #5393 |
Version: 9.1.4
Assume we have the following code of name
b.res
:This fails with a
FAILED: B has a self cycle
error despite that this does not contain any dependency to itself.The
open B
actually refers toTypes.B
, but the compiler falsely detects it as a self-reference.Interestingly, when you remove the explicit module type of the
Types
module, it compiles correctly:The text was updated successfully, but these errors were encountered: