The fastest, friendliest, and most delightful way to get started with OCaml, ReasonML, and Melange, geared towards JavaScript and TypeScript developers
118
stars
20
forks
source link
[ocaml-install]: Create `Add_dependency` "Process" module in `dune.ml` #69
In order to install a new dependency we need to be able to append the depends stanza in our users dune-project file. We will need to create a new module called Add_dependency to the src/core/dune.ml module under the nested Dune_project module.
I'm not sure the best way to parse/update the file, so I'm open to really any implementation at the moment. You might find some useful code in the dune repo itself for how they parse dune/sexp files.
The exec function should accept an input something like { file_path: string; dependency: Dependency.t } where file_path is the path to thedune-project file.
Parent: #61
In order to install a new dependency we need to be able to append the
depends
stanza in our usersdune-project
file. We will need to create a new module calledAdd_dependency
to thesrc/core/dune.ml
module under the nestedDune_project
module.I'm not sure the best way to parse/update the file, so I'm open to really any implementation at the moment. You might find some useful code in the
dune
repo itself for how they parse dune/sexp files.The
exec
function should accept an input something like{ file_path: string; dependency: Dependency.t }
wherefile_path
is the path to thedune-project
file.