[Haskell-beginners] Patch source, then pickup compile
James Toll
james at jtoll.com
Sat Sep 20 16:58:05 UTC 2014
On Sep 20, 2014, at 2:43 AM, Vlatko Basic <vlatko.basic at gmail.com> wrote:
> Get (patched) package into a separate dir
> $ cabal sandbox add-source /my/patched/library # Add a new add-source dependency
> $ cabal install --dependencies-only # Install it into the sandbox
> $ cabal build # Build the local package
>
> This way cabal first searches in the add-source dir for any dependency, and builds it from there. You can add several dirs with patched packages
>
> You can/might have to add constraints in local cabal.config file (in sandboxed dir) to force cabal to use the latest version of the package
Thanks to you, Nadir, and Benjamin for the follow-up emails explaining the proper way to handle this. From your emails, it sounds like instead of using a shared sandbox, I should have added the Pandoc source using 'cabal sandbox add-source'. What I’m wondering now is what are the implications of the way I managed to get it to work? And whether I should go back and re-do it the way you’ve described.
I do have one concern though. The part where you mention that if any of the source files are changed, then cabal will rebuild. I don’t want or need that functionality given that this is supposed to be a temporary work around until the fixed version of Pandoc is in Hackage.
> If a file in any add-source dir is changed, cabal will rebuild it automatically
If possible, I might prefer to just delete the pandoc-1.13.1 source subdirectory entirely, as long as it doesn’t mess up the current hakyll installation. Is that possible? If not, in the future, once the version of Pandoc in Hackage has been updated, is it then possible to remove the added source?
Thanks,
James
More information about the Beginners
mailing list