-
Notifications
You must be signed in to change notification settings - Fork 4
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
Stackage-CLI-generated sandboxes use past add-source dependencies #36
Comments
This looks like (surprise) buggy cabal sandbox behavior: it should be able to change the location of add-source directories. As to how it's magically finding the location in a new project: I'm guessing that's the behavior of cabal sandboxes: putting the information in the shared sandbox instead of the local config file, but I'm not certain. |
I haven't looked into making My workflow for cases where I want to use a local or patched dependency for For example, there was a small bug in optparse-simple-0.0.1. (This is a If an add-source dependency is later modified, it is reinstalled
This is the feature that my workflow does not support. If a local Again, we'll see what we can do to make things work for your use case. This -- Dan Burton On Mon, Apr 27, 2015 at 8:48 PM, Michael Snoyman [email protected]
|
Thanks for looking into this! Out of curiosity, is my workflow uncommon? I don't have much to compare it to. I basically have one or more repos (each a standalone haskell library / local cabal package) that other repos depend on, and I almost always work on all of them in parallel. It's thus very convenient to have the main project automatically rebuild the dependency when anything about it changes. It works very well with |
I don't think it's terribly uncommon. I typically don't use sandboxes very much, and definitely not the |
I'm running into an odd behavior that I'd love to understand better. It's currently preventing me from correctly using local dependencies set up through add-source. I create an LTS 2.3 sandbox with stackage-cli:
I double-check that my local dependency isn't in the shared sandbox:
Now, back to my project which expects that dependency in the cabal file (note, I intentionally never ran
add-source
):First of all, huh? How did it find the location of the local dependency? I never ran
add-source
in the project that needed it. Let's double-check the shared sandbox. NOW it has that dependency listed in it:Ok, huh, so it managed to find it somehow, and it created the
add-source-timetstamps
file, except it's actually using the deployment-only version (a separate folder), and not the version that I was hoping it'd use. This leads to the build error.Now let's say I want to try to add the dependency by hand to see if that will somehow override the odd choice:
and now in the shared sandbox:
Ok, the dependency I wanted showed up, but no matter what I do to the file (e.g. change the timestamp, remove the -deploy entry etc) it still keeps installing the
-deploy
. Doesn't matter if I unregister the package withstk sandbox unregister frontrow-entities
and runcabal install
, still keeps using the -deploy version.I have to switch back to using regular local sandboxes in order to have the add-source dependency work as intended for the time being. I can't get it to pick up the right add-source folder that I want it to. Any advice on this? Would love to be able to switch to the stackage sandboxes full-time.
The text was updated successfully, but these errors were encountered: