|Anonymous | Login | Signup for a new account||2019-02-22 21:34 CET|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007570||OCaml||compiler driver||public||2017-06-27 12:27||2017-09-30 11:05|
|Product Version||4.05.0 +dev/beta1/beta2/beta3/rc1|
|Target Version||4.06.0 +dev/beta1/beta2/rc1||Fixed in Version||4.06.0 +dev/beta1/beta2/rc1|
|Summary||0007570: Toplevel "ocaml -plugin" is not usable|
|Description||Since OCaml 4.03 and 0006108, the dynlink library cannot be used inside the toplevel. However, like "ocamlc" and "ocamlopt", the toplevel "ocaml" provides a "-plugin" option. Trying to use this option yields a toplevel fatal error due to the uncatched exception:|
"Invalid_argument("The dynlink.cma library cannot be used inside the OCaml toplevel")".
|Tags||No tags attached.|
Indeed, dynlink is not usable from the toplevel, because the toplevel provides its own dynlink-like mechanisms, see in particular the way the #load directive is implemented.
This said, the fact that no one noticed the issue until now suggests that there is no use for plugins inside the toplevel and that this functionality could also be removed.
I gladly concede that the fact that I may be the first to stumble on this issue
clearly indicates that this is not a very sought after feature.
However, this may be partially due to the lack of documentation for compiler plugins up to now.
In term of use case, I was thinking that with plugins working uniformly across the compilers and the toplevel, it may be possible to offload the internationalization of errors and warnings messages to a plugin with just a handful of new hooks in the compiler.
|The toplevel already loads .cmo/.cma passed on the command-line. How would "-plugin" be different?|
|One difference might be that the "-plugin" option can modify the arguments of ocamlc/ocamlopt, another point would be just for the sake of symmetry with ocamlc/ocamlopt. Anyway, since the feature is still not functional, I think it ought to be removed for now: https://github.com/ocaml/ocaml/pull/1381 [^] .|
|"Resolved" by removing the ocaml -plugin option and its documentation.|
|2017-06-27 12:27||octachron||New Issue|
|2017-06-27 13:37||octachron||Description Updated||View Revisions|
|2017-06-27 16:04||xleroy||Note Added: 0018005|
|2017-06-27 16:04||xleroy||Status||new => acknowledged|
|2017-06-27 18:18||octachron||Note Added: 0018008|
|2017-06-30 10:33||frisch||Note Added: 0018018|
|2017-09-29 19:53||octachron||Note Added: 0018401|
|2017-09-30 11:05||xleroy||Note Added: 0018414|
|2017-09-30 11:05||xleroy||Status||acknowledged => resolved|
|2017-09-30 11:05||xleroy||Resolution||open => reopened|
|2017-09-30 11:05||xleroy||Fixed in Version||=> 4.06.0 +dev/beta1/beta2/rc1|
|2017-09-30 11:05||xleroy||Target Version||=> 4.06.0 +dev/beta1/beta2/rc1|
|2017-09-30 11:05||xleroy||Resolution||reopened => fixed|
|Copyright © 2000 - 2011 MantisBT Group|