OCamlPro / ocp-indent

Indentation tool for OCaml, to be used from editors like Emacs and Vim.
http://www.typerex.org/ocp-indent.html
Other
200 stars 63 forks source link

Was the renaming of the ocp-indent library intentional? #214

Open josch opened 8 years ago

josch commented 8 years ago

Hi,

I'm currently packaging ocp-indent 1.5.2 for Debian and noticed that Makefile.simple is now executing:

ocamlfind install $(NAME)

instead of the earlier

ocamlfind install $(LIB)

Since $(NAME) is ocp-indent while $(LIB) is ocp-indent-lib the files are now installed to /usr/lib/ocaml/ocp-indent instead of /usr/lib/ocaml/ocp-indent-lib/ as they were earlier.

Since the installation path influences the Debian package name, I wanted to know whether this change was intentional or not.

Thanks!

josch commented 8 years ago

Also, if the renaming was intentional, then why are ocp-indent-lib.cma and ocp-indent-lib.cmxs still named as they are and were not renamed to ocp-indent.cma and ocp-indent.cmxs, respectively?

lefessan commented 8 years ago

For what it matters, at OCamlPro, the convention is to use ocp-XXX for tools and ocplib-XXX for corresponding libraries. This naming scheme makes depending on the tool or on the library clearer.

josch commented 8 years ago

That still doesn't answer my question. Is the XXX in your last message supposed to be ocp-indent or ocp-indent-lib?

Is the change of the install path in Makefile.simple intentional or accidental?

Why do the names of the cma and cmxs differ from the otherwise chosen naming scheme?

AltGr commented 8 years ago

The change is part of 7817a134d74ccee9ad1e41bf6effc8dd0df85de7 and I don't believe it was intentional. The situation is kind of a mess, though, as the "canonical" way of building ocp-indent is through ocp-build, and in this case we generate 4 sub-libraries: ocp-indent.lexer, ocp-indent.utils, ocp-indent.dynlink and... ocp-indent.lib. I am not aware of projects using the all-in-one library layout as generated by Makefile.simple, so it would be best to fix it to use the same 4-sub-libraries layout. Failing that, having a library named ocp-indent-lib at least avoided some of the possible confusion.

josch commented 8 years ago

Thank you!

The reasons why we don't use ocp-build to build ocp-indent in Debian are:

To keep compatibility with earlier releases, I will create a patch for Makefile.simple which restores the behaviour of the version before commit 7817a13 and uses ocp-indent-lib again. I'll post a link here once I'm done.