File tree Expand file tree Collapse file tree 6 files changed +42
-53
lines changed Expand file tree Collapse file tree 6 files changed +42
-53
lines changed Original file line number Diff line number Diff line change 221
221
(name xapi-nbd))
222
222
223
223
( package
224
- (name xapi-log))
224
+ (name xapi-log)
225
+ (synopsis " A Logs library required by xapi" )
226
+ ( description
227
+ " This package is provided for backwards compatibility only. No new package should use it." )
228
+ ( depends
229
+ astring
230
+ fmt
231
+ logs
232
+ mtime
233
+ xapi-backtrace
234
+ ( xapi-stdext-pervasives ( = :version ) ) ) )
225
235
226
236
( package
227
237
(name xapi-idl))
Original file line number Diff line number Diff line change 1
1
(executable
2
2
(name log_test)
3
- (libraries log xapi-stdext-threads threads.posix xapi-backtrace))
3
+ (libraries log threads.posix xapi-backtrace))
4
4
5
5
(cram
6
6
(package xapi-log)
Original file line number Diff line number Diff line change @@ -6,12 +6,16 @@ let a = [||]
6
6
7
7
let buggy () = a.(1 ) < - 0
8
8
9
+ let with_lock mutex f =
10
+ let finally () = Mutex. unlock mutex in
11
+ Mutex. lock mutex ; Fun. protect ~finally f
12
+
9
13
let () =
10
14
Printexc. record_backtrace true ;
11
15
Debug. log_to_stdout () ;
12
16
()
13
17
|> Debug. with_thread_associated " main" @@ fun () ->
14
- try Xapi_stdext_threads.Threadext.Mutex. execute m buggy
18
+ try with_lock m buggy
15
19
with e ->
16
20
D. log_backtrace e ;
17
21
D. warn " Got exception: %s" (Printexc. to_string e)
Original file line number Diff line number Diff line change 3
3
[|error||0 |main|backtrace] 1/4 log_test.exe Raised at file ocaml/libs/log/test/log_test.ml, line 7
4
4
[|error||0 |main|backtrace] 2/4 log_test.exe Called from file fun.ml, line 33
5
5
[|error||0 |main|backtrace] 3/4 log_test.exe Called from file fun.ml, line 38
6
- [|error||0 |main|backtrace] 4/4 log_test.exe Called from file ocaml/libs/log/test/log_test.ml, line 14
6
+ [|error||0 |main|backtrace] 4/4 log_test.exe Called from file ocaml/libs/log/test/log_test.ml, line 18
7
7
[|error||0 |main|backtrace]
8
8
[| warn||0 |main|log_test.ml] Got exception: Invalid_argument("index out of bounds")
9
9
Original file line number Diff line number Diff line change 1
1
# This file is generated by dune, edit dune-project instead
2
- license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
3
2
opam-version: "2.0"
4
-
5
-
3
+ synopsis: "A Logs library required by xapi"
4
+ description:
5
+ "This package is provided for backwards compatibility only. No new package should use it."
6
+ maintainer: ["Xapi project maintainers"]
7
+
8
+ license: "LGPL-2.1-only WITH OCaml-LGPL-linking-exception"
6
9
homepage: "https://xapi-project.github.io/"
7
- bug-reports: "https://github.com/xapi-project/xen-api.git"
8
- dev-repo: "git+https://github.com/xapi-project/xen-api.git"
9
- build: [
10
- ["dune" "build" "-p" name "-j" jobs]
11
- ["dune" "runtest" "-p" name "-j" jobs] {with-test}
12
- ]
13
- available: [ os = "linux" ]
10
+ bug-reports: "https://github.com/xapi-project/xen-api/issues"
14
11
depends: [
15
- "ocaml"
16
12
"dune" {>= "3.15"}
17
13
"astring"
18
14
"fmt"
19
15
"logs"
20
16
"mtime"
21
17
"xapi-backtrace"
22
- "xapi-stdext-pervasives"
18
+ "xapi-stdext-pervasives" {= version}
19
+ "odoc" {with-doc}
20
+ ]
21
+ build: [
22
+ ["dune" "subst"] {dev}
23
+ [
24
+ "dune"
25
+ "build"
26
+ "-p"
27
+ name
28
+ "-j"
29
+ jobs
30
+ "@install"
31
+ "@runtest" {with-test}
32
+ "@doc" {with-doc}
33
+ ]
23
34
]
24
- synopsis: "Library required by xapi"
25
- description: """
26
- These libraries are provided for backwards compatibility only.
27
- No new code should use these libraries."""
28
- url {
29
- src:
30
- "https://github.com/xapi-project/xen-api/archive/master.tar.gz"
31
- }
35
+ dev-repo: "git+https://github.com/xapi-project/xen-api.git"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments