Hello community, here is the log from the commit of package ocaml-rope for openSUSE:Factory checked in at 2019-03-20 13:22:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ocaml-rope (Old) and /work/SRC/openSUSE:Factory/.ocaml-rope.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ocaml-rope" Wed Mar 20 13:22:01 2019 rev:3 rq:686861 version:0.6.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ocaml-rope/ocaml-rope.changes 2019-02-20 14:12:55.998907359 +0100 +++ /work/SRC/openSUSE:Factory/.ocaml-rope.new.28833/ocaml-rope.changes 2019-03-20 13:22:24.169298190 +0100 @@ -1,0 +2,7 @@ +Wed Mar 20 07:42:58 UTC 2019 - [email protected] + +- Update to version 0.6.2: + * Improve documentation. + * Upgrade to OPAM 2. + +------------------------------------------------------------------- Old: ---- ocaml-rope-0.6.1.tar.gz New: ---- ocaml-rope-0.6.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ocaml-rope.spec ++++++ --- /var/tmp/diff_new_pack.fUV2a6/_old 2019-03-20 13:22:25.557297848 +0100 +++ /var/tmp/diff_new_pack.fUV2a6/_new 2019-03-20 13:22:25.609297836 +0100 @@ -17,7 +17,7 @@ Name: ocaml-rope -Version: 0.6.1 +Version: 0.6.2 Release: 0 %{?ocaml_preserve_bytecode} Summary: Ropes ("heavyweight strings") for OCaml ++++++ ocaml-rope-0.6.1.tar.gz -> ocaml-rope-0.6.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/CHANGES.md new/ocaml-rope-0.6.2/CHANGES.md --- old/ocaml-rope-0.6.1/CHANGES.md 2017-12-25 14:35:20.000000000 +0100 +++ new/ocaml-rope-0.6.2/CHANGES.md 2019-03-19 19:56:08.000000000 +0100 @@ -1,3 +1,10 @@ +0.6.2 2019-03-19 +---------------- + +- Improve the structure of the documentation. +- Use [dune](https://github.com/ocaml/dune) to compile. +- Upgrade to OPAM 2. + 0.6.1 2017-12-25 ---------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/Makefile new/ocaml-rope-0.6.2/Makefile --- old/ocaml-rope-0.6.1/Makefile 2017-12-25 14:35:20.000000000 +0100 +++ new/ocaml-rope-0.6.2/Makefile 2019-03-19 19:56:08.000000000 +0100 @@ -1,36 +1,25 @@ PKGVERSION = $(shell git describe --always --dirty) -WEB = rope.forge.ocamlcore.org:/home/groups/rope/htdocs -SRC_WEB = web - all build: - jbuilder build @install --dev - jbuilder build bench/bm_ropes.exe bench/bench_rope.exe + dune build @install bench/bm_ropes.exe bench/bench_rope.exe test runtest: -# Force the tests to be run - $(RM) -rf _build/default/tests/ - jbuilder runtest + dune runtest --force install uninstall: - jbuilder $@ + dune $@ doc: - jbuilder build @doc + dune build @doc + sed -e "s/%%VERSION%%/$(PKGVERSION)/" --in-place \ + _build/default/_doc/_html/rope/Rope/index.html # Benchmarks bench: - jbuilder build @bench \ + dune build @bench \ && cd _build/default/bench/ && gnuplot -persist bm_ropes.plot @echo "Bench results: SGV in _build/default/bench/" -# Release a Sourceforge tarball and publish the HTML doc -.PHONY: web upload -web-doc: doc - @ if [ -d API.docdir/ ] ; then \ - scp -r API.docdir/ $(WEB)/ \ - && echo "*** Published documentation" ; \ - fi web: @ if [ -d $(SRC_WEB)/ ] ; then \ scp $(addprefix $(SRC_WEB)/, *.html *.css *.png) LICENSE $(WEB) \ @@ -38,7 +27,7 @@ fi clean:: - jbuilder clean + dune clean $(RM) $(wildcard bench/*.dat) .PHONY: all build test runtest doc bench clean diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/README.md new/ocaml-rope-0.6.2/README.md --- old/ocaml-rope-0.6.1/README.md 2017-12-25 14:35:20.000000000 +0100 +++ new/ocaml-rope-0.6.2/README.md 2019-03-19 19:56:08.000000000 +0100 @@ -15,22 +15,22 @@ opam install rope -To compile the development version, you will need to install [jbuilder][] +To compile the development version, you will need to install [dune][] and then issue - jbuilder build @install + dune build @install Install with: - jbuilder install + dune install To run the tests, install the module [Benchmark][] and do - jbuilder runtest + dune runtest [opam]: http://opam.ocaml.org/ -[jbuilder]: https://github.com/janestreet/jbuilder +[dune]: https://github.com/ocaml/dune [benchmark]: https://github.com/Chris00/ocaml-benchmark Documentation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/bench/bench_rope.ml new/ocaml-rope-0.6.2/bench/bench_rope.ml --- old/ocaml-rope-0.6.1/bench/bench_rope.ml 2017-12-25 14:35:20.000000000 +0100 +++ new/ocaml-rope-0.6.2/bench/bench_rope.ml 2019-03-19 19:56:08.000000000 +0100 @@ -3,7 +3,7 @@ let empty = Rope.empty let ( ^^ ) = Rope.concat2 -let rec random_string len = +let random_string len = let s = Bytes.create len in for i = 0 to len - 1 do Bytes.set s i (Char.chr(Random.int 255)) done; Bytes.unsafe_to_string s diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/bench/bm_ropes.ml new/ocaml-rope-0.6.2/bench/bm_ropes.ml --- old/ocaml-rope-0.6.1/bench/bm_ropes.ml 2017-12-25 14:35:20.000000000 +0100 +++ new/ocaml-rope-0.6.2/bench/bm_ropes.ml 2019-03-19 19:56:08.000000000 +0100 @@ -65,15 +65,15 @@ (* just for laughs *) let basic_loop_overhead = let t1 = Unix.gettimeofday () in - for j = 0 to 100 do - for i = 0 to n_ops do ignore () done + for _ = 0 to 100 do + for _ = 0 to n_ops do ignore () done done; (Unix.gettimeofday () -. t1) /. 100.0 let random_loop_overhead = let t1 = Unix.gettimeofday () in - for j = 0 to 100 do - for i = 0 to n_ops do ignore (Random.int 10000) done; + for _ = 0 to 100 do + for _ = 0 to n_ops do ignore (Random.int 10000) done; done; (Unix.gettimeofday () -. t1) /. 100.0 @@ -150,7 +150,7 @@ let append_time size = let v = ref (make_rope size) in let t0 = Unix.gettimeofday () in - for i = 0 to n_ops - 1 do + for _ = 0 to n_ops - 1 do v := R.append 'z' !v; (* ignore (append_f I !v); *) done; @@ -167,7 +167,7 @@ (* Gc.full_major (); *) let t0 = Unix.gettimeofday () in (* let sum = ref 0 in *) - for i = 0 to n_ops - 1 do + for _ = 0 to n_ops - 1 do ignore(R.get r (Random.int size)); done; let dt = (Unix.gettimeofday () -. t0) in @@ -183,7 +183,7 @@ let r = make_rope size in let t0 = Unix.gettimeofday () in let h = ref 0 in - for i = 0 to n_ops - 1 do + for _ = 0 to n_ops - 1 do h := !h + R.height(R.sub r 0 (Random.int size)); done; let dt = (Unix.gettimeofday () -. t0) in @@ -222,7 +222,7 @@ let do_qsort size = let nchunks = size / 100_000 in let data = ref R.empty in - for i = 1 to nchunks do + for _ = 1 to nchunks do data := R.concat !data (R.concat (R.of_string(sprintf "%08i" (Random.int nchunks))) bulk_string) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/bench/dune new/ocaml-rope-0.6.2/bench/dune --- old/ocaml-rope-0.6.1/bench/dune 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-rope-0.6.2/bench/dune 2019-03-19 19:56:08.000000000 +0100 @@ -0,0 +1,13 @@ +(executables + (names bench_rope bm_ropes) + (libraries rope benchmark)) + +(alias + (name runtest) + (deps bench_rope.exe) + (action (run %{deps}))) + +(alias + (name bench) + (deps bm_ropes.exe bm_ropes.plot) + (action (run %{deps}))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/bench/jbuild new/ocaml-rope-0.6.2/bench/jbuild --- old/ocaml-rope-0.6.1/bench/jbuild 2017-12-25 14:35:20.000000000 +0100 +++ new/ocaml-rope-0.6.2/bench/jbuild 1970-01-01 01:00:00.000000000 +0100 @@ -1,15 +0,0 @@ -(jbuild_version 1) - -(executables - ((names (bench_rope bm_ropes)) - (libraries (rope benchmark)))) - -(alias - ((name runtest) - (deps (bench_rope.exe)) - (action (run ${<})))) - -(alias - ((name bench) - (deps (bm_ropes.exe bm_ropes.plot)) - (action (run ${<})))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/bench/tinyRope.ml new/ocaml-rope-0.6.2/bench/tinyRope.ml --- old/ocaml-rope-0.6.1/bench/tinyRope.ml 2017-12-25 14:35:20.000000000 +0100 +++ new/ocaml-rope-0.6.2/bench/tinyRope.ml 2019-03-19 19:56:08.000000000 +0100 @@ -69,7 +69,6 @@ type forest_element = { mutable c : t; mutable len : int } let str_append = (^) -let empty_str = "" let string_of_string_list l = String.concat "" l module STRING = String @@ -99,7 +98,7 @@ let is_empty = function Empty -> true | _ -> false -let rec length = function +let length = function Empty -> 0 | Leaf s -> STRING.length s | Concat(_,cl,_,cr,_) -> cl + cr @@ -222,15 +221,15 @@ | Leaf s -> if i >= 0 && i < STRING.length s then STRING.unsafe_get s i else raise Out_of_bounds - | Concat (l, cl, r, cr, _) -> + | Concat (l, cl, r, _, _) -> if i < cl then get i l else get (i - cl) r let rec getn i = function Empty -> raise Out_of_bounds - | Leaf s -> + | Leaf _ -> 0 - | Concat (l, cl, r, cr, _) -> + | Concat (l, cl, r, _, _) -> if i < cl then 1 + getn i l else 1 + getn (i - cl) r @@ -242,7 +241,7 @@ Bytes.unsafe_set s i v; Leaf (Bytes.unsafe_to_string s) else raise Out_of_bounds - | Concat(l, cl, r, cr, _) -> + | Concat(l, cl, r, _, _) -> if i < cl then concat (set i v l) r else concat l (set (i - cl) v r) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/dune-project new/ocaml-rope-0.6.2/dune-project --- old/ocaml-rope-0.6.1/dune-project 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-rope-0.6.2/dune-project 2019-03-19 19:56:08.000000000 +0100 @@ -0,0 +1,2 @@ +(lang dune 1.0) +(name rope) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/pkg/pkg.ml new/ocaml-rope-0.6.2/pkg/pkg.ml --- old/ocaml-rope-0.6.1/pkg/pkg.ml 2017-12-25 14:35:20.000000000 +0100 +++ new/ocaml-rope-0.6.2/pkg/pkg.ml 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -#use "topfind" -#require "topkg-jbuilder.auto" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/rope.descr new/ocaml-rope-0.6.2/rope.descr --- old/ocaml-rope-0.6.1/rope.descr 2017-12-25 14:35:20.000000000 +0100 +++ new/ocaml-rope-0.6.2/rope.descr 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -Ropes ("heavyweight strings") - -Ropes ("heavyweight strings") are a scalable string implementation: -they are designed for efficient operation that involve the string as a -whole. Operations such as concatenation, and substring take time that -is nearly independent of the length of the string. Unlike strings, -ropes are a reasonable representation for very long strings such as -edit buffers or mail messages. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/rope.opam new/ocaml-rope-0.6.2/rope.opam --- old/ocaml-rope-0.6.1/rope.opam 2017-12-25 14:35:20.000000000 +0100 +++ new/ocaml-rope-0.6.2/rope.opam 2019-03-19 19:56:08.000000000 +0100 @@ -1,20 +1,29 @@ -opam-version: "1.2" +opam-version: "2.0" maintainer: "Christophe Troestler <[email protected]>" authors: [ "Christophe Troestler" ] license: "LGPL-2.1 with OCaml linking exception" homepage: "https://github.com/Chris00/ocaml-rope" -dev-repo: "https://github.com/Chris00/ocaml-rope.git" +dev-repo: "git+https://github.com/Chris00/ocaml-rope.git" bug-reports: "https://github.com/Chris00/ocaml-rope/issues" doc: "https://Chris00.github.io/ocaml-rope/doc" -tags: [ "datastructure" ] +tags: [ "datastructure" ] build: [ - [ "jbuilder" "subst" ] {pinned} - [ "jbuilder" "build" "-p" name "-j" jobs ] + ["dune" "subst"] {pinned} + ["dune" "build" "-p" name "-j" jobs] + ["dune" "runtest" "-p" name "-j" jobs] {with-test} ] -build-test: [["jbuilder" "runtest" "-p" name "-j" jobs]] depends: [ + "ocaml" {>= "4.03.0"} "base-bytes" - "jbuilder" {build} - "benchmark" {test} + "dune" {build} + "benchmark" {with-test} ] -available: [ocaml-version >= "4.03.0"] +synopsis: "Ropes (heavyweight strings)" +description: """ +Ropes ("heavyweight strings") are a scalable string implementation: +they are designed for efficient operation that involve the string as a +whole. Operations such as concatenation, and substring take time that +is nearly independent of the length of the string. Unlike strings, +ropes are a reasonable representation for very long strings such as +edit buffers or mail messages. +""" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/src/dune new/ocaml-rope-0.6.2/src/dune --- old/ocaml-rope-0.6.1/src/dune 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-rope-0.6.2/src/dune 2019-03-19 19:56:08.000000000 +0100 @@ -0,0 +1,6 @@ +(library + (name rope) + (public_name rope) + (libraries bytes) + (synopsis "Ropes (heavyweight strings)")) + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/src/jbuild new/ocaml-rope-0.6.2/src/jbuild --- old/ocaml-rope-0.6.1/src/jbuild 2017-12-25 14:35:20.000000000 +0100 +++ new/ocaml-rope-0.6.2/src/jbuild 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +0,0 @@ -(jbuild_version 1) - -(library - ((name rope) - (public_name rope) - (flags (:standard -safe-string)) - (libraries (bytes)) - (synopsis "Ropes (heavyweight strings)"))) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/src/rope.mli new/ocaml-rope-0.6.2/src/rope.mli --- old/ocaml-rope-0.6.1/src/rope.mli 2017-12-25 14:35:20.000000000 +0100 +++ new/ocaml-rope-0.6.2/src/rope.mli 2019-03-19 19:56:08.000000000 +0100 @@ -28,7 +28,7 @@ Features: - No length limitation (contrarily to strings); - - Immutability (use {!Rope.Buffer} instead); + - Immutability (use {!Rope.Buffer} to incrementally build ropes); - Efficient concatenation ({!Rope.concat2}) and splice ({!Rope.sub}); - Share memory whenever possible. @@ -62,6 +62,8 @@ (** Raised by various functions to indicate out-of-bounds access. The string argument is the name of the function that raised it. *) +(** {2 Basics (creation, access,...)} *) + val empty : t (** The empty rope. *) @@ -147,6 +149,8 @@ represented by escape sequences, following the lexical conventions of Objective Caml. *) +(** {2 Search char} *) + val index : t -> char -> int (** [index r c] returns the position of the leftmost occurrence of character [c] in rope [r]. @@ -202,6 +206,19 @@ [stop]. @raise Invalid_argument if [stop] is not a valid index of [r]. *) + +(** {2 Search substring} *) + +val search_forward_string : string -> t -> int -> int + (** [search_forward_string p] is a search function that, given a + rope [r] and a start index [i0], will return the position of + [p] in [r] or raise [Not_found] if no occurrence of [p] in [r] + exists. [let search = search_forward_string p] takes + O(length p) and [search r i0] takes O(length r - i0). *) + + +(** {2 ASCII letter case} *) + val uppercase_ascii : t -> t (** Return the argument with all lowercase letters translated to uppercase, including accented letters of the ISO Latin-1 (8859-1) @@ -218,18 +235,6 @@ val uncapitalize_ascii : t -> t (** Return the argument with the first character set to lowercase. *) -val compare: t -> t -> int - (** The comparison function for ropes, with the same specification - as [Pervasives.compare]. Along with the type [t], this function - [compare] allows the module {!Rope} to be passed as argument to - the functors [Set.Make] and [Map.Make]. *) - -val equal : t -> t -> bool - (** [equal r1 r2] tells whether the two ropes [r1] and [r2] are - equal. (It is equivalent to [compare r1 r2 = 0], just slightly - faster.) *) - - val uppercase : t -> t [@@ocaml.deprecated "Use Rope.uppercase_ascii"] (** @deprecated Use {!Rope.uppercase_ascii}. *) @@ -243,14 +248,18 @@ (** @deprecated Use {!Rope.uncapitalize_ascii}. *) -(** {2 Search} *) +(** {2 Ordering} *) -val search_forward_string : string -> t -> int -> int - (** [search_forward_string p] is a search function that, given a - rope [r] and a start index [i0], will return the position of - [p] in [r] or raise [Not_found] if no occurrence of [p] in [r] - exists. [let search = search_forward_string p] takes - O(length p) and [search r i0] takes O(length r - i0). *) +val compare: t -> t -> int + (** The comparison function for ropes, with the same specification + as [Pervasives.compare]. Along with the type [t], this function + [compare] allows the module {!Rope} to be passed as argument to + the functors [Set.Make] and [Map.Make]. *) + +val equal : t -> t -> bool + (** [equal r1 r2] tells whether the two ropes [r1] and [r2] are + equal. (It is equivalent to [compare r1 r2 = 0], just slightly + faster.) *) (** {2 Input/output} @@ -310,7 +319,7 @@ greater or equal to [rebalancing_height]. *) -(** {2 Submodules} *) +(** {2 Iterator} *) (** Iterators for ropes. It is more efficient to use an iterator to perform small steps and get the characters than to use {!Rope.get} @@ -360,6 +369,7 @@ end +(** {2 Buffer} *) (** This is similar to the [Buffer] module in the standard library except that it constructs ropes. It is recommended to use this @@ -431,12 +441,14 @@ Time: O(log(length b)). *) end -(** TBD: Regular expressions for ropes. *) -module Regexp : sig +(* TBD: Regular expressions for ropes. *) +(* module Regexp : sig *) -end +(* end *) + +(** {2 REPL} *) (** Toploop printer and its configuration. *) module Rope_toploop : sig diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/top/dune new/ocaml-rope-0.6.2/top/dune --- old/ocaml-rope-0.6.1/top/dune 1970-01-01 01:00:00.000000000 +0100 +++ new/ocaml-rope-0.6.2/top/dune 2019-03-19 19:56:08.000000000 +0100 @@ -0,0 +1,10 @@ +(library + (name rope_top) + (public_name rope.top) + (modes byte) + (synopsis "Install toplevel (REPL) printers for Rope") + (flags :standard + -w -9 + -safe-string -strict-sequence + -principal -short-paths) + (libraries compiler-libs.toplevel rope)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ocaml-rope-0.6.1/top/jbuild new/ocaml-rope-0.6.2/top/jbuild --- old/ocaml-rope-0.6.1/top/jbuild 2017-12-25 14:35:20.000000000 +0100 +++ new/ocaml-rope-0.6.2/top/jbuild 1970-01-01 01:00:00.000000000 +0100 @@ -1,14 +0,0 @@ -(jbuild_version 1) - -(library - ((name rope_top) - (public_name rope.top) - (modes (byte)) - (synopsis "Install toplevel (REPL) printers for Rope") - (flags ( - :standard - -w -9 - -safe-string -strict-sequence - -principal -short-paths - )) - (libraries (compiler-libs.toplevel rope))))
