-
Notifications
You must be signed in to change notification settings - Fork 45
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
Enable syntax extensions when ".syntax" is specified #11
Conversation
Ok, is that better? |
Enable syntax extensions when findlib package name ends with ".syntax".
Does this mean no more tags editing is needed for syntax extensions? |
@avsm - that is the intended effect, yes. In my mental model of the world, which might be impossible to achieve in practice, you have an _oasis file, and oasis generates the _tags for you programmatically, and you don't have to then go and edit this if you want to use lwt, or any other syntax-providing package, so long as the package name is *.syntax, and it uses the camlp4o style. I hope that this means we can just ship the _oasis file, and not have to ship the myocamlbuild.ml and setup.ml and _tags files in a repo, but maybe I'm misguided. |
I'll just sit here and do a little happy dance :-) It's always been tough explaining to beginners why they need to edit _tags under some circumstances. The On 21 Dec 2012, at 21:17, Martin Keegan notifications@github.com wrote:
|
The heuristic is due to @thelema (of #ocaml). I am just the guy who tries to get these newbie-friendly fixes upstream |
If people follow some convention with naming meta it is indeed a quick win. But this convention is not that common (sic). N.B. there is an OSR for that: Although no OSR has been really endorsed and agreed upon... Which is shame to my mind. |
@gildor478 We can check for "pa_" as a prefix of ocamlfind packages to identify syntax extensions. @mk270 I think your hope to only ship |
I do think the goal of having all the build information in the _oasis file is very important though. Right now, it's spread across _tags and very hard to explain to beginners, and simply doesn't allow the option of having a clean repository without the autogenerated content. On 21 Dec 2012, at 22:28, Edgar Friendly notifications@github.com wrote:
|
@thelema Well the good design would be to query ocamlfind, so that it can reports itself if it is a syntax extension or not: This can be done at the "oasis setup" time (although in myocamlbuild, but this is more expensive). @avsm Well you can use oasis.dynrun (oasis setup --setup-update dynamic). We can avoid generating _tags in this mode. |
I appreciate this is not ideal, and doesn't support syntax extensions other than those ending in .syntax, and doesn't support camlp4r at all, though both issues are fixable