Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making drom self testable/sufficient #227

Open
Ninjapouet opened this issue Jul 10, 2024 · 0 comments
Open

Making drom self testable/sufficient #227

Ninjapouet opened this issue Jul 10, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Ninjapouet
Copy link

Ninjapouet commented Jul 10, 2024

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-config which tells drom to generate a local config dir (in _drom/config ?) where drom-share is cloned properly;
  • add an option like --nested telling drom new to 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 after drom created the switch but as drom behavior is to manage opam for us, I think it makes sense. However, this may conflicts with --switch for 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> telling drom to 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 be config, opam or all (the default). config would implies --local-config and prevent drom to try looking for updates (thus disabling --share-version). opam would implies --opam-repos (with non empty list) and --opam-mirror with a default directory (like _drom/mirrors ?). all would trigger both config and opam.

The config directory should be stored in drom.toml but other parameters can be stored in drom configuration file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant