drom
drom copied to clipboard
Making drom self testable/sufficient
Drom uses too much hardcoded/assumed stuff preventing an efficient tests (like with cram tests) or security developement integrations.
AFAIK, a packaging effort is needed by :
- not relying on system directories ($HOME and so on) because all system are not full Linux, MacOS or Windows:
- there are more and more custom platforms (and i'm well placed to say so :)) that don't define such environment;
- containers may not give such directories (that's the case for dune's sandboxing).
- being able to generate a proper development environment without internet connection : OCaml is a good (but
underestimated) language for cybersecurity applications and they often need closed dev environments.
Whereas we can keep the current behavior for it's quite standard for many people, I think drom should be able to properly set its environment locally with the following :
- add an option like
--local-configwhich tellsdromto generate a local config dir (in_drom/config?) wheredrom-shareis cloned properly; - add an option like
--nestedtellingdrom newto not look up for existing root (essentially for testing, I don't know if it would be useful elsewhere) - add an option like
--opam-repos <opam-repositories>which adds automatically the given repositories in the created switch (in the same precedence order). This can be done manually afterdromcreated the switch but asdrombehavior is to manage opam for us, I think it makes sense. However, this may conflicts with--switchfor we don't want to pollute another switch definition. This option should work only if the switch is local. - add an option like
--opam-mirror <directory>tellingdromto mirror the opam repositories in given directory (which may be outside the workspace for sharing with other projects) - add a
--self-contained <perimeter>where perimeter would beconfig,opamorall(the default).configwould implies--local-configand preventdromto try looking for updates (thus disabling--share-version).opamwould implies--opam-repos(with non empty list) and--opam-mirrorwith a default directory (like_drom/mirrors?).allwould trigger bothconfigandopam.
The config directory should be stored in drom.toml but other parameters can be stored in drom configuration file.