You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Somewhere in the logs it says targets: html-hunter, hunt-client, hunt-crawler, hunt-searchengine, hunt-server, hunt-server-cli. But I only requested to build hunt-searchengine which does not depend on any of the other targets. Is this something weird or is it just listing all available targets?
OK, so here's the problem: when the library of a pckage is marked as non-buildable, new-build does NOT eagerly fail. In 1.24, the error would only happen if you tried to build it, or anything that depended on it:
cabal: Unknown build target 'lib:p'.
There is no library component 'p' or component 'lib'.
or
cabal: No executables, libraries, tests, or benchmarks found. Nothing to do.
I suppose that's reasonable behavior; it lets you build some part of your project even when other parts are non-buildable.
But when I refactored this code for Backpack, I assumed that I would only ever get plans with packages that depended upon buildable things. Thus the assert failure! The library doesn't exist and never was configured.
I guess one way we could fix this is to have the solver reject a package if the library is marked as non-buildable (as opposed to executables/tests/etc. May god have mercy on your soul if you have a non-buildable library with a buildable executable.) But maybe this is not so good for you because it means that you can't develop a project if any of the local deps transitively depends on a non-buildable thing. But maybe you didn't care so much about this case?
By the way, unix also has build-depends: buildable < 0, so you might wonder why the solver didn't fail? Well, that's because when buildable: False we ignore the build-depends. This is desirable for executables but not for libraries.
@ezyang fyi, I've seen the same error toConfiguredComponent: blah, but I don't think it was the same problem as unix here. Can we add any more detail to this internal error so we can get better info if we hit it again in future.
% cabal new-build -w ghc-7.8.4 --enable-tests all
Resolving dependencies...
Error:
Dependency on unbuildable library from http-client
In the stanza 'library'
In the package 'http-client-tls-0.3.5.3'
with servant 0c66b9c0559721ea682cd0d1fa35f403ec075cda
+ -- See build failure at https://travis-ci.org/snoyberg/http-client/jobs/359573631
+ if impl(ghc < 7.10)
+ buildable: False
Activity
[-]toConfiguredComponent: unix[/-][+]toConfiguredComponent: unix (Windows)[/+]23Skidoo commentedon Oct 13, 2016
@ezyang, can you please look into this?
ezyang commentedon Oct 13, 2016
@alexbiehl Any chance I can get some -v logs? (Or better yet, -v3)
alexbiehl commentedon Oct 13, 2016
Yes of course, I will hand them in tomorrow.
Edward Z. Yang [email protected] schrieb am Do., 13. Okt. 2016,
19:50:
alexbiehl commentedon Oct 14, 2016
cabal new-build hunt-searchengine -v3withdist-newstyledeleted first:https://gist.github.com/alexbiehl/b303b584dcf636b54d2b84392088c20d
And here the same command as a subsequent run (with a
dist-newstylepresent). Not sure if needed though.https://gist.github.com/alexbiehl/47c2b561de69cf4b0085eb55cbfdc4ba
I have one question to add:
Somewhere in the logs it says
targets: html-hunter, hunt-client, hunt-crawler, hunt-searchengine, hunt-server, hunt-server-cli. But I only requested to buildhunt-searchenginewhich does not depend on any of the other targets. Is this something weird or is it just listing all available targets?ezyang commentedon Oct 14, 2016
new-build will solve for ALL local packages in your project, so that when you decide to build some of the other ones, it doesn't have to resolve.
ezyang commentedon Oct 14, 2016
If you can, apply this patch and then give me the non-verbose log?
alexbiehl commentedon Oct 14, 2016
ezyang commentedon Oct 14, 2016
So, I guess this is not a direct dependency of hunt-searchengine, but one of the other packages that are local?
alexbiehl commentedon Oct 14, 2016
Yes, right.
hxt-cacheis the offender here.2 remaining items
ezyang commentedon Oct 16, 2016
OK, the bug seems to be somehow related to
buildable. Min repro:Stick this in a package with a building package (say
q), and then runcabal new-build q.ezyang commentedon Oct 16, 2016
OK, so here's the problem: when the library of a pckage is marked as non-buildable, new-build does NOT eagerly fail. In 1.24, the error would only happen if you tried to build it, or anything that depended on it:
or
I suppose that's reasonable behavior; it lets you build some part of your project even when other parts are non-buildable.
But when I refactored this code for Backpack, I assumed that I would only ever get plans with packages that depended upon buildable things. Thus the assert failure! The library doesn't exist and never was configured.
I guess one way we could fix this is to have the solver reject a package if the library is marked as non-buildable (as opposed to executables/tests/etc. May god have mercy on your soul if you have a non-buildable library with a buildable executable.) But maybe this is not so good for you because it means that you can't develop a project if any of the local deps transitively depends on a non-buildable thing. But maybe you didn't care so much about this case?
By the way,
unixalso hasbuild-depends: buildable < 0, so you might wonder why the solver didn't fail? Well, that's because whenbuildable: Falsewe ignore thebuild-depends. This is desirable for executables but not for libraries.Reject solver solutions involving un-buildable libraries.
dcoutts commentedon Oct 18, 2016
@ezyang fyi, I've seen the same error
toConfiguredComponent: blah, but I don't think it was the same problem as unix here. Can we add any more detail to this internal error so we can get better info if we hit it again in future.ezyang commentedon Oct 21, 2016
@dcoutts Do you have a repro?
Do an early check for unbuildable deps, and give good error.
Do an early check for unbuildable deps, and give good error.
Do an early check for unbuildable deps, and give good error.
Do an early check for unbuildable deps, and give good error.
phadej commentedon May 11, 2018
I get this error when
with
servant0c66b9c0559721ea682cd0d1fa35f403ec075cdaphadej commentedon May 11, 2018
Now I see the problem: http://hdiff.luite.com/cgit/http-client/diff?id=0.5.12.1&id2=0.5.12
clicksaver
sebright commentedon May 15, 2018
I opened an issue for the new type of failure: #5325
Reject solver solutions involving un-buildable libraries.