Skip to content
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

Detecting unused open in .mli files #5589

Closed
vicuna opened this issue Apr 12, 2012 · 3 comments
Closed

Detecting unused open in .mli files #5589

vicuna opened this issue Apr 12, 2012 · 3 comments
Assignees

Comments

@vicuna
Copy link

vicuna commented Apr 12, 2012

Original bug ID: 5589
Reporter: @alainfrisch
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2015-12-11T18:07:00Z)
Resolution: fixed
Priority: normal
Severity: minor
Category: typing
Monitored by: @jmeber jm @hcarty @Chris00

Bug description

Currently, "unused" declaration warnings are not applied for interfaces. At least for "unused open", it would make sense to do so.

@vicuna
Copy link
Author

vicuna commented Apr 18, 2012

Comment author: @alainfrisch

Commit 12375 (trunk). This has the potential to break things, so I'm waiting for some feedback before closing this issue.

@vicuna
Copy link
Author

vicuna commented May 21, 2012

Comment author: jm

this commit makes ocamlc on a .mli generating a .cmi whose control sum is different from previous ocamlc version; however ocamlopt still generates the same control sum; this difference between ocamlc and ocamlopt breaks programs like biniou+yojson.

@vicuna
Copy link
Author

vicuna commented May 25, 2012

Comment author: @alainfrisch

It seems that simply adding the "ignore (Includemod.signatures (initial_env()) sg sg);" changed the .cmi file generated by ocamlc. I don't really understand why (probably some internal ids).

Anyway, the same patch had to be applied to ocamlopt so that it can also detect unused open in .mli files. This is now committed (rev 12484), and this fixes the present issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants