GillianPlatform / Gillian

The Gillian Platform main repository
https://GillianPlatform.github.io
BSD 3-Clause "New" or "Revised" License
73 stars 11 forks source link

Split the gillian debugger into a separate build target / package #287

Open xldenis opened 4 months ago

xldenis commented 4 months ago

I was wondering if it would be possible to split the gillian debugger into a separate package? As it stands, any downstream package which builds off gillian needs to bring along the debugger including a bunch of dependencies like sqlite3 which cause issues building on some platforms. Or perhaps at least factor things to make sqlite3 an optional dependency.

NatKarmios commented 4 months ago

As it stands, SQLite3 is needed in Gillian core to log traces to a local database, I'm not quite sure how this could be packaged separately from Gillian itself (though I haven't thought much into it yet)

giltho commented 4 months ago

So this is actually doable although not trivial. It is possible o declare optional dependencies in opam using depopts know about esy) and to declare "optional" packages in dune, see the (optional) stanza which will only be built if all the dependencies are installed.

Then you could have some kind of virtual package (I think that's possible) such that there exist two versions of the database logger, in two separate packages: