Re: new+old Camlp4 (was Re: [Caml-list] Bug in ocamlyacc)
On Wed, 2007-04-25 at 13:11 -0400, Markus Mottl wrote:
> > * It means two versions of camlp4 would be distributed and installed with
> > ocaml 3.10.
> This would surely be helpful, but I don't think that this is
> absolutely necessary. It isn't horribly hard to have two
> OCaml-installations, and refer to the old camlp4 where necessary.
This is not the case for all users. For example I myself have
no problem building multiple versions of Ocaml on my Ubuntu
Linux box, where I deliberately do NOT use the Debian packages
for Ocaml (in fact I prefer the CVS head).
But I also test my product on Cygwin and Windows-native, and both come
with pre-built Ocaml packages. It isn't quite so easy to build on
Cygwin and I cringe in fear at the idea of having to do a Windows
native build -- esp on XP64.
I also run Ocaml on platforms I don't control: shell accounts
on hosted servers.
Furthermore, my product has a Debian package. There's no easy
option to have two ocamls using the Debian autobuilder.
There's NO WAY I can expect my intended user base to install
two versions of Ocaml. I have to write code that "just works"
with any reasonably up-to-date Ocaml installation.
So actually I don't use any camlp4 macros, and at least part
of the reason has been the lack of any concept of installation
and package management in the Ocaml distribution: actually
getting macros to work with camlp4 is quite hard because you
need to know where the files are. The same with third party
And now running with multiple installations of Ocaml will
make that even harder -- I already have to do this on Windows
where I support both Cygwin and Windows native build, and
have to support 64 bit Windows Ocaml if someone manages to
actually build one, as well as 32 bit and probably the
MinGW version too...
So I would like to suggest -- yes, it *is* horribly hard to have
two Ocaml installations.
If this is necessary the Ocaml debian maintenance team at least will
have to change their package management design entirely,
since currently it only permits one Ocaml installation.
So actually I like this plan:
* leave camlp4 as it is
* rename the new system camlp5
* supply both
In particular this would support what I would do: if I need to build
third party libraries I put the source in my product, and if library A
uses p4 and library B uses p5 I can easily modify my build scripts
to support both A and B because both p4 and p5 are available.
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net