[Artifact] Move the artifact evaluation to its own private library#3330
[Artifact] Move the artifact evaluation to its own private library#3330bobot wants to merge 1 commit intoocaml:masterfrom
Conversation
* Adds an abstract type when we want to delay the decoding Signed-off-by: François Bobot <francois.bobot@cea.fr>
99c2880 to
267a9b9
Compare
| (data_module build_info_data) | ||
| (api_version 1)))) | ||
| (api_version 1))) | ||
| (libraries dune-private-libs.artifact-eval) |
There was a problem hiding this comment.
The formatting is off here. Should be fixed with $ make fmt.
|
Why does it need a separate library? Is it possible to add this as a private module to the build info library? |
|
BTW, we recently decided against public libraries of dune depending on private things. For instance, we plan to extract This means that if we want to extract this code into a library that is shared between dune and a public library, this library itself needs to be stabilised and extract as a public component. This feels a little overkill given that the code is pretty small. In particular, here it seems fine to me to duplicate the code. In particular, we are not going to change the format of the holes. |
|
Ok. I don't want this library to be public. My point was more that it is easier to code in real module than inside strings. Can you point me to the discution about private things? So that I can understand the rational and extent. Thanks. |
|
Agreed about coding in a real module. We could do the same thing as what Rudi did for OCaml files in OCaml syntax (see rule for
This was the result of many discussions. You can search for "let's put a simple model in place" on the dune-dev channel for some context. The model is:
The rationale is to keep things simple. If every public component is an entity of its own that only relies on the public API of other components, then it is easy to understand the relationship between the various components and make things flexible. For instance, with the current state of things it is not possible for users to:
And we didn't realise this until the problem actually occurred. The reason is indeed obscure: using a recent dune requires using a recent Once we have properly and cleanly split things off, the model will be simple and we will be able to apply different policies for different components, and in particular be compatible with different sets of OCaml versions. |
From #3104, the evaluation is reused for sites_locations.