Skip to contentSkip to conversation

] tools/ocaml/xenstored/store.ml: fix build error

PATCH In review Edwin Török 3 participants 3 messages Nov 3, 2022 – Nov 4, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ] 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:

Quoted 7 lines

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"
---
 tools/ocaml/xenstored/store.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/ocaml/xenstored/store.ml +1 -1
index 14ec404988..38a4945372 100644
@@ -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 = {
Signature · 1 line
2.34.1
#1 lore raw

Hi Edwin,

Quoted 23 lines

-----Original Message-----
From: Edwin Török <[email protected]>
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:

Quoted 1 line

Check information path during type-checking, to make sure that all types

are

Quoted 1 line

derived in a principal way. When using labelled arguments and/or

polymorphic

Quoted 3 lines

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

Quoted 8 lines
Quoted 1 line

equivalent types, but different binary signatures, and this may slow down

type

Quoted 1 line

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"

Kind regards,
Henry

Acked-by on v1 1/1
#2 lore raw
In reply to Edwin Török

On 3 Nov 2022, at 18:42, Edwin Török <[email protected]<mailto:[email protected]>> wrote:

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

---
tools/ocaml/xenstored/store.ml | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)