uchicago-library / attachment-converter

Attachment Converter: tool for batch converting attachments in an email mailbox
GNU General Public License v2.0
8 stars 3 forks source link

Update Sandboxed Switch Config to work off of `.opam` files #50

Closed bufordrat closed 1 year ago

bufordrat commented 1 year ago

Update Sandboxed Switch Config to work off of .opam files

It has come to our attention that we don't actually need to be using the opam-lock utility for our build config. Whoops! opam-lock, it turns out, does the same thing as a pip freeze: it takes a working opam project and creates an Opam file for it (with the .opam.locked extension) consisting of the original .opam file with every version of every package locked down to its exact current version, plus all transitive dependencies.

That is unnecessary for current purposes. Our dune-project configuration generates .opam files, and we can build sanboxed switches from those directly.

Two Tasks

For this issue, the goal is to:

make deps

Mirroring the design of spinup, the make deps rule will install all dependencies for the project to the current opam switch. This is a useful command to have lying around when you want to do dev work on this project without having to create an entire switch (which means waiting for a fresh OCaml compiler to build).

make sandbox

Also mirroring the design of spinup, the make sandbox rule will create a sandboxed switch in which the DLDC Opam repository is available, and which contains the latest OCaml compiler, plus Prelude, plus all of Attachment Converter's library dependencies from the opam repositories, and nothing else.

bufordrat commented 1 year ago

Whoops, I meant to do the whole PR thing, but I accidentally committed the new Makefile straight to the main branch. Ah, well; it's a small change.

While I'm here, I should mention that I also fixed a typo in make-config.sh. (The last entry was missing an id key.)