Skip to content

"cabal sandbox add-source" only effective after "cabal install" was invoked #1443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hvr opened this issue Aug 27, 2013 · 3 comments
Closed
Assignees

Comments

@hvr
Copy link
Member

hvr commented Aug 27, 2013

The following sequence doesn't work as expected (with 323460e)

git clone https://github.com/jgm/pandoc
git clone https://github.com/jgm/pandoc-types

cd pandoc/
cabal sandbox init
cabal sandbox add-source ../pandoc-types

cabal install --only-dep # fails because pandoc-types-1.12 is not found
cabal info pandoc-types-1.12 # fails as well
# `cabal sandbox list-sources`  would indeed list "pandoc-types"

The following ordering of commands works however:

git clone https://github.com/jgm/pandoc
git clone https://github.com/jgm/pandoc-types

cd pandoc/
cabal sandbox init
cabal install --only-dep # fails as expected, as pandoc-types-1.12 is not released yet
cabal sandbox add-source ../pandoc-types
cabal install --only-dep # now, pandoc-types-1.12 is found
@ghost ghost assigned 23Skidoo Aug 27, 2013
@23Skidoo
Copy link
Member

Yes, looks like a bug. Will try to reproduce.

@23Skidoo
Copy link
Member

OK, managed to reproduce. Definitely a bug.

@23Skidoo
Copy link
Member

I think I know what this is. In 272a5c2 I replaced two calls to getModificationTime with a call to a library function. Unfortunately, this also replaced a (>=) comparison with (>).

23Skidoo added a commit that referenced this issue Jul 25, 2014
It looks like #1443 was actually fixed by the change from getModificationTime to
getModTime (which has higher resolution). The change to '>=' was not needed
because the code uses 'when', not 'unless'.

Thanks to Nikita Karetnikov for the heads-up.
nkaretnikov pushed a commit to nkaretnikov/cabal that referenced this issue Mar 10, 2015
It looks like haskell#1443 was actually fixed by the change from getModificationTime to
getModTime (which has higher resolution). The change to '>=' was not needed
because the code uses 'when', not 'unless'.

Thanks to Nikita Karetnikov for the heads-up.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants