Hello,

As I saw the new META file for lablgtk2, many questions and issues rose. It concerns both lablgtk2 and the way ocamlfind is implemented. It may be also interesting for packagers (in godi for example) who design META files.

- lablgtk2 defines 10 sub packages plus package "auto-init" (for which one must be able to chose to include it or not). When users add a dependency to a project, it is far easier at first to only add the name of the package (here "lablgtk2") without trying to understand what is exactly behing. It would be easier for users to have : * package "lablgtk2" that includes everything but gtkInit.cmo and gtkInit.cmx, * package "lablgtk2.auto-init" that includes "gtkInit.cmo and gtkInit.cmx" and package "lablgtk2" (gtkInit is special because it includes code that sometime you want to use, and sometime not).

- Is that a problem to include in an ocamlfind package (through variable "require") an archive (cma, cmx, cmxs) that is not used after ?

- does including all available packages through variable "require" make an executable that takes more space ? If yes, could ocamlfind handle this so that it does not include unused packages?

- if the purpose of making many packages is only to see what is available through ocamlfind query, maybe it would be interesting that ocamlfind query lists all available files associated to a package?

- If find this line rather strange : exists_if = "lablgtkgl.cma,lablgtkgl.cmxa,lablgtkgl.cmxs" * lablgtkgl.cma and lablgtkgl.cmxa are part of the variable "archive", so what is the point in having it there too ? * lablgtkgl.cmxs enables package "gl", but is not used in any variable "require"

- It seems ocamlfind lacks two clear variables that are actually undertaken by exists_if and requires : * variable "depends" (actually, "exists_if" and "requires") that tells that this package can only work if the specified sub packages are here. If not, package would be disabled. (e.g "lablgtk2.auto-init" that depends on "lablgtk2"). * variable "includes" (actually "requires", roughly) that includes other packages, if available, so that the user do not need to also specify them (e.g : "lablgtk2" would include "lablgtk2.glade", "lablgtk2.gl" if they are here)

- it would be nice that ocamlfind gives examples such as the lablgtk2 one, to show how to design a good META file.



Best regards,

William



lablgtk2/META:

description = "Bindings for gtk2"
requires = ""
version = "2.16.0"

archive(byte) = "lablgtk.cma"
archive(native) = "lablgtk.cmxa"
archive(byte,mt) += "gtkThread.cmo"
archive(native,mt) += "gtkThread.cmx"

package "auto-init" (
  exists_if = "gtkInit.cmo,gtkInit.cmx"
  description = "Auto-initialization of GTK"
  requires = "lablgtk2"
  archive(byte) = "gtkInit.cmo"
  archive(native) = "gtkInit.cmx"
)
package "gl" (
  exists_if = "lablgtkgl.cma,lablgtkgl.cmxa,lablgtkgl.cmxs"
  description = "Bindings for gtkGL"
  requires = "lablgtk2"
  archive(byte) = "lablgtkgl.cma"
  archive(native) = "lablgtkgl.cmxa"
)
package "glade" (
  exists_if = "lablglade.cma,lablglade.cmxa,lablglade.cmxs"
  description = "Bindings for glade"
  requires = "lablgtk2"
  archive(byte) = "lablglade.cma"
  archive(native) = "lablglade.cmxa"
)
package "gnomecanvas" (
exists_if = "lablgnomecanvas.cma,lablgnomecanvas.cmxa,lablgnomecanvas.cmxs"
  description = "Bindings for gnomecanvas"
  requires = "lablgtk2"
  archive(byte) = "lablgnomecanvas.cma"
  archive(native) = "lablgnomecanvas.cmxa"
)
package "gnomehtml" (
  exists_if = "lablgnome.cma,lablgnome.cmxa,lablgnome.cmxs"
  description = "Bindings for gnome html"
  requires = "lablgtk2"
  archive(byte) = "lablgnome.cma"
  archive(native) = "lablgnome.cmxa"
)
package "gnomeui" (
  exists_if = "lablgnomeui.cma,lablgnomeui.cmxa,lablgnomeui.cmxs"
  description = "Bindings for gnomeui"
  requires = "lablgtk2"
  archive(byte) = "lablgnomeui.cma"
  archive(native) = "lablgnomeui.cmxa"
)
package "gtkspell" (
  exists_if = "lablgtkspell.cma,lablgtkspell.cmxa,lablgtkspell.cmxs"
  description = "Bindings for gtkspell"
  requires = "lablgtk2"
  archive(byte) = "lablgtkspell.cma"
  archive(native) = "lablgtkspell.cmxa"
)
package "panel" (
  exists_if = "lablpanel.cma,lablpanel.cmxa,lablpanel.cmxs"
  description = "Bindings for panelapplet"
  requires = "lablgtk2"
  archive(byte) = "lablpanel.cma"
  archive(native) = "lablpanel.cmxa"
)
package "rsvg" (
  exists_if = "lablrsvg.cma,lablrsvg.cmxa,lablrsvg.cmxs"
  description = "Bindings for rsvg"
  requires = "lablgtk2"
  archive(byte) = "lablrsvg.cma"
  archive(native) = "lablrsvg.cmxa"
)
package "sourceview" (
exists_if = "lablgtksourceview.cma,lablgtksourceview.cmxa,lablgtksourceview.cmxs"
  description = "Bindings for gtksourceview"
  requires = "lablgtk2"
  archive(byte) = "lablgtksourceview.cma"
  archive(native) = "lablgtksourceview.cmxa"
)
package "sourceview2" (
exists_if = "lablgtksourceview2.cma,lablgtksourceview2.cmxa,lablgtksourceview2.cmxs"
  description = "Bindings for gtksourceview2"
  requires = "lablgtk2"
  archive(byte) = "lablgtksourceview2.cma"
  archive(native) = "lablgtksourceview2.cmxa"
)
_______________________________________________
Godi-list mailing list
Godi-list@ocaml-programming.de
https://godirepo.camlcity.org/mailman/listinfo/godi-list

Reply via email to