diff mbox series

[[PATCH,for-4.17,v1] ] tools/ocaml/xenstored/store.ml: fix build error

Message ID 5a453393dad1de8286fe5db16504d3db2906eef8.1667500970.git.edvin.torok@citrix.com (mailing list archive)
State New, archived
Headers show
Series [[PATCH,for-4.17,v1] ] tools/ocaml/xenstored/store.ml: fix build error | expand

Commit Message

Edwin Török Nov. 3, 2022, 6:42 p.m. UTC
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>
---
 tools/ocaml/xenstored/store.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Henry Wang Nov. 4, 2022, 2:35 a.m. UTC | #1
Hi Edwin,

> -----Original Message-----
> From: Edwin Török <edvin.torok@citrix.com>
> Subject: [[PATCH for-4.17 v1]] tools/ocaml/xenstored/store.ml: fix build
> error
> 
> 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>

Release-acked-by: Henry Wang <Henry.Wang@arm.com>

Kind regards,
Henry
Christian Lindig Nov. 4, 2022, 9:46 a.m. UTC | #2
On 3 Nov 2022, at 18:42, Edwin Török <edvin.torok@citrix.com<mailto:edvin.torok@citrix.com>> wrote:

Fixes: db471408edd46 "tools/ocaml/xenstored: Fix quota bypass on domain shutdown"

Signed-off-by: Edwin Török <edvin.torok@citrix.com<mailto:edvin.torok@citrix.com>>
---
tools/ocaml/xenstored/store.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Christian Lindig <christian.lindig@citrix.com<mailto:christian.lindig@citrix.com>>
diff mbox series

Patch

diff --git a/tools/ocaml/xenstored/store.ml b/tools/ocaml/xenstored/store.ml
index 14ec404988..38a4945372 100644
--- a/tools/ocaml/xenstored/store.ml
+++ b/tools/ocaml/xenstored/store.ml
@@ -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 = {