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

add tags for all build-related ocamlbuild command-line options #5549

Closed
vicuna opened this issue Mar 20, 2012 · 5 comments
Closed

add tags for all build-related ocamlbuild command-line options #5549

vicuna opened this issue Mar 20, 2012 · 5 comments

Comments

@vicuna
Copy link

vicuna commented Mar 20, 2012

Original bug ID: 5549
Reporter: @gasche
Status: resolved (set by @damiendoligez on 2017-03-03T14:23:40Z)
Resolution: suspended
Priority: normal
Severity: feature
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Related to: #5951 #6099
Monitored by: @gasche mehdi @diml @ygrek @hcarty

Bug description

It would be nice if ocamlbuild tags where "complete" with respect to the command-line option. For example we can call "ocamlbuild -cflag -foo ..." but there is no general tag "cflag(-foo)" -- the "usual suspects" annot, rectypes et al. are relatively well covered by independent tags, but you never know.

Basically, all the -flag(s) options could be parametrized tags, and the -ocamlc and cousins as well. Other could be included on a case-by-case basis (-just-plugin doesn't make sense, but, say, -no-links could).

Additional information

Again, this feature was suggested by the confrontation with frontend tools that do not allow to pass ocamlbuild command-line options. Beside, it would help uniformity: I'd rather just write cflag(-rectypes) than remember (or look in ocamlbuild -documentation) which specific tag enables -rectypes.

@vicuna
Copy link
Author

vicuna commented Mar 20, 2012

Comment author: @gasche

I discussed this with xclerc and mark it acknowledged.

Again, patches from the community are welcome.

@vicuna
Copy link
Author

vicuna commented Mar 17, 2013

Comment author: meyer

I agree, but one thought - shall we start adding growing number of command line options, or use the -tags? I'd avoid that.

Of course option interface could be generated, and maybe that's a good thing to do.

@vicuna
Copy link
Author

vicuna commented Mar 17, 2013

Comment author: @gasche

The problem I was complaining about in this bug report is not that we don't have enough command-line options, rather than it's hard to map some of them into tags (so it is about tags that are missing, not new options to add).

If I previously invoked ocamlbuild with some command-line options, and then I decide to instead write a _tag file, it should be easy to express everything I was doing as tags instead of options. So if I used "-clfags -g", I shouldn't have to look in the documentation to find "debug", just write something obvious like cflags(-g). Of course, that doesn't mean that we should remove "debug" or "-tags debug".

@vicuna
Copy link
Author

vicuna commented Mar 17, 2013

Comment author: meyer

Yes, but my point is that we could keep in sync in a sane way. The way it's implemented is that there is no correlation between them, I proposed in this PR #5951 solution to implement options using tags (which is essentially the same as you worked out here earlier)

@vicuna
Copy link
Author

vicuna commented Mar 3, 2017

Comment author: @damiendoligez

ocamlbuild is now a separate project that lives on GitHub.
PR transferred to ocaml/ocamlbuild#212

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

1 participant