xapi-project / xapi-storage

Experimental new storage interface for xapi
https://xapi-project.github.io/xapi-storage/
9 stars 19 forks source link

Sxm doc #82

Closed jonludlam closed 6 years ago

lindig commented 6 years ago

This looks good to me. The Travis failure is down to this:

=> This package relies on external (system) dependencies that may be missing.
   `opam depext xapi-storage.master' may help you find the correct installation
   for your system.
mseri commented 6 years ago

I think that is a misleading default message from opam. The error seems to be in the tests:

[OK]                check_response_parser          0   SR.attach.
[OK]                check_response_parser          1   SR.detach.
[OK]                check_response_parser          2   SR.ls.
[OK]                check_response_parser          3   Volume.create.
[OK]                check_response_parser          4   Volume.clone.
[OK]                check_response_parser          5   Volume.snapshot.
[OK]                check_response_parser          6   Volume.destroy.
[ERROR]             check_request_parser           0   SR.attach.
[ERROR]             check_request_parser           1   SR.detach.
[ERROR]             check_request_parser           2   SR.ls.
[ERROR]             check_request_parser           3   Volume.create.
- -- check_request_parser.000 [SR.attach.] Failed --
- in _build/_tests/check_request_parser.000.output:
- [exception] Unix.Unix_error(Unix.ENOENT, "open", "../../../../rpc-light/SR/attach/request")
- 
- The full test results are available in `_build/_tests`.
- 4 errors! in 0.008s. 11 tests run.
[ERROR] The compilation of xapi-storage failed at "jbuilder runtest -p
        xapi-storage -j 4".
mseri commented 6 years ago

I have re-run the build. Something weird is going on:

[xapi-storage: jbuilder build] Command started
+ jbuilder "build" "-p" "xapi-storage" "-j" "4" (CWD=/home/travis/.opam/4.04.2/build/xapi-storage.master)
- File "generator/lib/jbuild", line 1, characters 0-0:
- Warning: Module "Common" is used in several stanzas:
- - _build/.jbuilds/default/generator/lib/jbuild:14
- - _build/.jbuilds/default/generator/lib/jbuild:4
- To remove this warning, you must specify an explicit "modules" field in every
- library, executable, and executables stanzas in this jbuild file. Note that
- each module cannot appear in more than one "modules" field - it must belong
- to a single library or executable.
- This warning will become an error in the future.
- File "generator/lib/jbuild", line 1, characters 0-0:
- Warning: Module "Control" is used in several stanzas:
- - _build/.jbuilds/default/generator/lib/jbuild:14
- - _build/.jbuilds/default/generator/lib/jbuild:4
- To remove this warning, you must specify an explicit "modules" field in every
- library, executable, and executables stanzas in this jbuild file. Note that
- each module cannot appear in more than one "modules" field - it must belong
- to a single library or executable.
- This warning will become an error in the future.
- File "generator/lib/jbuild", line 1, characters 0-0:
- Warning: Module "Data" is used in several stanzas:
- - _build/.jbuilds/default/generator/lib/jbuild:14
- - _build/.jbuilds/default/generator/lib/jbuild:4
- To remove this warning, you must specify an explicit "modules" field in every
- library, executable, and executables stanzas in this jbuild file. Note that
- each module cannot appear in more than one "modules" field - it must belong
- to a single library or executable.
- This warning will become an error in the future.
- File "generator/lib/jbuild", line 1, characters 0-0:
- Warning: Module "Plugin" is used in several stanzas:
- - _build/.jbuilds/default/generator/lib/jbuild:14
- - _build/.jbuilds/default/generator/lib/jbuild:4
- To remove this warning, you must specify an explicit "modules" field in every
- library, executable, and executables stanzas in this jbuild file. Note that
- each module cannot appear in more than one "modules" field - it must belong
- to a single library or executable.
- This warning will become an error in the future.
- File "generator/lib/jbuild", line 1, characters 0-0:
- Warning: Module "Task" is used in several stanzas:
- - _build/.jbuilds/default/generator/lib/jbuild:14
- - _build/.jbuilds/default/generator/lib/jbuild:4
- To remove this warning, you must specify an explicit "modules" field in every
- library, executable, and executables stanzas in this jbuild file. Note that
- each module cannot appear in more than one "modules" field - it must belong
- to a single library or executable.
- This warning will become an error in the future.
-       ocamlc generator/lib/.xapi_storage.objs/xapi_storage__Control.{cmi,cmo,cmt} (exit 2)
- (cd _build/default && /home/travis/.opam/4.04.2/bin/ocamlc.opt -w -40 -warn-error +a-3 -ppx '/home/travis/.opam/4.04.2/lib/ppx_deriving/./ppx_deriving /home/travis/.opam/4.04.2/lib/ppx_deriving_rpc/./ppx_deriving_rpc.cma' -g -bin-annot -I generator/lib/.xapi_storage.objs -I /home/travis/.opam/4.04.2/lib/ocaml-migrate-parsetree -I /home/travis/.opam/4.04.2/lib/ocaml/compiler-libs -I /home/travis/.opam/4.04.2/lib/ppx_derivers -I /home/travis/.opam/4.04.2/lib/ppx_deriving -I /home/travis/.opam/4.04.2/lib/ppx_deriving_rpc -I /home/travis/.opam/4.04.2/lib/ppx_tools -I /home/travis/.opam/4.04.2/lib/result -I /home/travis/.opam/4.04.2/lib/rpclib -I /home/travis/.opam/4.04.2/lib/rresult -I /home/travis/.opam/4.04.2/lib/xmlm -no-alias-deps -open Xapi_storage -o generator/lib/.xapi_storage.objs/xapi_storage__Control.cmo -c -impl generator/lib/control.ml)
- File "generator/lib/control.ml", line 240, characters 34-45:
- Error: This expression has type 'a option
-        but an expression was expected of type string
[ERROR] The compilation of xapi-storage failed at "jbuilder build -p
        xapi-storage -j 4".
mseri commented 6 years ago

@jonludlam you can use the following patch to fix the compilation issues on the sxm branch:

0001-generator-fix-compilation-issues-and-warnings.patch.txt

mseri commented 6 years ago

I did not notice the use of generator_lib here: https://github.com/xapi-project/xapi-storage/blob/sxm/generator/html/jbuild#L6 this also has to be replaced with xapi-storage. To test the change it's enough to run jbuilder build @gen_html