all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: master 2e090da: Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake.
       [not found] ` <20201025101404.7EBE2204DA@vcs0.savannah.gnu.org>
@ 2020-10-25 13:59   ` Stefan Monnier
  2020-10-26  9:47     ` Harald Jörg
  2020-10-31 15:07     ` Philipp Stephani
  0 siblings, 2 replies; 6+ messages in thread
From: Stefan Monnier @ 2020-10-25 13:59 UTC (permalink / raw)
  To: Philipp Stephani; +Cc: emacs-devel

>     Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake.
>     Flymake supports all Emacs versions back to 26.1, so it can’t use
>     ‘ert-resource-file’.
>     * test/lisp/progmodes/flymake-tests.el (flymake-tests-data-directory):
>     Recreate.
>     (flymake-tests--call-with-fixture): Stop using ‘ert-resource-file’.

It's common for a package to say "require Emacs version NN.MM" but to
provide extra features on more recent Emacsen.  And the tests can
definitely fall into the category of extra features.

Better yet: the GNU ELPA package does not even include the flymake-tests.el file.


        Stefan




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

* Re: master 2e090da: Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake.
  2020-10-25 13:59   ` master 2e090da: Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake Stefan Monnier
@ 2020-10-26  9:47     ` Harald Jörg
  2020-10-26 16:23       ` Stefan Kangas
  2020-10-31 15:07     ` Philipp Stephani
  1 sibling, 1 reply; 6+ messages in thread
From: Harald Jörg @ 2020-10-26  9:47 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Philipp Stephani, emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>     Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake.
>>     Flymake supports all Emacs versions back to 26.1, so it can’t use
>>     ‘ert-resource-file’.
>>     * test/lisp/progmodes/flymake-tests.el (flymake-tests-data-directory):
>>     Recreate.
>>     (flymake-tests--call-with-fixture): Stop using ‘ert-resource-file’.
>
> It's common for a package to say "require Emacs version NN.MM" but to
> provide extra features on more recent Emacsen.  And the tests can
> definitely fall into the category of extra features.

I have also been bitten by this and am pondering what's the best way out
of that dilemma.  I'm working on cperl-mode and am trying to keep it
compatible with Emacs 26.1 (the version which comes with Debian stable).
cperl-mode isn't even on ELPA yet, but might end up there.

I *really* like 'ert-resource-file' because it reduces a lot of
boilerplate from the tests.  Therefore I don't consider reverting that
commit.  However, for the moment, I lost the chance to run the tests in
the environment which comes with Emacs "as shipped by the
distributions".

In my opinion, running the tests in older versions _is_ important,
otherwise the claim "supports Emacs 26.1" isn't honest.  I want to
support older Emacsen so that I can get feedback from users who don't
want to compile their own Emacs (which includes myself on production
systems), and I also want to add new features for which new tests should
be written.

So, what I've come up with is a file ert-backport.el, with the
description "Run ERT tests from Emacs master under older Emacsen".

To activate this file, I add its directory to the environment variable
EMACSLOADPATH - and voila, tests from Emacs' master branch pass with
Debian buster's Emacs 26, using the ERT provided by this Debian package.

Whenever the tests are upgraded to use new ERT features (which I
consider to be rare events anyway), ert-backport.el needs to be updated.

Could such an ert-backport.el be a candidate for ELPA?  It should be
useful for all dual-life (Emacs + ELPA) packages.
--
Cheers,
haj



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

* Re: master 2e090da: Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake.
  2020-10-26  9:47     ` Harald Jörg
@ 2020-10-26 16:23       ` Stefan Kangas
  2020-10-26 19:57         ` Harald Jörg
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Kangas @ 2020-10-26 16:23 UTC (permalink / raw)
  To: Harald Jörg; +Cc: Philipp Stephani, Stefan Monnier, Emacs developers

Harald Jörg <haj@posteo.de> writes:

> Could such an ert-backport.el be a candidate for ELPA?  It should be
> useful for all dual-life (Emacs + ELPA) packages.

How about just making ert itself into a GNU ELPA core package?



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

* Re: master 2e090da: Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake.
  2020-10-26 16:23       ` Stefan Kangas
@ 2020-10-26 19:57         ` Harald Jörg
  2020-10-27  0:58           ` Stefan Kangas
  0 siblings, 1 reply; 6+ messages in thread
From: Harald Jörg @ 2020-10-26 19:57 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Philipp Stephani, Stefan Monnier, Emacs developers

Stefan Kangas <stefan@marxist.se> writes:

> Harald Jörg <haj@posteo.de> writes:
>
>> Could such an ert-backport.el be a candidate for ELPA?  It should be
>> useful for all dual-life (Emacs + ELPA) packages.
>
> How about just making ert itself into a GNU ELPA core package?

I'd be happy with that.

ert.el would then need to implement some compatibility features itself:
It uses the new format-prompt, for example, which can be easily covered.
It also uses backtrace.el, which doesn't exist in Emacs 26.
backtrace.el, in turn, needs lisp-el-font-lock-keywords-for-backtraces,
which has been added to lisp-mode.el (in the same commit e09120d6 where
backtrace.el was created).  I didn't dig any further, but I guess
there's some effort to unravel all of this.

Maybe it would make sense to _start_ this as a long-term goal right now,
working for versions 28 and beyond?  That would make ert-backport.el a
temporary workaround, to be eliminated as soon as versions below 28 go
out of scope.
-- 
Cheers,
haj



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

* Re: master 2e090da: Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake.
  2020-10-26 19:57         ` Harald Jörg
@ 2020-10-27  0:58           ` Stefan Kangas
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Kangas @ 2020-10-27  0:58 UTC (permalink / raw)
  To: Harald Jörg; +Cc: Philipp Stephani, Stefan Monnier, Emacs developers

haj@posteo.de (Harald Jörg) writes:

>>> Could such an ert-backport.el be a candidate for ELPA?  It should be
>>> useful for all dual-life (Emacs + ELPA) packages.
>>
>> How about just making ert itself into a GNU ELPA core package?
>
> I'd be happy with that.
>
> ert.el would then need to implement some compatibility features itself:
> It uses the new format-prompt, for example, which can be easily covered.
> It also uses backtrace.el, which doesn't exist in Emacs 26.
> backtrace.el, in turn, needs lisp-el-font-lock-keywords-for-backtraces,
> which has been added to lisp-mode.el (in the same commit e09120d6 where
> backtrace.el was created).  I didn't dig any further, but I guess
> there's some effort to unravel all of this.
>
> Maybe it would make sense to _start_ this as a long-term goal right now,
> working for versions 28 and beyond?  That would make ert-backport.el a
> temporary workaround, to be eliminated as soon as versions below 28 go
> out of scope.

Given the amount of work involved (full disclosure: more than I
expected), it sounds like your compatibility package is probably the
better choice for now.  We can think about making ert into a package in
its own right in the future, if we need or want to.

Making ert-backport.el into a GNU ELPA package sounds good to me.  But
let's see if anyone else has any comments.

Thanks for working on this.



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

* Re: master 2e090da: Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake.
  2020-10-25 13:59   ` master 2e090da: Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake Stefan Monnier
  2020-10-26  9:47     ` Harald Jörg
@ 2020-10-31 15:07     ` Philipp Stephani
  1 sibling, 0 replies; 6+ messages in thread
From: Philipp Stephani @ 2020-10-31 15:07 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Philipp Stephani, Emacs developers

Am So., 25. Okt. 2020 um 14:59 Uhr schrieb Stefan Monnier
<monnier@iro.umontreal.ca>:
>
> >     Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake.
> >     Flymake supports all Emacs versions back to 26.1, so it can’t use
> >     ‘ert-resource-file’.
> >     * test/lisp/progmodes/flymake-tests.el (flymake-tests-data-directory):
> >     Recreate.
> >     (flymake-tests--call-with-fixture): Stop using ‘ert-resource-file’.
>
> It's common for a package to say "require Emacs version NN.MM" but to
> provide extra features on more recent Emacsen.  And the tests can
> definitely fall into the category of extra features.
>

I disagree, the tests are a core part of the code, and it's crucial
that they can be run against any supported Emacs version. This implies
that the tests themselves need to be compatible with all supported
Emacs versions.
We should really run the tests of such packages against all supported
versions on the CI system to avoid such breakages.



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

end of thread, other threads:[~2020-10-31 15:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20201025101403.1168.4440@vcs0.savannah.gnu.org>
     [not found] ` <20201025101404.7EBE2204DA@vcs0.savannah.gnu.org>
2020-10-25 13:59   ` master 2e090da: Revert commit 1f44a776729adf9c6468a76f8310616fde62eeaa for Flymake Stefan Monnier
2020-10-26  9:47     ` Harald Jörg
2020-10-26 16:23       ` Stefan Kangas
2020-10-26 19:57         ` Harald Jörg
2020-10-27  0:58           ` Stefan Kangas
2020-10-31 15:07     ` Philipp Stephani

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.