Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] 3.07beta
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gerd Stolpmann <info@g...>
Subject: [Caml-list] 3.07beta
Hi list, especially the beta testers,

before I get more mails, and have to explain it to everybody again:
findlib does not work with 3.07beta without applying the patch attached
below. This is not a bug of findlib, but an interface change in 3.07beta
that will be reverted in 3.07final (it is already changed in CVS).

In the case your programs are affected, too: In 3.07beta, Arg.parse sets
Arg.current to 0 before it starts parsing, so you cannot skip arguments
before you call Arg.parse.

Now the patch that avoids this problem with 3.07beta:

----------------------------------snip------------------------------
--- frontend.ml.orig    2003-01-13 01:41:27.000000000 +0100
+++ frontend.ml 2003-07-24 15:31:53.000000000 +0200
@@ -355,7 +355,7 @@
   in
 

-  Arg.parse
+  Arg.parse_argv Sys.argv
     [ "-predicates", Arg.String append_predicate,
                   "      specifies comma-separated list of assumed
predicates";
       "-format", Arg.String (fun s -> format := s),
@@ -551,7 +551,7 @@
     Arg.String (fun s -> dll_pkgs := !dll_pkgs @ (Fl_split.in_words s))
in
 

-  Arg.parse
+  Arg.parse_argv Sys.argv
     (List.flatten
     [ [
       "-package", add_pkg,
@@ -1076,7 +1076,7 @@
   let add_pkg =
     Arg.String (fun s -> packages := !packages @ (Fl_split.in_words s))
in
 
-  Arg.parse
+  Arg.parse_argv Sys.argv
       [
        "-syntax", add_syntax_pred,
                 " <p>       Use preprocessor with predicate <p>";
@@ -1172,7 +1172,7 @@
   let add_pkg =
     Arg.String (fun s -> packages := !packages @ (Fl_split.in_words s))
in
 
-  Arg.parse
+  Arg.parse_argv Sys.argv
       [
        "-I", add_spec "-I",
            " <dir>          Add <dir> to the list of include
directories";
@@ -1342,7 +1342,7 @@
   let errmsg = "usage: ocamlfind install [options] <package_name>
<file> ..." in
 
   Arg.current := 1;
-  Arg.parse
+  Arg.parse_argv Sys.argv
         keywords
        (fun s ->
           if !pkgname = ""
@@ -1498,7 +1498,7 @@
   let errmsg = "usage: ocamlfind remove [options] <package_name>" in
 
   Arg.current := 1;
-  Arg.parse
+  Arg.parse_argv Sys.argv
         keywords
        (fun s ->
           if !pkgname = ""
@@ -1604,7 +1604,7 @@
   let errmsg = "usage: ocamlfind guess [options] <package_name> <file>
..." in
 
   Arg.current := 1;
-  Arg.parse
+  Arg.parse_argv Sys.argv
         keywords
        (fun s ->
           if !pkgname = ""
@@ -1654,7 +1654,7 @@
   let errmsg = "usage: ocamlfind printconf
(conf|path|destdir|metadir|stdlib|ldconf)" in
 
   Arg.current := 1;
-  Arg.parse
+  Arg.parse_argv Sys.argv
         []
        (fun s ->
           if !var <> None then raise(Arg.Bad "Unexpected argument");
----------------------------------snip------------------------------

Gerd
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
------------------------------------------------------------

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners