-
Notifications
You must be signed in to change notification settings - Fork 698
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: Outputs to console after "exiting"? #3407
Comments
/cc @ezyang |
Addendum: I think this is also causing some weird issues when using @ndmitchell's excellent |
/cc @dcoutts |
A small reproducible test case would be nice. |
I've seen this error. It's reasonably easy to reproduce by hand by C^C'ing the process, then you see some extra output. The usual cause for a problem like this is that the C^C is being delivered to the wrong process, and the process which printing output never receives the signal. |
Hm. I'm definitely not ^C the process. I'm just letting it run normally and error out. I'll see if I can get a reproducer with public code. |
I'm just saying that it's a similar effect: something is causing the "main" process to exit (but the reporting subprocess is still running.) |
Ah, OK, sorry misunderstood :). |
If you run |
OK, good information. It actually happens regardless of whether I'm using |
Reproducer: https://github.com/BardurArantsson/cqrs/tree/tmp-reproducer Clone and run cabal new-build cqrs-core cqrs-testkit cqrs-memory cqrs-postgresql cqrs-example |
I should add: The problem doesn't happen all the time. It seems to be timing-dependent, which perhaps isn't that surprising. Just adding/moving incorrect code in some |
I suspect this is all to do with exception handling in the execution of the plan, when using multiple processes. The exception handling is a big TODO (which I'm currently working on) so we can see if that fixes it and if not investigate further. In the absence of ctl-c then we should expect the main process to exit last, having waited for all the other processes it started. |
Not sure why this got closed automatically, it needs testing. |
Looks like GitHub can't distinguish "might fix" from "fix". |
@BardurArantsson Thanks for supplying the test case with the repo and the git id. Unfortunately I cannot reproduce the original behaviour, using that repo and build of cabal. So I also cannot check if it is now fixed, but I suspect it may be, since we now handle failure to build a package properly. (Rather than just propagating the exception and terminating leaving other child processes running, but we continue with the build, waiting for things to finish etc and return info on all the successes/failures). So since you can reproduce it, could I ask you to try the latest cabal from the master branch (at or after ff6e495) and see if it's fixed? That'd be much appreciated. |
Haven't tried more than a couple of builds, but seemed to work OK for those. So let's call it "probably fixed" and we can re-open if necessary :). |
Thanks! |
There seems to be something weird going on wrt. terminal output. (I must admit I'm not sure whether it's just me or it's an actual problem with cabal-install new-build.)
Here's a little example. When I run
cabal-new blah1 blah2
on one of my projects, I get this output:Notice the
[MY_NORMAL_PROMPT]
bit? It seems that the prompt somehow gets intermingled with Cabal's output.(In some cases I even get two prompts, though I haven't been able to reproduce it reliably.)
Is there some forking happening in Cabal which could explain this?
EDIT: Should add this is as of cabal
030259c71a8c182c169e18bb7c67467a3d292f00
The text was updated successfully, but these errors were encountered: