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

In Typemod.type_implementation: cmt file is created in case of typing error, even in print_types or dont_write_files mode #5682

Closed
vicuna opened this issue Jul 12, 2012 · 3 comments
Assignees
Labels
Milestone

Comments

@vicuna
Copy link

vicuna commented Jul 12, 2012

Original bug ID: 5682
Reporter: @alainfrisch
Assigned to: @lefessan
Status: closed (set by @xavierleroy on 2015-12-11T18:07:19Z)
Resolution: fixed
Priority: normal
Severity: minor
Target version: 4.00.0+dev
Fixed in version: 4.00.0+dev
Category: ~DO NOT USE (was: OCaml general)

Bug description

I believe the the final catch-all handler should not call save_cmt when either print_types or dont_write_files is true.

@vicuna
Copy link
Author

vicuna commented Jul 12, 2012

Comment author: @lefessan

Have you found a .cmt file generated when it should not be, or are you just reviewing the code ?

Cmt_format.save_cmt checks that

  • Clflags.binary_annotations is true (ocamldoc should never set that flag to true, and ocamldoc is the only user of Clflags.dont_write_files from the comments in Clflags)
  • Clflags.print_types is false

@vicuna
Copy link
Author

vicuna commented Jul 12, 2012

Comment author: @alainfrisch

Just reviewing the code. Maybe dont_write_files should be checked as well, I'm not sure (it's used by ocamldoc).

@vicuna
Copy link
Author

vicuna commented Jul 12, 2012

Comment author: @lefessan

Since the typer is now shipped into compilerlibs, some other people might make a weird usage of Clflags.dont_write_files, so I just added the test in cmt_format, although you would have to be crazy to both activate Clflags.binary_annotations and Clflags.dont_write_files.

@vicuna vicuna closed this as completed Dec 11, 2015
@vicuna vicuna added this to the 4.00.0 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants