Reinstalling the same version of a package with cabal new-install

741 Views Asked by At

I am working on a Haskell package. I have not yet uploaded it to Hackage and the version number is 0.1.0.0. I am using new style Cabal commands.

In order to test the package while I'm working on it (to make the library available to the test project), I run cabal new-install --lib after building the package.

However, I noticed that bug fixes were not having any effect and my test project (which is not itself a Cabal project and consists of a single Haskell file) continues to behave the same way even when I build and install the library.

So, I've tried modifying the cabal new-install --lib command with various combinations of flags like --force, --force-reinstalls and --reinstall. This did not have any effect.

Neither did deleting all generated files in both the library and the test project and re-building the library before recompiling the test project.

One possible solution might be to increase the version number. However, since the package is not released yet, I do not want to start using up version numbers before I upload it to Hackage. Even after I release it, I would like to change the version number only when I actually upload the new version to Hackage, not every time I test out a minor change on my own PC.

The old Cabal commands behave just fine. However, is there any way to get new-install to reinstall the package whenever I fix a bug without changing the version number?

I found a bug report from 2012 that might be relevant but I must admit that I do not understand it very well since I'm completely new to Cabal. https://github.com/haskell/cabal/issues/294

0

There are 0 best solutions below