Closed a-daniel-eliason closed 4 months ago
a-daniel-eliason @.***> writes:
with Emacs 30.0.50 when I use 'list-packages' to install first 'compat' and then 'transient', 'static-if' is not defined. It looks like the right files of 'compat' are compiled (-30.el" in particular, which has 'static-if'), but 'static-if' is still not available to 'transient':
I am not sure if this is related, but apparently transient (or at least the version I have from the master branch) provides its own definition of `static-if', which might be causing issues. I have reported that as a bug.
But otherwise, if you are also on Emacs 30, then most of the Compat files should be empty or next-to-empty as Emacs already has all the definitions a compatibility library could try to provide.
` Compiling internal form(s) at Thu Jul 18 18:12:23 2024 Leaving directory ‘/home/eliason/.emacs.d/elpa/compat-30.0.0.0’
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-25.el at Thu Jul 18 18:12:23 2024 Entering directory ‘/home/eliason/.emacs.d/elpa/compat-30.0.0.0/’
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-26.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-27.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-28.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-29.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-30.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat.el at Thu Jul 18 18:12:23 2024
Compiling internal form(s) at Thu Jul 18 18:12:54 2024 Leaving directory ‘/home/eliason/.emacs.d/elpa/transient-0.7.3’
Compiling file /home/eliason/.emacs.d/elpa/transient-0.7.3/transient.el at Thu Jul 18 18:12:54 2024 Entering directory ‘/home/eliason/.emacs.d/elpa/transient-0.7.3/’
In end of data: transient.el:2438:2: Warning: the function ‘static-if’ is not known to be defined. `
-- Philip Kaludercic on peregrine
Hi Phillip, the latest version of "transient" has dropped its own definition, and now relies on "compat"s. Thus this example shows that "compat" does not succeed to provide it, at least that is the case for Emacs 30.0.50.
On Thu, Jul 18, 2024, 22:12 Philip @.***> wrote:
a-daniel-eliason @.***> writes:
with Emacs 30.0.50 when I use 'list-packages' to install first 'compat' and then 'transient', 'static-if' is not defined. It looks like the right files of 'compat' are compiled (-30.el" in particular, which has 'static-if'), but 'static-if' is still not available to 'transient':
I am not sure if this is related, but apparently transient (or at least the version I have from the master branch) provides its own definition of `static-if', which might be causing issues. I have reported that as a bug.
But otherwise, if you are also on Emacs 30, then most of the Compat files should be empty or next-to-empty as Emacs already has all the definitions a compatibility library could try to provide.
` Compiling internal form(s) at Thu Jul 18 18:12:23 2024 Leaving directory ‘/home/eliason/.emacs.d/elpa/compat-30.0.0.0’
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-25.el at Thu Jul 18 18:12:23 2024 Entering directory ‘/home/eliason/.emacs.d/elpa/compat-30.0.0.0/’
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-26.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-27.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-28.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-29.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-30.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat.el at Thu Jul 18 18:12:23 2024
Compiling internal form(s) at Thu Jul 18 18:12:54 2024 Leaving directory ‘/home/eliason/.emacs.d/elpa/transient-0.7.3’
Compiling file /home/eliason/.emacs.d/elpa/transient-0.7.3/transient.el at Thu Jul 18 18:12:54 2024 Entering directory ‘/home/eliason/.emacs.d/elpa/transient-0.7.3/’
In end of data: transient.el:2438:2: Warning: the function ‘static-if’ is not known to be defined. `
-- Philip Kaludercic on peregrine
— Reply to this email directly, view it on GitHub https://github.com/emacs-compat/compat/issues/47#issuecomment-2237479595, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOXPOSUG24CA77QXLYXIWT3ZNAORNAVCNFSM6AAAAABLDK2V2CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZXGQ3TSNJZGU . You are receiving this because you authored the thread.Message ID: @.***>
a-daniel-eliason @.***> writes:
Hi Phillip, the latest version of "transient" has dropped its own definition, and now relies on "compat"s. Thus this example shows that "compat" does not succeed to provide it, at least that is the case for Emacs 30.0.50.
But Compat /shouldn't/ provide it, as it Emacs 30 defines the macro in subr.el? Or am I missing something obvious?
On Thu, Jul 18, 2024, 22:12 Philip @.***> wrote:
a-daniel-eliason @.***> writes:
with Emacs 30.0.50 when I use 'list-packages' to install first 'compat' and then 'transient', 'static-if' is not defined. It looks like the right files of 'compat' are compiled (-30.el" in particular, which has 'static-if'), but 'static-if' is still not available to 'transient':
I am not sure if this is related, but apparently transient (or at least the version I have from the master branch) provides its own definition of `static-if', which might be causing issues. I have reported that as a bug.
But otherwise, if you are also on Emacs 30, then most of the Compat files should be empty or next-to-empty as Emacs already has all the definitions a compatibility library could try to provide.
` Compiling internal form(s) at Thu Jul 18 18:12:23 2024 Leaving directory ‘/home/eliason/.emacs.d/elpa/compat-30.0.0.0’
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-25.el at Thu Jul 18 18:12:23 2024 Entering directory ‘/home/eliason/.emacs.d/elpa/compat-30.0.0.0/’
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-26.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-27.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-28.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-29.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-30.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat.el at Thu Jul 18 18:12:23 2024
Compiling internal form(s) at Thu Jul 18 18:12:54 2024 Leaving directory ‘/home/eliason/.emacs.d/elpa/transient-0.7.3’
Compiling file /home/eliason/.emacs.d/elpa/transient-0.7.3/transient.el at Thu Jul 18 18:12:54 2024 Entering directory ‘/home/eliason/.emacs.d/elpa/transient-0.7.3/’
In end of data: transient.el:2438:2: Warning: the function ‘static-if’ is not known to be defined. `
-- Philip Kaludercic on peregrine
— Reply to this email directly, view it on GitHub https://github.com/emacs-compat/compat/issues/47#issuecomment-2237479595, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOXPOSUG24CA77QXLYXIWT3ZNAORNAVCNFSM6AAAAABLDK2V2CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZXGQ3TSNJZGU . You are receiving this because you authored the thread.Message ID: @.***>
-- Philip Kaludercic on peregrine
As Philip mentioned, Compat does not provide static-if
if you use Compat on Emacs 30. It even goes so far, that Compat 30 does not even have to be installed on Emacs 30, since Emacs itself provides a compat.el stub (version 30.0.9999).
@a-daniel-eliason I believe the problem here is that your Emacs version is outdated and provides neither static-if
in subr.el nor the compat.el stub. The version 30.0.50 is not telling much, since it is a moving development version. To confirm - which exact commit of Emacs do you use?
In order to resolve the problem, update Emacs to a newer commit (from the emacs-30 branch, version 30.0.60). Then you can remove Compat and recompile/reinstall all packages depending on Compat.
Hi all, thanks for the discussion. After cloning the Savannah Emacs repo and checking in the "subr.el" file, using blame, etc. what I can see is that 'static-if' was added in Sept. 30 in commit 97652d0e. As to my version 30.0.50, I confirm that "subr.el" does not have it, and also the comments in recent "subr.el" from the repo include this which states that it becomes available in version 30.1, so I wonder if 'compat' could use that as the trigger to include/exclude it?
;; Note: 'static-if' can be copied into a package to enable it to be
;; used in Emacsen older than Emacs 30.1.
My own solution is for now to insert 'static-if' into my local 'transient' package code, since my troubles were triggered by it being dropped from there (because they considered 'compat' would provide it if necessary). My eventual solution will be to update my Emacs to more recent version, of course.
a-daniel-eliason @.***> writes:
Hi all, thanks for the discussion. After cloning the Savannah Emacs repo and checking in the "subr.el" file, using blame, etc. what I can see is that 'static-if' was added in Sept. 30 in commit 97652d0e. As to my version 30.0.50, I confirm that "subr.el" does not have it, and also the comments in recent "subr.el" from the repo include this which states that it becomes available in version 30.1, so I wonder if 'compat' could use that as the trigger to include/exclude it?
;; Note: 'static-if' can be copied into a package to enable it to be ;; used in Emacsen older than Emacs 30.1.
My own solution is for now to insert 'static-if' into my local 'transient' package code, since my troubles were triggered by it being dropped from there (because they considered 'compat' would provide it if necessary). My eventual solution will be to update my Emacs to more recent version, of course.
Can you explain why/how you are using Emacs 30.0.50? Is it not possible for you to update the checkout (Usually shouldn't be more than a "git pull && make")? Since these are not real releases, it is pretty difficult to support development checkouts in a compatibility package, especially when these are out of date.
-- Philip Kaludercic on peregrine
@a-daniel-eliason
As to my version 30.0.50, I confirm that "subr.el" does not have it, and also the comments in recent "subr.el" from the repo include this which states that it becomes available in version 30.1, so I wonder if 'compat' could use that as the trigger to include/exclude it?
No, Compat cannot provide static-if
for Emacs 30, since Compat may not even be installed because of the compat.el stub. Furthermore compat-30.el and older are not loaded. Note that we are targeting stable Emacs releases, everything else is out of scope. The situation is the same for other Emacs packages. If a package from GNU ELPA specifies a dependencies on Emacs 30.1, it relies on the API provided by the stable release and is not guaranteed to work with a development version where the precise version is unclear.
My own solution is for now to insert 'static-if' into my local 'transient' package code, since my troubles were triggered by it being dropped from there (because they considered 'compat' would provide it if necessary). My eventual solution will be to update my Emacs to more recent version, of course.
Temporarily copying static-if
is an acceptable stop gap measure, but in the long term I strongly suggest to upgrade, also considering other packages which will rely on the availability of a stable API version.
See also the discussion https://github.com/magit/transient/discussions/295.
with Emacs 30.0.50 when I use 'list-packages' to install first 'compat' and then 'transient', 'static-if' is not defined. It looks like the right files of 'compat' are compiled (-30.el" in particular, which has 'static-if'), but 'static-if' is still not available to 'transient': ` Compiling internal form(s) at Thu Jul 18 18:12:23 2024 Leaving directory ‘/home/eliason/.emacs.d/elpa/compat-30.0.0.0’
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-25.el at Thu Jul 18 18:12:23 2024 Entering directory ‘/home/eliason/.emacs.d/elpa/compat-30.0.0.0/’
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-26.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-27.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-28.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-29.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat-30.el at Thu Jul 18 18:12:23 2024
Compiling file /home/eliason/.emacs.d/elpa/compat-30.0.0.0/compat.el at Thu Jul 18 18:12:23 2024
Compiling internal form(s) at Thu Jul 18 18:12:54 2024 Leaving directory ‘/home/eliason/.emacs.d/elpa/transient-0.7.3’
Compiling file /home/eliason/.emacs.d/elpa/transient-0.7.3/transient.el at Thu Jul 18 18:12:54 2024 Entering directory ‘/home/eliason/.emacs.d/elpa/transient-0.7.3/’
In end of data: transient.el:2438:2: Warning: the function ‘static-if’ is not known to be defined. `