Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006076OCaml~DO NOT USE (was: OCaml general)public2013-07-16 02:382015-12-11 19:21
Assigned Tolefessan 
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.02.0+dev 
Summary0006076: OCAMLPARAM requires a preceding _ or else it errors out
DescriptionI ran into this error when trying to activate warnings-as-errors from an environment variable (so that it would be active during some builds, but not others). I'm not sure if this is expected behaviour or not, but I couldn't find any documentation about OCAMLPARAM in the manual repository. It does deviate from OCAMLRUNPARAM's format though.

$ env OCAMLPARAM="we=+A" ocamlbuild foo.native
Illegal syntax of OCAMLPARAM: no '_' separator found
Command exited with code 2.

$ env OCAMLPARAM="_,we=+A" ocamlbuild foo.native
<works and activates the desired warnings>
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
lefessan (developer)
2013-07-16 06:51

Indeed, OCAMLPARAM does not follow anymore OCAMLRUNPARAM syntax. It was necessary because the user has to specify how the arguments that he is adding and the arguments from the command line shoud combine. The "_" shows the position of the arguments from the command line, so that arguments in OCAMLPARAM before the "_" are interpreted before them, and arguments after the "_" are interpreted after them.

This way, you can both change the defaults (before the "_"), and force the result (after the "_").
avsm (developer)
2013-07-16 23:30

Thanks Fabrice -- this all makes sense, and my use of OCAMLPARAM is working great in the RWO build scripts now.

- Issue History
Date Modified Username Field Change
2013-07-16 02:38 avsm New Issue
2013-07-16 06:51 lefessan Note Added: 0009781
2013-07-16 06:51 lefessan Status new => resolved
2013-07-16 06:51 lefessan Fixed in Version => 4.02.0+dev
2013-07-16 06:51 lefessan Resolution open => won't fix
2013-07-16 06:51 lefessan Assigned To => lefessan
2013-07-16 23:30 avsm Note Added: 0009793
2015-12-11 19:21 xleroy Status resolved => closed
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker