all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* RE: master 491531b: Avoid ert test failures
@ 2017-04-19  2:35 Noam Postavsky
  2017-04-19 20:38 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Noam Postavsky @ 2017-04-19  2:35 UTC (permalink / raw)
  To: Glenn Morris, Emacs developers

>     Avoid ert test failures
>
>     * lisp/emacs-lisp/ert.el (ert--expand-should-1):
>     Avoid errors related to undefined byte-compile-macro-environment.
>     Somehow masked until very recently because loading seq (eg)
>     loads bytecomp.  http://hydra.nixos.org/build/51730765
> ---

>  (defun ert--expand-should-1 (whole form inner-expander)
>    "Helper function for the `should' macro and its variants."
> +  (require 'bytecomp)                   ; FIXME?
>    (let ((form
>           (macroexpand form (append byte-compile-macro-environment
>                                     (cond

I introduced this dependency in [1: 58e418d2ce].  I did notice the
error once locally, and then it didn't come up again; I'm not quite
understanding how the masking works.

Anyway, I was considering fixing this by using (bound-and-true-p
byte-compile-macro-environment) instead of loading `bytecomp', which
almost seems to work except that eval-tests--bugs-24912-and-24913
fails because `should-error' fails to catch the error from
byte-compile.  That can be fixed by adding (require 'bytecomp) in that
test, but maybe it's better just to leave the require in ert?

1: 2016-12-06 22:20:23 -0500 58e418d2ceb82501f03d9c3316fd0a46faf7f0eb
  Fix ert-tests when running compiled



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

* Re: master 491531b: Avoid ert test failures
  2017-04-19  2:35 master 491531b: Avoid ert test failures Noam Postavsky
@ 2017-04-19 20:38 ` Glenn Morris
  2017-04-23  3:23   ` Noam Postavsky
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2017-04-19 20:38 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: Emacs developers

Noam Postavsky wrote:

>> +  (require 'bytecomp)                   ; FIXME?
>
> Anyway, I was considering fixing this by using (bound-and-true-p
> byte-compile-macro-environment) instead of loading `bytecomp', which
> almost seems to work except that eval-tests--bugs-24912-and-24913
> fails because `should-error' fails to catch the error from
> byte-compile.  That can be fixed by adding (require 'bytecomp) in that
> test, but maybe it's better just to leave the require in ert?
>
> 1: 2016-12-06 22:20:23 -0500 58e418d2ceb82501f03d9c3316fd0a46faf7f0eb
>   Fix ert-tests when running compiled

The above was just a workaround I threw in to stop the test failures.
I think explicitly loading bytecomp isn't great, and would welcome
any better solution. Maybe the original tests that caused this issue
simply aren't sensible.



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

* Re: master 491531b: Avoid ert test failures
  2017-04-19 20:38 ` Glenn Morris
@ 2017-04-23  3:23   ` Noam Postavsky
  0 siblings, 0 replies; 3+ messages in thread
From: Noam Postavsky @ 2017-04-23  3:23 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Emacs developers

>> Anyway, I was considering fixing this by using (bound-and-true-p
>> byte-compile-macro-environment) instead of loading `bytecomp', which
>> almost seems to work except that eval-tests--bugs-24912-and-24913
>> fails because `should-error' fails to catch the error from
>> byte-compile.

Actually the issue there was just a missing defvar for
`byte-compile-debug'. There should have been a compile warning about
an unused local variable except that loading the compiler defines this
variable. Fixed in [1: b20d05c6d7].

[1: b20d05c6d7]: 2017-04-22 23:17:59 -0400
  Don't require bytecomp for running ert tests
  http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=b20d05c6d76ddaf7e70da1430c9aac56ef1d6b31



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

end of thread, other threads:[~2017-04-23  3:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-19  2:35 master 491531b: Avoid ert test failures Noam Postavsky
2017-04-19 20:38 ` Glenn Morris
2017-04-23  3:23   ` Noam Postavsky

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.