-
Notifications
You must be signed in to change notification settings - Fork 696
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
cabal configure making dependencies global #2725
Comments
There are many ways to approach this problem:
|
See also #1575, which if fixed would fix this problem. |
Making missing dependencies a non-fatal error as suggested or adopting #1575 would definitely solve the problem for my needs. |
@ezyang Could you share more details regarding the workaround "create a flag which represents whether or not you want the second executable to build and conditialize your executable stanzas likewise. Then when configuring, Cabal will discover the only satisfying assignment is to disable the second executable, and your code will work."? As far as I know one can't conditionally disable a whole target, so some tricks are needed? |
Never mind figured it out. For anyone who's interested - conditionally include the flag |
I am running:
on OSX 10.9.5
with GCH 7.8.3 and the haskell platform 2014.2
I have a very simple .cabal file that builds two executables:
If I comment out the "build-depends" section for the 2nd (agent) target. I am able to build the 1st (myPersonalMain). But if I try to build this as is, I get:
The problem is that 'cabal configure' needs to work and for that, the dependency on the second target (which I don't care about) has to be satisfied. That is a very confusing situation as it seems that the dependencies of the second target are required to build the first. (Ideally, I would like my build to succeed here, as I don't need base<4.7 to build the first target.)
In any case, I have to always have all 'build-depends:' sections satisfy 'cabal configure' to be able to build any single target. That makes a dependency in a tiny unimportant testing package, globally required for me to be able to build any target.
The text was updated successfully, but these errors were encountered: