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

OCAMLPARAM requires a preceding _ or else it errors out #6076

Closed
vicuna opened this issue Jul 16, 2013 · 2 comments
Closed

OCAMLPARAM requires a preceding _ or else it errors out #6076

vicuna opened this issue Jul 16, 2013 · 2 comments
Assignees

Comments

@vicuna
Copy link

vicuna commented Jul 16, 2013

Original bug ID: 6076
Reporter: @avsm
Assigned to: @lefessan
Status: closed (set by @xavierleroy on 2015-12-11T18:21:02Z)
Resolution: won't fix
Priority: normal
Severity: minor
Fixed in version: 4.02.0+dev
Category: ~DO NOT USE (was: OCaml general)

Bug description

I 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

@vicuna
Copy link
Author

vicuna commented Jul 16, 2013

Comment author: @lefessan

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 "").

@vicuna
Copy link
Author

vicuna commented Jul 16, 2013

Comment author: @avsm

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

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