all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Package Requiring a Commit?
@ 2022-05-04 11:44 Jai Flack
  2022-05-04 12:59 ` Filipp Gunbin
  0 siblings, 1 reply; 6+ messages in thread
From: Jai Flack @ 2022-05-04 11:44 UTC (permalink / raw)
  To: emacs-devel

Greetings Emacs Developers,

Is there a preferred way for a package to Package-Requires on an Emacs
version more recent than the latest release? The context for this my
package isearch-olc [1] which I would like to finish testing and submit
for inclusion in GNU ELPA soon, however it requires
lazy-count-update-hook which was only introduced in a recent-ish commit.

Is the preferred solution to check for special-variable-p and error
(possibly message on load and error on mode enable) if it hasn't been
defined yet?

[1] https://git.disroot.org/jflack/isearch-olc

-- 
Thanks,
Jai



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

* Re: Package Requiring a Commit?
  2022-05-04 11:44 Package Requiring a Commit? Jai Flack
@ 2022-05-04 12:59 ` Filipp Gunbin
  2022-05-05  7:46   ` Jai Flack
  0 siblings, 1 reply; 6+ messages in thread
From: Filipp Gunbin @ 2022-05-04 12:59 UTC (permalink / raw)
  To: Jai Flack; +Cc: emacs-devel

On 04/05/2022 11:44 +0000, Jai Flack wrote:

> Greetings Emacs Developers,
>
> Is there a preferred way for a package to Package-Requires on an Emacs
> version more recent than the latest release? The context for this my
> package isearch-olc [1] which I would like to finish testing and submit
> for inclusion in GNU ELPA soon, however it requires
> lazy-count-update-hook which was only introduced in a recent-ish commit.
>
> Is the preferred solution to check for special-variable-p and error
> (possibly message on load and error on mode enable) if it hasn't been
> defined yet?

This should work, just use next version:

;; Package-Requires: ((emacs "29"))

Then people running Emacs which was built recently from master will be
able to install your package, because they're "already on 29".

Filipp



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

* Re: Package Requiring a Commit?
  2022-05-04 12:59 ` Filipp Gunbin
@ 2022-05-05  7:46   ` Jai Flack
  2022-05-05  8:37     ` Tassilo Horn
  2022-05-05 13:43     ` Filipp Gunbin
  0 siblings, 2 replies; 6+ messages in thread
From: Jai Flack @ 2022-05-05  7:46 UTC (permalink / raw)
  To: emacs-devel

Filipp Gunbin <fgunbin@fastmail.fm> writes:

> On 04/05/2022 11:44 +0000, Jai Flack wrote:
>
>> Greetings Emacs Developers,
>>
>> Is there a preferred way for a package to Package-Requires on an Emacs
>> version more recent than the latest release? The context for this my
>> package isearch-olc [1] which I would like to finish testing and submit
>> for inclusion in GNU ELPA soon, however it requires
>> lazy-count-update-hook which was only introduced in a recent-ish commit.
>>
>> Is the preferred solution to check for special-variable-p and error
>> (possibly message on load and error on mode enable) if it hasn't been
>> defined yet?
>
> This should work, just use next version:
>
> ;; Package-Requires: ((emacs "29"))
>
> Then people running Emacs which was built recently from master will be
> able to install your package, because they're "already on 29".
>
> Filipp

Thanks that solves one of the issues. Is there no good solution to the
other? I can imagine some users building from master for a specific
feature (say, PGTK) and then not updating.

-- 
Thanks,
Jai



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

* Re: Package Requiring a Commit?
  2022-05-05  7:46   ` Jai Flack
@ 2022-05-05  8:37     ` Tassilo Horn
  2022-05-05 14:40       ` Jai Flack
  2022-05-05 13:43     ` Filipp Gunbin
  1 sibling, 1 reply; 6+ messages in thread
From: Tassilo Horn @ 2022-05-05  8:37 UTC (permalink / raw)
  To: Jai Flack; +Cc: emacs-devel

Jai Flack <jflack@posteo.net> writes:

>> This should work, just use next version:
>>
>> ;; Package-Requires: ((emacs "29"))
>>
>> Then people running Emacs which was built recently from master will be
>> able to install your package, because they're "already on 29".
>
> Thanks that solves one of the issues. Is there no good solution to the
> other? I can imagine some users building from master for a specific
> feature (say, PGTK) and then not updating.

For something like "at least as new as commit XXX" Emacs would need to
carry its complete commit graph with it in order to check that
requirement.

So it's best to just require emacs 29.  I personally have no big empathy
for people running outdated development snapshots [1] but if you do, it
shouldn't be too hard to fail gracefully by testing for
functions/variables you need using (f)boundp.

Bye,
Tassilo

[1] Simply because during development it may happen that new things are
    tweaked/renamed many times until finished.



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

* Re: Package Requiring a Commit?
  2022-05-05  7:46   ` Jai Flack
  2022-05-05  8:37     ` Tassilo Horn
@ 2022-05-05 13:43     ` Filipp Gunbin
  1 sibling, 0 replies; 6+ messages in thread
From: Filipp Gunbin @ 2022-05-05 13:43 UTC (permalink / raw)
  To: Jai Flack; +Cc: emacs-devel

On 05/05/2022 07:46 +0000, Jai Flack wrote:

> Filipp Gunbin <fgunbin@fastmail.fm> writes:
>
>> On 04/05/2022 11:44 +0000, Jai Flack wrote:
>>
>>> Greetings Emacs Developers,
>>>
>>> Is there a preferred way for a package to Package-Requires on an Emacs
>>> version more recent than the latest release? The context for this my
>>> package isearch-olc [1] which I would like to finish testing and submit
>>> for inclusion in GNU ELPA soon, however it requires
>>> lazy-count-update-hook which was only introduced in a recent-ish commit.
>>>
>>> Is the preferred solution to check for special-variable-p and error
>>> (possibly message on load and error on mode enable) if it hasn't been
>>> defined yet?
>>
>> This should work, just use next version:
>>
>> ;; Package-Requires: ((emacs "29"))
>>
>> Then people running Emacs which was built recently from master will be
>> able to install your package, because they're "already on 29".
>>
>> Filipp
>
> Thanks that solves one of the issues. Is there no good solution to the
> other? I can imagine some users building from master for a specific
> feature (say, PGTK) and then not updating.

Sorry, I thought you were describing the _single_ problem.  I see
Tassilo replied to you, but if you still have questions - please tell
what they are.

Filipp



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

* Re: Package Requiring a Commit?
  2022-05-05  8:37     ` Tassilo Horn
@ 2022-05-05 14:40       ` Jai Flack
  0 siblings, 0 replies; 6+ messages in thread
From: Jai Flack @ 2022-05-05 14:40 UTC (permalink / raw)
  To: Tassilo Horn; +Cc: emacs-devel

Tassilo Horn <tsdh@gnu.org> writes:

> Jai Flack <jflack@posteo.net> writes:
>
>>> This should work, just use next version:
>>>
>>> ;; Package-Requires: ((emacs "29"))
>>>
>>> Then people running Emacs which was built recently from master will be
>>> able to install your package, because they're "already on 29".
>>
>> Thanks that solves one of the issues. Is there no good solution to the
>> other? I can imagine some users building from master for a specific
>> feature (say, PGTK) and then not updating.
>
> For something like "at least as new as commit XXX" Emacs would need to
> carry its complete commit graph with it in order to check that
> requirement.
>
> So it's best to just require emacs 29.  I personally have no big empathy
> for people running outdated development snapshots [1] but if you do, it
> shouldn't be too hard to fail gracefully by testing for
> functions/variables you need using (f)boundp.
>
> Bye,
> Tassilo
>
> [1] Simply because during development it may happen that new things are
>     tweaked/renamed many times until finished.

I'm not necessarily after requiring specific commits but yes I suppose
something like that isn't a reasonable expectation.

-- 
Thanks,
Jai



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

end of thread, other threads:[~2022-05-05 14:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-04 11:44 Package Requiring a Commit? Jai Flack
2022-05-04 12:59 ` Filipp Gunbin
2022-05-05  7:46   ` Jai Flack
2022-05-05  8:37     ` Tassilo Horn
2022-05-05 14:40       ` Jai Flack
2022-05-05 13:43     ` Filipp Gunbin

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.