all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Why are the tests byte-compiled
@ 2016-06-15 20:23 Phillip Lord
  2016-06-15 21:55 ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Phillip Lord @ 2016-06-15 20:23 UTC (permalink / raw)
  To: emacs-devel



I'm just trying to write some tests, and I get an error like this.

Test open-this-file backtrace:
  #[nil "\306\307!\310\311\216\n\312P\313\314!\x1c\315\216\316\314\310
  ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc

Which is pretty useless for debugging. On the other hand, if I launch
the erts using the same command as the makefile uses but directly on the
source file (i.e. not byte compiled) then I get.

Test open-this-file backtrace:
  (let ((file (concat vc-git-tests-data-dir "file1.txt")) (git-dir (ge
  (setq value-0 (let ((file (concat vc-git-tests-data-dir "file1.txt")

which is useful.

Conclusion: the emacs tests should not be byte-compiled. Or am I missing
something?

Phil



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

* RE: Why are the tests byte-compiled
  2016-06-15 20:23 Why are the tests byte-compiled Phillip Lord
@ 2016-06-15 21:55 ` Drew Adams
  2016-06-17 15:02   ` Phillip Lord
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2016-06-15 21:55 UTC (permalink / raw)
  To: phillip.lord, emacs-devel

> I'm just trying to write some tests, and I get an error like this.
> 
> Test open-this-file backtrace:
>   #[nil "\306\307!\310\311\216\n\312P\313\314!\x1c\315\216\316\314\310
>   ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
> 
> Which is pretty useless for debugging. On the other hand, if I launch
> the erts using the same command as the makefile uses but directly on the
> source file (i.e. not byte compiled) then I get.
> 
> Test open-this-file backtrace:
>   (let ((file (concat vc-git-tests-data-dir "file1.txt")) (git-dir (ge
>   (setq value-0 (let ((file (concat vc-git-tests-data-dir "file1.txt")
> 
> which is useful.
> 
> Conclusion: the emacs tests should not be byte-compiled. Or am I
> missing something?

Backtraces include byte-code for code that was compiled.  They
should not.  Rather, it should at least be possible for a user
or a program to elide the byte-code in a backtrace.

Bug #6991, 2010/09/07.

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6991



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

* Re: Why are the tests byte-compiled
  2016-06-15 21:55 ` Drew Adams
@ 2016-06-17 15:02   ` Phillip Lord
  2016-06-17 15:13     ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Phillip Lord @ 2016-06-17 15:02 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel

Drew Adams <drew.adams@oracle.com> writes:

>> I'm just trying to write some tests, and I get an error like this.
>> 
>> Test open-this-file backtrace:
>>   #[nil "\306\307!\310\311\216\n\312P\313\314!\315\216\316\314\310
>>   ert--run-test-internal([cl-struct-ert--test-execution-info [cl-struc
>> 
>> Which is pretty useless for debugging. On the other hand, if I launch
>> the erts using the same command as the makefile uses but directly on the
>> source file (i.e. not byte compiled) then I get.
>> 
>> Test open-this-file backtrace:
>>   (let ((file (concat vc-git-tests-data-dir "file1.txt")) (git-dir (ge
>>   (setq value-0 (let ((file (concat vc-git-tests-data-dir "file1.txt")
>> 
>> which is useful.
>> 
>> Conclusion: the emacs tests should not be byte-compiled. Or am I
>> missing something?
>
> Backtraces include byte-code for code that was compiled.  They
> should not.  Rather, it should at least be possible for a user
> or a program to elide the byte-code in a backtrace.


Sure, but in this case the byte-code hides everything of use. I can't
see any reason *why* they are byte compiled.

Phil



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

* RE: Why are the tests byte-compiled
  2016-06-17 15:02   ` Phillip Lord
@ 2016-06-17 15:13     ` Drew Adams
  2016-06-17 15:25       ` Phillip Lord
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2016-06-17 15:13 UTC (permalink / raw)
  To: phillip.lord; +Cc: emacs-devel

> >> Conclusion: the emacs tests should not be byte-compiled.
> >> Or am I missing something?
> >
> > Backtraces include byte-code for code that was compiled.  They
> > should not.  Rather, it should at least be possible for a user
> > or a program to elide the byte-code in a backtrace.
> 
> Sure, but in this case the byte-code hides everything of use.
> I can't see any reason *why* they are byte compiled.

Yes, sorry if I was not clear.  There are two things that could
be improved:

1. The issue you raised, which is whether or not test code should
   be byte-compiled.

2. Bug #6991, http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6991.

If the code you need to see in the backtrace is byte-compiled
then eliding that byte-code won't help.  Agreed.



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

* Re: Why are the tests byte-compiled
  2016-06-17 15:13     ` Drew Adams
@ 2016-06-17 15:25       ` Phillip Lord
  0 siblings, 0 replies; 7+ messages in thread
From: Phillip Lord @ 2016-06-17 15:25 UTC (permalink / raw)
  To: Drew Adams; +Cc: emacs-devel

Drew Adams <drew.adams@oracle.com> writes:

>> >> Conclusion: the emacs tests should not be byte-compiled.
>> >> Or am I missing something?
>> >
>> > Backtraces include byte-code for code that was compiled.  They
>> > should not.  Rather, it should at least be possible for a user
>> > or a program to elide the byte-code in a backtrace.
>> 
>> Sure, but in this case the byte-code hides everything of use.
>> I can't see any reason *why* they are byte compiled.
>
> Yes, sorry if I was not clear.  There are two things that could
> be improved:
>
> 1. The issue you raised, which is whether or not test code should
>    be byte-compiled.


I'll try turning it off and see what happens! Seems to be the quickest
way to find the answer.

Phil



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

* Re: Why are the tests byte-compiled
@ 2016-06-26  5:18 Noam Postavsky
  2016-06-27 13:35 ` Phillip Lord
  0 siblings, 1 reply; 7+ messages in thread
From: Noam Postavsky @ 2016-06-26  5:18 UTC (permalink / raw)
  To: Phillip Lord; +Cc: Drew Adams, emacs-devel

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17851 seems related



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

* Re: Why are the tests byte-compiled
  2016-06-26  5:18 Noam Postavsky
@ 2016-06-27 13:35 ` Phillip Lord
  0 siblings, 0 replies; 7+ messages in thread
From: Phillip Lord @ 2016-06-27 13:35 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Drew Adams, emacs-devel

Noam Postavsky <npostavs@users.sourceforge.net> writes:

> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17851 seems related

That's interesting, although, I'm struggling to see when this statement:


This was never apparent before because even though the files in
test/automated were compiled, the tests were always run from the
uncompiled file.

was true. AFAICT, the makefile always used the elc files.

Still, it does look like it might be worth changing on master. I'll
experiment.

Phil



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

end of thread, other threads:[~2016-06-27 13:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-15 20:23 Why are the tests byte-compiled Phillip Lord
2016-06-15 21:55 ` Drew Adams
2016-06-17 15:02   ` Phillip Lord
2016-06-17 15:13     ` Drew Adams
2016-06-17 15:25       ` Phillip Lord
  -- strict thread matches above, loose matches on Subject: below --
2016-06-26  5:18 Noam Postavsky
2016-06-27 13:35 ` Phillip Lord

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.