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

Strange warnings about package tags with -show-tags #7287

Closed
vicuna opened this issue Jul 8, 2016 · 2 comments
Closed

Strange warnings about package tags with -show-tags #7287

vicuna opened this issue Jul 8, 2016 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Jul 8, 2016

Original bug ID: 7287
Reporter: Michael Soegtrop
Assigned to: @gasche
Status: closed (set by @xavierleroy on 2017-09-24T15:33:08Z)
Resolution: won't fix
Priority: normal
Severity: minor
Platform: Cygwin
OS: Windows
OS Version: 7
Version: 4.02.3
Fixed in version: undecided
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues

Bug description

Dear Ocaml team,

ocambuild -show-tags gives strange warnings about package tags.

I have this _tags file:

<> : package(str), package(Stdint)
<
.ml> : warn(-23)

$ ocamlbuild -show-tags CParser.mli

gives the output shown below. To me the warnings about package tags don't make much sense. As far as I can tell from the documentation, using package tags is recommended to add external libraries and the syntax is correct. Also it works with these tags and it doesn't work without them.

Best regards,

Michael

gives me:

File "_tags", line 1, characters 6-18:
Warning: tag "package" does not expect a parameter, but is used with parameter "str"
File "_tags", line 1, characters 20-35:
Warning: tag "package" does not expect a parameter, but is used with parameter "Stdint"
File "_tags", line 1, characters 20-35:
Warning: the tag "package(Stdint)" is not used in any flag or dependency declaration, so it will have no effect; it may
be a typo. Otherwise you can use mark_tag_used in your myocamlbuild.ml to disable this warning.
File "_tags", line 1, characters 6-18:
Warning: the tag "package(str)" is not used in any flag or dependency declaration, so it will have no effect; it may be
a typo. Otherwise you can use mark_tag_used in your myocamlbuild.ml to disable this warning.
Warning: the following tags do not include dynamically-generated tags, such as link, compile, pack, byte, native, c, pdf
... (this list is by no means exhaustive).

Tags for "CParser.mli":
{. extension:mli, file:CParser.mli, ocaml, package(Stdint), package(str),
quiet, traverse .}
Finished, 0 targets (0 cached) in 00:00:00.

Steps to reproduce

Run ocamlbuild -show-tags with this _tags file:

<> : package(str), package(Stdint)
<
.ml> : warn(-23)

@vicuna
Copy link
Author

vicuna commented Jul 8, 2016

Comment author: @dbuenzli

ocamlbuild is developed here https://github.com/ocaml/ocamlbuild nowadays, use the issue tracker there.

In the case in point I don't think there's anything to report though. package tags are only defined if you invoke ocamlbuild with the -use-ocamlfind function.

@vicuna
Copy link
Author

vicuna commented Jul 8, 2016

Comment author: @gasche

That's a known usability issue (not really a bug): the parametrized flag package is only defined when ocamlfind support is enabled by the -use-ocamlfind flag, so you should use ocamlbuild -use-ocamlfind ... to work within a project that uses them -- on the command-line or in _tags.

I would like to special-case this warning to say "you should use -use-ocamlfind" instead, or, even better, to finally switch -use-ocamlfind to be the default in ocamlbuild.

Note that since ocamlbuild is now distributed separately from the compiler; you should rather file future issues on its separate bugtracker:

https://github.com/ocaml/ocamlbuild/issues/

Thanks for the very nice report!

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