cabal-dev icon indicating copy to clipboard operation
cabal-dev copied to clipboard

Print warning when source for add-source has changed

Open davetapley opened this issue 12 years ago • 1 comments

I don't know if you feel this is technically easy, or worth implementing, but I thought I'd make you aware of a misunderstanding I encountered; I posted a question regarding it (and answered it myself) on stackoverflow: Using the --reinstall flag with cabal-dev

davetapley avatar Sep 19 '11 22:09 davetapley

I posted a response on SO: http://stackoverflow.com/questions/7451296/using-the-reinstall-flag-with-cabal-dev/7478072#7478072

re: the feature request --

I think that would be a good feature, but I'm a bit intimidated by the number of questions that arise; eg:

  • Do we track the source tree, or the sdist that was created during add-source?
    • if the sdist, what happens when a the dist dir is removed during a clean?
    • if the source, do we keep md5sums or timestamps of every file?
  • what if the source location disappears?
    • ...and then what if it comes back?
  • some new non-source file is changed in the directory tree (eg: someone touched a README)
  • Source changes, but the cabal file does not
  • ...etc.

My gut reaction is that it would be easier to address the concern at a higher level, possibly by having a 'meta-project' description somewhere (which is what a lot of cabal-dev users have adopted, although I don't believe there is a standard practice for this yet. I've heard of many shell scripts that have been created to establish sandboxes.)

creswick avatar Sep 19 '11 22:09 creswick