Skip to content

Commit d7f97ac

Browse files
authored
Import xapi-backtrace into XAPI (#6957)
To make changes to the backtrace library we need to first import it into XAPI. Used `git subtree` to import it with its full history. Follow-up pull-requests will update it to: * use new functions from Printexc (introduced in 4.02 and 4.11) that avoids parsing the strings * deduplicate entries * print function names and characters, not just line numbers Eventually it could also be updated to capture a backtrace automatically (e.g. a `Backtrace.try_with` function). A chainbuild passed using this PR, together with another internal PR that drops references to the external `xapi-backtrace` module from other internal packages.
2 parents a2debf0 + e4da294 commit d7f97ac

56 files changed

Lines changed: 1136 additions & 55 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dune-project

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@
235235
fmt
236236
logs
237237
mtime
238-
xapi-backtrace
239238
(xapi-stdext-pervasives (= :version))))
240239

241240
(package
@@ -322,7 +321,6 @@
322321
uuidm
323322
uutf
324323
x509
325-
xapi-backtrace
326324
xapi-log
327325
xapi-types
328326
xapi-stdext-pervasives
@@ -451,7 +449,6 @@
451449
uutf
452450
uuidm
453451
x509
454-
xapi-backtrace
455452
(xapi-client
456453
(= :version))
457454
(xapi-cli-protocol
@@ -764,7 +761,6 @@
764761
uri
765762
(uuid
766763
(= :version))
767-
xapi-backtrace
768764
(xapi-idl
769765
(= :version))
770766
(xapi-log
@@ -795,7 +791,6 @@
795791
rpclib
796792
(uuid
797793
(= :version))
798-
xapi-backtrace
799794
(xapi-log
800795
(= :version))
801796
(xapi-stdext-pervasives
@@ -842,7 +837,7 @@
842837
(>= 4.08))
843838
logs
844839
(odoc :with-doc)
845-
xapi-backtrace))
840+
))
846841

847842
(package
848843
(name xapi-stdext-std)
@@ -902,7 +897,6 @@
902897
(>= 0.21.2)
903898
:with-test))
904899
(odoc :with-doc)
905-
xapi-backtrace
906900
unix-errno
907901
(xapi-stdext-pervasives
908902
(= :version))

ocaml/database/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
httpsvr
5454
unix
5555
uuid
56-
xapi-backtrace
56+
backtrace
5757
xapi-datamodel
5858
xapi-log
5959
(re_export xapi-schema)

ocaml/forkexecd/lib/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
rpclib.xml
1313
unix
1414
uuid
15-
xapi-backtrace
15+
backtrace
1616
xapi-log
1717
xapi-stdext-pervasives
1818
xapi-stdext-unix

ocaml/gencert/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
rresult
1919
unix
2020
x509
21-
xapi-backtrace
21+
backtrace
2222
xapi-consts
2323
xapi-log
2424
xapi-inventory

ocaml/idl/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
sexplib0
1414
sexpr
1515
threads
16-
xapi-backtrace
16+
backtrace
1717
xapi-consts
1818
xapi-schema
1919
clock

ocaml/libs/backtrace/.git-blame-ignore-revs

Whitespace-only changes.

ocaml/libs/backtrace/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
_build
2+
*.install
3+
.merlin

ocaml/libs/backtrace/CHANGES.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## v0.8 (13-Mar-2026)
2+
* Set a license
3+
* Provide a new with_backtraces that prevents printing invalid traces
4+
* Fix losing backtraces when reraising
5+
* Add regression tests
6+
7+
## v0.7 (18-Sep-2018)
8+
* Remove dependency on full sexplib
9+
* Simplify jbuild, quiet warnings, move to dune and update opam dependencies
10+
* jbuild: remove ppx_deriving_rpc from libraries
11+
* Move to dune and update opam dependencies
12+
13+
## v0.6 (16-May-2018)
14+
* Add support for ppx_sexp_conv >= v0.11.0
15+
16+
## v0.5 (04-Aug-2017)
17+
* port to jbuilder
18+
19+
## v0.3 (21-Aug-2015)
20+
* correct ordering
21+
* add rpc to opam
22+
* add doc gen to _oasis
23+
24+
## v0.2 (20-Nov-2014)
25+
* store backtraces as lists of records rather than strings
26+
* change the API for "importing" backtraces from other languages

0 commit comments

Comments
 (0)