-
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
Sandbox: "Cannot select only the dependencies" with --disable-tests #1500
Comments
Does |
Step 2 is deliberately a repeat of step 1. What I'm trying to achieve is a reproducible and idempotent Jenkins build recipe, so it should work regardless of whether the workspace is empty, there are no new changes, or there are new changes (but preferably without rebuilding the entire sandbox every time). |
Interesting bug. This happens because @tibbe |
I kind of suspected that was what was going on, but the lack of info in the error message made it impossible to tell. Thing is, I'm not sure what a good workaround is for now. Maybe I should try this?
|
Okay, my hacky workaround "works", so I'm unblocked for now. |
Yes, the error message could definitely be improved. Since the error is caused by |
What's the right thing for the dependency solver to do here @kosmikus ? |
@tibbe |
@tibbe |
I guess you mean that one of the dependencies depend on the main package itself. Doesn't that mean that we have a cycle? How can we build that in the first place (without building two different copies of the main package, which I don't think works without Nix-style packages). This all is a bit annoying. Right now we ask people to: On first repo checkout and every time dependencies change:
When the package itself needs to be built:
In fact I want the latter to imply the former so My feeling is that if
to also just build the main package. We're not installing anything; installing the main package in the sandbox doesn't make sense; we're just trying to build. |
Yes, you're right. Only the main package is a special case and needs to be pruned from the install plan in the end (see
Should it install a released version from Hackage or the current working copy? |
My gut feeling is that we need to use the current working copy, but I still don't understand how this works at all given the cycle that the test suite creates (as we don't consider it a separate component when we create the install plan). |
That seems to work, too. Interesting! |
I think it's because |
I've come across something that might be related. Could this be something to do with not passing cmd line args correctly:
I'm trying to upgrade the version of pipes-concurrency in my sandbox as it's just had a bug fixed that I want to pull in. Is this even the right way to do this? Additionally:
The argument doesn't seem to be being passed correctly to ghc-pkg (I had to give the Hope this helps - let me know it you'd prefer this as a separate bug? |
I believe you need to separate flags to pass to the hc-pkg command with |
#1575 covers the issue with cycles between packages and their test dependencies. I think that the only other issue here is that the error message is less clear when the build is done with |
sandbox functionality is removed. |
I'm trying to use cabal 1.18 in a sandbox to build the mwc-random package. The first build succeeds, but the second one fails as follows:
The problem with this error message is that it tells me that something is wrong, but it gives me no clue what is wrong, so I don't have the faintest idea what to do or where to look.
Reproduction
This takes a few minutes.
Step 1
This build should succeed without a problem.
Step 2
Now I want to do a rebuild in the same sandbox, by following the same recipe. It fails at the very first real step.
This is the point at which the sandbox gets stuck. I don't know what's wrong, or how to fix it.
The text was updated successfully, but these errors were encountered: