Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006076OCamlOCaml generalpublic2013-07-16 02:382013-07-16 23:30
Reporteravsm 
Assigned Tolefessan 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionwon'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
(0009781)
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 "_").
(0009793)
avsm (reporter)
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


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker