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

how to use package during plugin compilation #23

Open
agarwal opened this issue Dec 14, 2015 · 2 comments
Open

how to use package during plugin compilation #23

agarwal opened this issue Dec 14, 2015 · 2 comments

Comments

@agarwal
Copy link
Contributor

agarwal commented Dec 14, 2015

$ cat myocamlbuild.ml 
let x = 42

$ ocamlbuild -just-plugin -plugin-tag "package(opam-lib)"
Warning: tag "package" does not expect a parameter, but is used with parameter "opam-lib"
Finished, 1 target (0 cached) in 00:00:00.

The package tag does take a parameter, so I'm confused.

@gasche
Copy link
Owner

gasche commented Dec 14, 2015

You need -use-ocamlfind. The usability of the ocamlfind option is not good currently (we discussed making it the default, but there are a surprising number of users that insist on not using ocamlfind, and the transition at the time seemed too delicate to manage correctly). One very good first step would be to add a "Hint:" message when precisely this happens: package is used with a parameter. Feel free to add this to your list of issues :-)

@agarwal
Copy link
Contributor Author

agarwal commented Dec 14, 2015

Thanks. IIUC the message isn't strictly incorrect because the parsing of tags is itself affected by the inclusion of -use-ocamlfind. Nonetheless since this option is so commonly used, an improved error message in this case would help. I'll report on the new ocamlbuild repo (I realize the repo already exists so could start reporting now, but maybe you'll end up needing to create a fresh repo when importing the code so not reporting yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants