You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll call the configurations passed to the functor the "compile-time" configurations and the configuration passed to Repo.v as "run-time" configuration.
This is a common pattern in at least one other Irmin backend (irmin-fs).
It seems understandable that there are compile-time configurations and run-time configurations and it makes sense to pack compile-time configurations into an OCaml module as it might contain entire modules (instead of just values).
However, currently compile-time configurations to irmin-pack (and irmin-fs) are just values and the decision what values are compile-time and what values are run-time values seems confusing. For example contents_length_header : length_header is a compile-time configuration whereas index_log_size : int is a run-time configuration.
Possible courses of actions:
Improve documentation with explanation of run-time and compile-time configurations and rationale why certain configurations are passed at which stage.
Rename the compile-time configurations to Irmin_pack.Schema. This would be like the Irmin.Schema but with backend specific compile-time configuration.
The text was updated successfully, but these errors were encountered:
Currently when instantiating an
irmin-pack.unix
store there are two configuration objects that need to be passed in:Maker
module using theIrmin_pack.Conf.S
module.:v
'ing aRepo
with aIrmin.Conf.t
object:I'll call the configurations passed to the functor the "compile-time" configurations and the configuration passed to
Repo.v
as "run-time" configuration.This is a common pattern in at least one other Irmin backend (
irmin-fs
).It seems understandable that there are compile-time configurations and run-time configurations and it makes sense to pack compile-time configurations into an OCaml module as it might contain entire modules (instead of just values).
However, currently compile-time configurations to
irmin-pack
(andirmin-fs
) are just values and the decision what values are compile-time and what values are run-time values seems confusing. For examplecontents_length_header : length_header
is a compile-time configuration whereasindex_log_size : int
is a run-time configuration.Possible courses of actions:
Irmin_pack.Schema
. This would be like theIrmin.Schema
but with backend specific compile-time configuration.The text was updated successfully, but these errors were encountered: