bug#44743: native-comp: confirm-exit-emacs warns about active processes when compiling

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#44743: native-comp: confirm-exit-emacs warns about active processes when compiling

Stefan Kangas
Severity: minor

Steps to reproduce, on the native-comp branch:

0. rm -rf ~/.emacs.d/eln-cache
1. emacs -Q
2. C-x C-c
3. Press "y" (I am sure I want to quit)

A prompt is now shown with this text:
"Active processes exist; kill them and exit anyway? (y or n) "

The processes are all native-comp processes.

Expected result: No prompt is shown.  The native-comp processes are
recognized and killed automatically.



Reply | Threaded
Open this post in threaded view
|

bug#44743: native-comp: confirm-exit-emacs warns about active processes when compiling

Emacs - Bugs mailing list
Stefan Kangas <[hidden email]> writes:

> Severity: minor
>
> Steps to reproduce, on the native-comp branch:
>
> 0. rm -rf ~/.emacs.d/eln-cache
> 1. emacs -Q
> 2. C-x C-c
> 3. Press "y" (I am sure I want to quit)
>
> A prompt is now shown with this text:
> "Active processes exist; kill them and exit anyway? (y or n) "
>
> The processes are all native-comp processes.
>
> Expected result: No prompt is shown.  The native-comp processes are
> recognized and killed automatically.

Hi Stefan,

I agree this would be nice to have.

I'm a little underwater ATM as I'm trying to progress on other features,
fill free to pick it up if you feel/like.

Thanks

  Andrea



Reply | Threaded
Open this post in threaded view
|

bug#44743: native-comp: confirm-exit-emacs warns about active processes when compiling

Eli Zaretskii
> Cc: [hidden email]
> Date: Fri, 20 Nov 2020 08:35:49 +0000
> From: Andrea Corallo via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[hidden email]>
>
> > 0. rm -rf ~/.emacs.d/eln-cache
> > 1. emacs -Q
> > 2. C-x C-c
> > 3. Press "y" (I am sure I want to quit)
> >
> > A prompt is now shown with this text:
> > "Active processes exist; kill them and exit anyway? (y or n) "
> >
> > The processes are all native-comp processes.
> >
> > Expected result: No prompt is shown.  The native-comp processes are
> > recognized and killed automatically.
>
> Hi Stefan,
>
> I agree this would be nice to have.

FWIW, I think this should be controlled by a user option.  It is not
at all obvious that everyone would like compilation processes to be
killed automatically, people might want to wait for them to complete.



Reply | Threaded
Open this post in threaded view
|

bug#44743: native-comp: confirm-exit-emacs warns about active processes when compiling

Stefan Kangas
Eli Zaretskii <[hidden email]> writes:

>> > Expected result: No prompt is shown.  The native-comp processes are
>> > recognized and killed automatically.
>>
>> I agree this would be nice to have.
>
> FWIW, I think this should be controlled by a user option.  It is not
> at all obvious that everyone would like compilation processes to be
> killed automatically, people might want to wait for them to complete.

Compiling in the background should in my opinion work as transparently
as possible.  The fact that we cache compilation results should be
considered an implementation detail.  We don't need to shape our
outwardly behavior by such implementation details.

We could of course support what you suggest.  I'm not against it as an
option.  But I don't think it is very important, and it would take some
time and effort to implement and maintain.  I'm not sure that effort is
well-spent at this point, and would rather leave it for the future.

IOW, I think we should work on reasonable defaults first, and only add
options in later once we are sure that we really need them.



Reply | Threaded
Open this post in threaded view
|

bug#44743: native-comp: confirm-exit-emacs warns about active processes when compiling

Eli Zaretskii
> From: Stefan Kangas <[hidden email]>
> Date: Sat, 21 Nov 2020 11:22:58 -0800
> Cc: [hidden email]
>
> > FWIW, I think this should be controlled by a user option.  It is not
> > at all obvious that everyone would like compilation processes to be
> > killed automatically, people might want to wait for them to complete.
>
> Compiling in the background should in my opinion work as transparently
> as possible.  The fact that we cache compilation results should be
> considered an implementation detail.  We don't need to shape our
> outwardly behavior by such implementation details.

I understand your opinion, but I don't think that's the only opinion
that could exist.  Caching the compiled modules can hardly be regarded
as an implementation detail when compilation takes a tangible amount
of time -- which is why we cache the results in the first place.  IOW,
if compilation is interrupted, Emacs will try to compile it again the
next time, and the code will run slower than expected.  So if this is
an implementation detail, it will be acutely obvious to users, and
they may wish to wait a bit with exiting Emacs to let the compilation
run to the end.  It is not unlike the case where you sent an email
message and want to exit Emacs before the message transmission has
ended.  Users will appreciate a degree of control in these cases.

> We could of course support what you suggest.  I'm not against it as an
> option.  But I don't think it is very important, and it would take some
> time and effort to implement and maintain.  I'm not sure that effort is
> well-spent at this point, and would rather leave it for the future.

I think interrupting compilation also comes with maintenance
head-aches, such as the temporary files left behind, incomplete .eln
files we'd need to clean up, etc.

> IOW, I think we should work on reasonable defaults first, and only add
> options in later once we are sure that we really need them.

I think the argument is about what is "reasonable" here, all the rest
is agreed upon.



Reply | Threaded
Open this post in threaded view
|

bug#44743: native-comp: confirm-exit-emacs warns about active processes when compiling

Emacs - Bugs mailing list
Eli Zaretskii <[hidden email]> writes:

>> From: Stefan Kangas <[hidden email]>
>> Date: Sat, 21 Nov 2020 11:22:58 -0800
>> Cc: [hidden email]
>>
>> > FWIW, I think this should be controlled by a user option.  It is not
>> > at all obvious that everyone would like compilation processes to be
>> > killed automatically, people might want to wait for them to complete.
>>
>> Compiling in the background should in my opinion work as transparently
>> as possible.  The fact that we cache compilation results should be
>> considered an implementation detail.  We don't need to shape our
>> outwardly behavior by such implementation details.
>
> I understand your opinion, but I don't think that's the only opinion
> that could exist.  Caching the compiled modules can hardly be regarded
> as an implementation detail when compilation takes a tangible amount
> of time -- which is why we cache the results in the first place.  IOW,
> if compilation is interrupted, Emacs will try to compile it again the
> next time, and the code will run slower than expected.  So if this is
> an implementation detail, it will be acutely obvious to users, and
> they may wish to wait a bit with exiting Emacs to let the compilation
> run to the end.  It is not unlike the case where you sent an email
> message and want to exit Emacs before the message transmission has
> ended.  Users will appreciate a degree of control in these cases.
>
>> We could of course support what you suggest.  I'm not against it as an
>> option.  But I don't think it is very important, and it would take some
>> time and effort to implement and maintain.  I'm not sure that effort is
>> well-spent at this point, and would rather leave it for the future.
>
> I think interrupting compilation also comes with maintenance
> head-aches, such as the temporary files left behind, incomplete .eln
> files we'd need to clean up, etc.
>
>> IOW, I think we should work on reasonable defaults first, and only add
>> options in later once we are sure that we really need them.
>
> I think the argument is about what is "reasonable" here, all the rest
> is agreed upon.

I also think this option should be controlled by a customize.

I can picture most "power users" legitimately willing to be informed of
these processes being killed if present at exit.  OTOH I guess the
majority of non "power users" would like just to close Emacs
transparently.

Because of this my idea I think I'm for the transparent behavior as
default.

  Andrea



Reply | Threaded
Open this post in threaded view
|

bug#44743: native-comp: confirm-exit-emacs warns about active processes when compiling

Lars Ingebrigtsen
In reply to this post by Eli Zaretskii
Eli Zaretskii <[hidden email]> writes:

> FWIW, I think this should be controlled by a user option.  It is not
> at all obvious that everyone would like compilation processes to be
> killed automatically, people might want to wait for them to complete.

Since this is something that Emacs does automatically, in the
background, I don't think a user option sounds like something somebody
would want to tweak.  If somebody has a use case for that, it can be
added later.

--
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



Reply | Threaded
Open this post in threaded view
|

bug#44743: native-comp: confirm-exit-emacs warns about active processes when compiling

Stefan Kangas
Eli Zaretskii <[hidden email]> writes:

>> From: Lars Ingebrigtsen <[hidden email]>
>> Cc: Andrea Corallo <[hidden email]>,  [hidden email],  [hidden email]
>> Date: Tue, 24 Nov 2020 08:52:18 +0100
>>
>> Eli Zaretskii <[hidden email]> writes:
>>
>> > FWIW, I think this should be controlled by a user option.  It is not
>> > at all obvious that everyone would like compilation processes to be
>> > killed automatically, people might want to wait for them to complete.
>>
>> Since this is something that Emacs does automatically, in the
>> background, I don't think a user option sounds like something somebody
>> would want to tweak.
>
> IMO, we should offer an option precisely _because_ this is in
> background, thus the user could be unaware of the compilation being
> run.  Since compilation takes non-negligible time, I envision users
> who'd like to wait for a few moments if that gave them faster Lisp
> next time.
>
> This is not unlike background subprocesses about which we do ask on
> exit.

IIUC, it's different from other background processes.  The compilation
will resume automatically the next time that file is loaded in
subsequent invocations of Emacs.



Reply | Threaded
Open this post in threaded view
|

bug#44743: native-comp: confirm-exit-emacs warns about active processes when compiling

Emacs - Bugs mailing list
Stefan Kangas <[hidden email]> writes:

> Eli Zaretskii <[hidden email]> writes:
>
>>> From: Lars Ingebrigtsen <[hidden email]>
>>> Cc: Andrea Corallo <[hidden email]>,  [hidden email],  [hidden email]
>>> Date: Tue, 24 Nov 2020 08:52:18 +0100
>>>
>>> Eli Zaretskii <[hidden email]> writes:
>>>
>>> > FWIW, I think this should be controlled by a user option.  It is not
>>> > at all obvious that everyone would like compilation processes to be
>>> > killed automatically, people might want to wait for them to complete.
>>>
>>> Since this is something that Emacs does automatically, in the
>>> background, I don't think a user option sounds like something somebody
>>> would want to tweak.
>>
>> IMO, we should offer an option precisely _because_ this is in
>> background, thus the user could be unaware of the compilation being
>> run.  Since compilation takes non-negligible time, I envision users
>> who'd like to wait for a few moments if that gave them faster Lisp
>> next time.
>>
>> This is not unlike background subprocesses about which we do ask on
>> exit.
>
> IIUC, it's different from other background processes.  The compilation
> will resume automatically the next time that file is loaded in
> subsequent invocations of Emacs.

Yes but you will loose the machine time invested into the compilation
that was aborted :) I guess 99% of people wouldn't care about it but
OTOH what's the downside of leaving a customize to control it?

  Andrea



Reply | Threaded
Open this post in threaded view
|

bug#44743: native-comp: confirm-exit-emacs warns about active processes when compiling

Eli Zaretskii
In reply to this post by Stefan Kangas
> From: Stefan Kangas <[hidden email]>
> Date: Tue, 24 Nov 2020 08:08:15 -0800
> Cc: [hidden email], [hidden email]
>
> The compilation will resume automatically the next time that file is
> loaded in subsequent invocations of Emacs.

Resume, and take how much time?  Not every user out there has a
16-core i9 at his/her disposal.