unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#41329: [feature/native-comp] The Makefile only checks for .elc files.
@ 2020-05-16 16:15 Nicolas Bértolo
  2020-05-16 16:55 ` Andrea Corallo
  2020-08-31 20:54 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Bértolo @ 2020-05-16 16:15 UTC (permalink / raw)
  To: 41329

[-- Attachment #1: Type: text/plain, Size: 477 bytes --]

There is a problem with the build system for .eln files. The Makefile only
has a
target creating *.elc files. This means that if you use Emacs to change an
.el
file and you set it up to byte-compile .el files on save you will never
recompile the .eln files.

This can also be reproduced if you press C-c on a terminal that is
native-compiling. The .eln file will not be produced, but the .elc will be
in
the filesystem and `make` will not try to native-compile the file again.

[-- Attachment #2: Type: text/html, Size: 525 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#41329: [feature/native-comp] The Makefile only checks for .elc files.
  2020-05-16 16:15 bug#41329: [feature/native-comp] The Makefile only checks for .elc files Nicolas Bértolo
@ 2020-05-16 16:55 ` Andrea Corallo
  2020-05-16 17:45   ` Nicolas Bértolo
  2020-08-31 20:54 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 1 reply; 5+ messages in thread
From: Andrea Corallo @ 2020-05-16 16:55 UTC (permalink / raw)
  To: Nicolas Bértolo; +Cc: 41329

Nicolas Bértolo <nicolasbertolo@gmail.com> writes:

> There is a problem with the build system for .eln files. The Makefile
> only has a
> target creating *.elc files.

Yes the main reason for that is that the Makefile is not aware of which
files are lexical and can be compiled and which are dynamic and can't.

> This means that if you use Emacs to
> change an .el
> file and you set it up to byte-compile .el files on save you will
> never
> recompile the .eln files.

I'm not sure I understand.  I you mean that manually byte-compiling a
file prevents the .eln compilation to happen if make is invoked
afterwards then yes.  But make should be used.

> This can also be reproduced if you press C-c on a terminal that is
> native-compiling. The .eln file will not be produced, but the .elc
> will be in
> the filesystem and `make` will not try to native-compile the file
> again.

I don't think so, the .elc is renamed with their final filename after
the .eln has been produced to prevent exactly that.

This build system arrangement is till we have dynamic scope compilation
and we can clean it up.

  Andrea

-- 
akrl@sdf.org





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#41329: [feature/native-comp] The Makefile only checks for .elc files.
  2020-05-16 16:55 ` Andrea Corallo
@ 2020-05-16 17:45   ` Nicolas Bértolo
  2020-05-16 18:19     ` Andrea Corallo
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Bértolo @ 2020-05-16 17:45 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: 41329

[-- Attachment #1: Type: text/plain, Size: 2043 bytes --]

 > I'm not sure I understand.  I you mean that manually byte-compiling a
> file prevents the .eln compilation to happen if make is invoked
> afterwards then yes.  But make should be used.

I use `auto-compile-mode` so that is why I was hitting this problem.

> I don't think so, the .elc is renamed with their final filename after
> the .eln has been produced to prevent exactly that.

Mmm, it has happened in my system. I wonder why. Will post an update
if I manage to reproduce it reliably.

> Yes the main reason for that is that the Makefile is not aware of which
> files are lexical and can be compiled and which are dynamic and can't.

Can't it grep for "lexical-binding: t" in the first line?

Nicolas.


El sáb., 16 may. 2020 a las 13:55, Andrea Corallo (<akrl@sdf.org>) escribió:

> Nicolas Bértolo <nicolasbertolo@gmail.com> writes:
>
> > There is a problem with the build system for .eln files. The Makefile
> > only has a
> > target creating *.elc files.
>
> Yes the main reason for that is that the Makefile is not aware of which
> files are lexical and can be compiled and which are dynamic and can't.
>
> > This means that if you use Emacs to
> > change an .el
> > file and you set it up to byte-compile .el files on save you will
> > never
> > recompile the .eln files.
>
> I'm not sure I understand.  I you mean that manually byte-compiling a
> file prevents the .eln compilation to happen if make is invoked
> afterwards then yes.  But make should be used.
>
> > This can also be reproduced if you press C-c on a terminal that is
> > native-compiling. The .eln file will not be produced, but the .elc
> > will be in
> > the filesystem and `make` will not try to native-compile the file
> > again.
>
> I don't think so, the .elc is renamed with their final filename after
> the .eln has been produced to prevent exactly that.
>
> This build system arrangement is till we have dynamic scope compilation
> and we can clean it up.
>
>   Andrea
>
> --
> akrl@sdf.org
>

[-- Attachment #2: Type: text/html, Size: 2828 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#41329: [feature/native-comp] The Makefile only checks for .elc files.
  2020-05-16 17:45   ` Nicolas Bértolo
@ 2020-05-16 18:19     ` Andrea Corallo
  0 siblings, 0 replies; 5+ messages in thread
From: Andrea Corallo @ 2020-05-16 18:19 UTC (permalink / raw)
  To: Nicolas Bértolo; +Cc: 41329

Nicolas Bértolo <nicolasbertolo@gmail.com> writes:

>> I'm not sure I understand.  I you mean that manually byte-compiling
> a
>> file prevents the .eln compilation to happen if make is invoked
>> afterwards then yes.  But make should be used.
>
> I use `auto-compile-mode` so that is why I was hitting this problem.

I see, I rarely messed up externally the repo and always used make to
build.

>> I don't think so, the .elc is renamed with their final filename
> after
>> the .eln has been produced to prevent exactly that.
>
> Mmm, it has happened in my system. I wonder why. Will post an update
> if I manage to reproduce it reliably.

I suspect this is due to some confusion or a different issue to the
discussed one.

AFAIU if a file is compiled by `batch-byte-native-compile-for-bootstrap'
the elc can be produced only after the eln.

>> Yes the main reason for that is that the Makefile is not aware of
> which
>> files are lexical and can be compiled and which are dynamic and
> can't.
>
> Can't it grep for "lexical-binding: t" in the first line?

I think so, but playing with the build system can be time consuming,
especially to obtain a portable solutions.  Given that when we'll have
dynamic scope compilation will be sufficient just not to produce the
.elc I decided not to invest more time on this.

If you want to suggest a patch to have the eln files as target this is
very welcome.  Consider that the other complication is the eln folder
with the hash that should be know to the build system, so probably a two
step solution is required.

Thanks

  Andrea

--
akrl@sdf.org





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#41329: [feature/native-comp] The Makefile only checks for .elc files.
  2020-05-16 16:15 bug#41329: [feature/native-comp] The Makefile only checks for .elc files Nicolas Bértolo
  2020-05-16 16:55 ` Andrea Corallo
@ 2020-08-31 20:54 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
  1 sibling, 0 replies; 5+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-08-31 20:54 UTC (permalink / raw)
  To: Nicolas Bértolo; +Cc: 41329-done

Nicolas Bértolo <nicolasbertolo@gmail.com> writes:

> There is a problem with the build system for .eln files. The Makefile only has a
> target creating *.elc files. This means that if you use Emacs to change an .el
> file and you set it up to byte-compile .el files on save you will never
> recompile the .eln files.

I'm closing this as with the new cache mechanism the stale .eln can't be
loaded and will be automatically recompiled before being finally late
loaded.

  Andrea





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-08-31 20:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-16 16:15 bug#41329: [feature/native-comp] The Makefile only checks for .elc files Nicolas Bértolo
2020-05-16 16:55 ` Andrea Corallo
2020-05-16 17:45   ` Nicolas Bértolo
2020-05-16 18:19     ` Andrea Corallo
2020-08-31 20:54 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).