-
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
new-build silent failure on zip-archive-0.3.0.2 #3394
Comments
A few things jump out at me as unique here. First, that there is custom build type with a Setup.lhs rather than Setup.hs. Second, here is the Setup.lhs file itself, on the off chance that the
|
Afaik the missing error output is a known bug (although i cannot find a specific open issue..). The typical workaround is The error in this case looks roughly like:
So for some reason, setup is not built with lhs seems irrelevant. This looks like a new-build bug to me. Still, as a workaround, adding
To |
Smaller repro-case:
with a trivial default |
The silent failure is likely due to the exception handling in build not being complete yet. I've got a patch and tests in the works for that. As for the specific error with missing base, checking before/after 2f97657 sounds sensible. I'm reasonably sure I had examples like this working when I first implemented this bit. Shouldn't be too hard to track down. Can use @hvr's example as an integration test. I've got some new integration tests comming. Using the code directly, not calling out to external cabal prog, so we can check we're getting the right exceptions etc. |
Ok. I've identified the problem. It was indeed introduced in 2f97657. What it changed was that it added a So I've got a fix, but I'll also take the opportunity to add integration tests that cover all four cases of setup in the |
@dcoutts do you mind publishing your fix somewhere, so that early adopters can apply it to their source-trees for testing? :-) |
Commit 2f97657 added default setup dep handling to the existing install command code paths, but unfortunately broke the handling for the new-build code path. It added a call to addDefaultSetupDependencies into the standardInstallPolicy. That interfered with the addDefaultSetupDependencies that ProjectPlanning was already using. So this patch splits a basicInstallPolicy out of standardInstallPolicy, where the basicInstallPolicy is all the old stuff, and the standardInstallPolicy just adds the addDefaultSetupDependencies that the install/fetch/freeze commands need. So then ProjectPlanning uses just the basicInstallPolicy. The 2f97657 commit also added a new and simpler method to determine if a package has had default setup deps added. Previously ProjectPlanning had to use a rather complex method to remember this information. So this patch removes all that and makes use of the new method. To stop this breaking in future the next patch adds integration tests to cover custom setup script handling. This fixed issue haskell#3394.
@hvr PR with tests available :-) |
Note that the lack of error messages still has not been fixed. |
This should fix issue haskell#3394 Previous patches had made the changes to collect the detailed error info all in one place. So this patch is just about deciding what to report and how to report it. Still TODO is mentioning log files, ie when the package build was being logged to a file, we should include a snippet and say where the log file can be found for full details.
So this should be working now, both the original failure and the general lack of error reporting. If not, please re-open or open a new specific ticket. |
Building an executable that depends on zip-archive-0.3.0.2 fails at the configuration step.
It's noteworthy that zip-archive uses a custom Setup.hs. I suspect (although, haven't really tested much) that the Setup.hs is not compatible with the new-build. The bug here (from cabal's perspective) seems to be that it's a silent error.
zip-archive appears to work with the old style build command.
The text was updated successfully, but these errors were encountered: