-
Notifications
You must be signed in to change notification settings - Fork 725
Open
Description
For cabal run, the datadir points to the source tree, so one gets always the latest version of the app's data-files.
The executable produced by cabal build gets a datadir pointing to ~/.cabal/share/... but this may contain outdated versions of the data-files.
It seems like cabal build does not copy the latest versions of the data-files there.
Experiment in the Agda code base:
$ cabal run agda -- --print-agda-data-dir 2>/dev/null
Resolving dependencies...
/Users/abela/agda/src/data
$ l $(cabal run agda -- --print-agda-data-dir 2>/dev/null | tail -1)/emacs-mode/agda2-mode.el
-rw-r--r-- 1 abela staff 84844 Aug 4 11:18 /Users/abela/agda/src/data/emacs-mode/agda2-mode.el
This data-file is up-to-date (naturally, as it is in the source tree).
$ cabal build agda 2>/dev/null
Resolving dependencies...
Up to date
$ $(cabal list-bin agda 2>/dev/null) --print-agda-data-dir
/Users/abela/.cabal/share/aarch64-osx-ghc-9.12.2-ea3d/Agda-2.9.0
$ l $($(cabal list-bin agda 2>/dev/null) --print-agda-data-dir)/emacs-mode/agda2-mode.el
-rw-r--r-- 1 abela staff 84757 Jul 7 19:31 /Users/abela/.cabal/share/aarch64-osx-ghc-9.12.2-ea3d/Agda-2.9.0/emacs-mode/agda2-mode.el
The data-file that the binary gets served is outdated (dated July 7th).
Tried both with cabal 3.16.0.0 and 3.14.2.0.
Update: also tried 3.12.1.0 and 3.10.3.0.
Reactions are currently unavailable