-
Notifications
You must be signed in to change notification settings - Fork 724
Description
This is intended to be a discussion thread. I think the whole concept of data-files needs a rethink. v2 commands highlight the issue, since data-files get installed into a store, and we would like the store to be wipeable but data-files sort of vitiate against that. However, even in v1, data-files just go to "some" system location disconnected from the executable, and certainly make redistribution of executables more difficult.
Here is a strawman proposal -- datafiles no longer just get installed into a location with a paths module pointing to it. Instead, they get embedded into a module directly, and to use them, the app necessarily calls a function to either access them directly, or to unpack them into a temp-location so that both the executable and other programs can access them...
(Let's ignore migration issues for now -- if the proposal finds a nice reception, those can be sorted out).
I know that this is semi-externally-possible with e.g. the file-embed package. However, building this uniformly into cabal has a number of advantages, not least that it bypasses the need for TH, etc. and that the embedded files can still be tracked directly in the cabal file. Further, it at least allows the possibility of designing some sort of backward-compat api and gradual migration.
Thoughts?