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
line buffering in sage-logger causes "hang" due to invisible prompt when installing experimental packages #20884
Comments
comment:1
IMHO we just shouldn't ask questions here, a (potentially) parallel make session is just not an interactive process. Either do it or bail out and require a command line switch |
comment:2
I think so too. |
comment:3
+1, just keep the message. |
comment:4
I also think it's fine for experimental packages to just run and fail. As long as there isn't any potential to mess up the rest of Sage (like with messed up runs of |
Author: Erik Bray |
Branch: u/embray/disable-exp-pkg-prompt |
comment:5
Here's a patch to remove the prompt entirely. Might be good to find a fix to the underlying problem, since in principle there could be some other prompt somewhere that would be hidden in the same way. I'm not sure how best to fix this though--would have to disable line-buffering on such prompts somehow. New commits:
|
Commit: |
comment:6
This would be fine with me. But it could be argued that this warning is too easy to overlook (and comes too late) and so the point of distinguishing between optional and experimental packages is lost. |
comment:10
I don't think simply removing this dialog is the right thing to do. |
comment:12
I'm not sure what you suggest differently, other than moving the warning a little earlier? But if someone doesn't read their build output it will be lost on them anyways. That's okay, because it's "merely" a warning. |
comment:13
Dima has a point that removing the prompt outright is potentially disruptive. What if we moved the warning so that there's no prompt if running |
comment:14
Replying to @embray:
I think As per Volker's initial suggestion, a command-line switch |
comment:15
It appears the warning/prompt comes from the I tried reworking this yesterday in a way that didn't change In other words it's not exactly clear where the best place would be for it. Jeroen might have some ideas but he's on holiday right now so we won't bug him about it. |
comment:17
Welp, this is definitely more complicated than it was before, but I think it's pretty good. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:20
looks good to me |
Reviewer: Dima Pasechnik, Matthias Koeppe |
comment:90
I just tried
|
comment:92
You can avoid POSTPROCESS="| $SED 's/^/$prefix/'"
...
( trap '' SIGINT; eval tee -a "$logfile" $POSTPROCESS )
... (I think.) |
comment:93
You don't have to install packages in a loop; you can download them one-by-one, and afterwards run In any case, the following is wrong: sage-logger "sage-spkg $INSTALL_OPTIONS -d '$PKG'" logs/install.log
# Then make / install the package with no prompts
$MAKE SAGE_SPKG="sage-spkg $INSTALL_OPTIONS -y" "$OPT" ( Unrelated to this ticket: # First of all, make sure that the toolchain is up-to-date
# (which is a dependency of every package)
./sage --location
$MAKE all-toolchain is pretty stupid before we know the package(s) at all exist(s), can be downloaded if needed, whatever. (And IIRC one gets |
comment:94
Replying to @nexttime:
+1 |
Changed branch from u/embray/ticket-20884-squashed to u/mkoeppe/ticket-20884-squashed |
Changed reviewer from Dima Pasechnik, Matthias Koeppe to none |
comment:96
I've implemented a "good enough for next release" solution. New commits:
|
Changed author from Erik Bray to Matthias Koeppe |
comment:98
(At least in theory, we'd have to make sure the prompting message doesn't vanish due to other output when building in parallel though. But I think in practice this is very unlikely.) |
comment:99
Replying to @nexttime:
Yes, I hope that a follow-up ticket will do a proper solution, which prompts early (or just bails out and requires an extra flag), rather than prompting in the middle of a parallel build. My simple solution just restores (except for cosmetics) the status quo before #20640, #20708 broke the prompting. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Reviewer: Leif Leonhardy, Volker Braun |
Changed branch from u/mkoeppe/ticket-20884-squashed to |
Changed commit from |
comment:103
Follow-up ticket - #21082. This is where work on the patch by Erik Bray can continue. |
(Observed on Mac OS X.)
As I reported in #20708 comment:8:
When installing an "experimental" package, Sage warns a lot and then prompts the user.
Because of line buffering, one does not see the prompt, but Sage just waits indefinitely.
<--- This is where it asks "[latte_int-1.7.3] Are you sure you want to continue [Y/n]?" but this is line-buffered and not visible to the user.
CC: @jdemeyer @embray @vbraun @kcrisman @dimpase @videlec @novoselt
Component: build
Author: Matthias Koeppe
Branch:
6888a67
Reviewer: Leif Leonhardy, Volker Braun
Issue created by migration from https://trac.sagemath.org/ticket/20884
The text was updated successfully, but these errors were encountered: