Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006483OCamlOCaml generalpublic2014-07-11 16:472014-07-22 18:22
Reporterwhitequark 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target Version4.02.0+devFixed in Version 
Summary0006483: Allow specifying additional compiler flags via [@@@ocaml.flags]
DescriptionSubject explains it all. It would be useful for cleanly setting flags like -rectypes on a per-file basis independent of buildsystem, and is also a nice companion to [@@@ocaml.warning].
TagsNo tags attached.
Attached Files

- Relationships
related to 0006202assignedfrisch Controlling warnings locally 

-  Notes
(0011803)
dbuenzli (reporter)
2014-07-11 17:07

I hope this is a joke.
(0011804)
whitequark (reporter)
2014-07-11 17:13

We've been discussing such a feature on IRC (in seriousness, if you need to know), and I thought it would be worth having reasons to/against weighed on the bugtracker.

I can see it being useful in some cases.
(0011851)
doligez (administrator)
2014-07-16 16:23
edited on: 2014-07-16 17:27

Would these take precedence over OCAMLPARAM? I can see arguments against in either case.

(0011852)
whitequark (reporter)
2014-07-16 16:26

I imagine such a feature taking precedence over any environment-based setting.
(0011854)
doligez (administrator)
2014-07-16 16:32
edited on: 2014-07-16 17:27

>I imagine such a feature taking precedence over any environment-based setting.

Given the intended use of OCAMLPARAM, that would be really bad. And indeed i'd like to know what [@@@ocaml.warning] does in this respect.

(0011899)
whitequark (reporter)
2014-07-22 15:53

I've thought more on this issue. Here is the list of flags that at all make sense to specify in the file:

    -ppx, -[un]safe-string

Options like -compact aren't supported by ocamlc. -w is covered by [@@@ocaml.warning]. Anything else either clearly belongs to buildsystem (like -noassert, -labels, etc) or doesn't make sense to use for single files (like -rectypes, -short-paths, -labels, etc).

-ppx can be solved with a ppx that reads annotations.

-safe-string is probably not important enough.

So I think this issue isn't worth the hassle and can be closed.

- Issue History
Date Modified Username Field Change
2014-07-11 16:47 whitequark New Issue
2014-07-11 17:07 dbuenzli Note Added: 0011803
2014-07-11 17:13 whitequark Note Added: 0011804
2014-07-16 16:23 doligez Note Added: 0011851
2014-07-16 16:23 doligez Status new => feedback
2014-07-16 16:26 whitequark Note Added: 0011852
2014-07-16 16:26 whitequark Status feedback => new
2014-07-16 16:32 doligez Note Added: 0011854
2014-07-16 16:32 doligez Status new => feedback
2014-07-16 16:32 doligez Target Version => 4.02.0+dev
2014-07-16 17:22 doligez Relationship added related to 0006202
2014-07-16 17:27 doligez Note Edited: 0011851 View Revisions
2014-07-16 17:27 doligez Note Edited: 0011854 View Revisions
2014-07-22 15:53 whitequark Note Added: 0011899
2014-07-22 15:53 whitequark Status feedback => new
2014-07-22 18:22 frisch Status new => closed
2014-07-22 18:22 frisch Resolution open => no change required


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker