]> xenbits.xensource.com Git - xen.git/commitdiff
tools/ocaml/xenstored/store.ml: fix build error
authorEdwin Török <edvin.torok@citrix.com>
Wed, 9 Nov 2022 09:48:33 +0000 (10:48 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 12 Dec 2022 11:04:12 +0000 (11:04 +0000)
Building with Dune in release mode fails with:
```
File "ocaml/xenstored/store.ml", line 464, characters 13-32:
Warning 18: this type-based record disambiguation is not principal.
File "ocaml/xenstored/store.ml", line 1:
Error: Some fatal warnings were triggered (1 occurrences)
```

This is a warning to help keep the code futureproof, quoting from its
documentation:
> Check information path during type-checking, to make sure that all types are
> derived in a principal way. When using labelled arguments and/or polymorphic
> methods, this flag is required to ensure future versions of the compiler will
> be able to infer types correctly, even if internal algorithms change. All
> programs accepted in -principal mode are also accepted in the default mode with
> equivalent types, but different binary signatures, and this may slow down type
> checking; yet it is a good idea to use it once before publishing source code.

Fixes: db471408edd46 "tools/ocaml/xenstored: Fix quota bypass on domain shutdown"
Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
(cherry picked from commit 124492eff8e4acdaaed939fa9406b108c55fec73)

tools/ocaml/xenstored/store.ml

index 70f0c83de40413b663e6220e74b78917ac4fcbc3..c94dbf3a62276c8328525e6aaae6f9695e636023 100644 (file)
@@ -461,7 +461,7 @@ let reset_permissions store domid =
                | Some perms ->
                        if perms <> node.perms then
                                Logging.debug "store|node" "Changed permissions for node %s" (Node.get_name node);
-                       Some { node with perms }
+                       Some { node with Node.perms }
        ) store.root
 
 type ops = {