From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: dalanicolai Newsgroups: gmane.emacs.devel Subject: Re: Why 'define-package' marked obsolete? Date: Wed, 22 Mar 2023 22:27:31 +0100 Message-ID: References: <83zg87739o.fsf@gnu.org> <87jzzbp6bn.fsf@posteo.net> <87355y78fs.fsf@posteo.net> <87fs9ynhyy.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000099dede05f783d410" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8895"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , emacs-devel@gnu.org To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 23 00:32:15 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pf7wF-00025s-Fh for ged-emacs-devel@m.gmane-mx.org; Thu, 23 Mar 2023 00:32:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pf7TP-0000Yv-VI; Wed, 22 Mar 2023 19:02:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pf7TO-0000Ym-Jc for emacs-devel@gnu.org; Wed, 22 Mar 2023 19:02:26 -0400 Original-Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pf7TK-0005Cq-72; Wed, 22 Mar 2023 19:02:25 -0400 Original-Received: by mail-ed1-x52e.google.com with SMTP id r11so79390923edd.5; Wed, 22 Mar 2023 16:02:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679526139; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=d+tzlYaKDu0qhaX6i29XErThZCALwUy5FIA7tyvP/Xc=; b=VViDsebSwwh/50/TvPDp+FeM0Xm/SOCTtNRwlXqfbyYJZHsWF41Vo9iBBTbU8BKs3/ KQpnDYIzQabc3uKni5Ms987bROjEvj+Z0tJAOyGh4deL/ZMYwwQKscc5E5Jg8nnMpKpC DOn9lNrAVGcDsHgpgm2g/xscgNrCm9WWGsEPfLBzCUlAiyIgr68M8IUgF94QWBJxcUsV ETyn02e9WZPCiFPEU+vQk6+78oErmRtFXKceplIX+jHFgwqTlmUtedRhpSTkUXGU3FkE csl82e+LOAOyvkr76QMEXSGtZCzvikG9zGqNopbZTdw00bIWqSl9kZFGXeM4NxAxMEBO PLdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679526139; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=d+tzlYaKDu0qhaX6i29XErThZCALwUy5FIA7tyvP/Xc=; b=DwIQ/TWDND1bXOBG9wasAWhZLOTHTSQph51JaIV32qwPTPlG8l4uVbsZccuLfm1JNO VMzBL6oV2/g5ko8iNIqC6m+xGf9fu6CzCfUax1UsHT6mJqIC+vervjzosUinpLAKNBCx RkAXGiRRpcH0K5eeikfZN7W08+4BZK5F71igAX6eS/zolnelozf6b1ahrqy4b0W5A9bj v/MYwRfDeKStlrBQIMv2Z2QPTCvcMYYMOiciQB34bQi8g259uXME962RnQc+754PQsrH ZwTtuEvXCIOlLT7ExWLOmvr8VIqoY/uu91QMG3RASukXVnhQvKWic2w5inMSe7cUwjcY 1uVg== X-Gm-Message-State: AO0yUKW2Pk/P10ZyrotgdD/kn8rWIsWYt7EVofaCblXlXfhX/kCMXtf0 OyuCuriwLHsQm7MfrOPvWE3Cbdc8NkTERqCn0H71OTg7 X-Google-Smtp-Source: AKy350Y90B3LJe15/QQw3/nfzYDzFd8jdXTi6FYZM8di+wj48FZQa63HkClDibeLmtECLNM8RUwTF2Jdin62e2L4pRI= X-Received: by 2002:adf:f48c:0:b0:2d1:b0df:c027 with SMTP id l12-20020adff48c000000b002d1b0dfc027mr278586wro.4.1679520463181; Wed, 22 Mar 2023 14:27:43 -0700 (PDT) In-Reply-To: <87fs9ynhyy.fsf@posteo.net> Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=dalanicolai@gmail.com; helo=mail-ed1-x52e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:304720 Archived-At: --00000000000099dede05f783d410 Content-Type: text/plain; charset="UTF-8" I have now looked at that manual, but I am not sure if I fully understand it. But I will find out when trying again to create the multi-file package soon. Thanks again for now! On Tue, 21 Mar 2023 at 18:15, Philip Kaludercic wrote: > dalanicolai writes: > > > Thanks for the explanation... > > > > > >> No, the -pkg.el file is generated by ELPA using the information from the > >> main file. There is no need to write it yourself, in fact it is a waste > >> effort since it will be overwritten anyway. Package-vc does the same > >> btw. > >> > > > > I was trying to create a multi-file package, but before submitting it to > > elpa-devel, I was testing locally if I did things correctly. So I > defined a > > 'local archive' in a directory, then uploaded the .tar file to that > > directory/archive, and then checked if installing worked. When doing > > this, it seemed necessary to create the -pkg.el file manually. > > The best way to test it would be to check out elpa.git from > https://git.savannah.gnu.org/cgit/emacs/elpa.git and follow the manual > in there. > > But unless you did something unusual, I would expect it to work (and if > it doesn't, someone here will be able to say why and how to fix it). > > > Anyway, I understand things better now. > > > > Thanks again! > > > > On Tue, 21 Mar 2023 at 10:35, Philip Kaludercic > wrote: > > > >> dalanicolai writes: > >> > >> > Ah okay, I see. > >> > > >> > So I assume that this means that as a function 'define-package' was > >> > redundant, but we should still include a 'define-package' in the > >> > -pkg.el file of a multi file package? > >> > >> No, the -pkg.el file is generated by ELPA using the information from the > >> main file. There is no need to write it yourself, in fact it is a waste > >> effort since it will be overwritten anyway. Package-vc does the same > >> btw. > >> > >> > The initial comment of 'package.el' mentions that the -pkg.el file > >> > should consist of 'a call to' define-package. I would say this > >> > formulation is somewhat confusing/misleading then? > >> > >> You are right, that comment is outdated and should be revised. > >> > >> > Or is the -pkg.el file just outdated? And did I miss the news about > it? > >> > >> No, the file is still required because it contains the package > >> descriptor. The only thing that changed is that instead of the contents > >> being evaluated as code, they are read in and processed manually. > >> Without that file, you will notice that `package-load-descriptor' > >> wouldn't add the package to `package-alist', which in turn means that > >> `package--activate-all' wouldn't activate it. > >> > >> > On Mon, 20 Mar 2023 at 20:32, Philip Kaludercic > >> wrote: > >> > > >> >> Eli Zaretskii writes: > >> >> > >> >> >> From: dalanicolai > >> >> >> Date: Mon, 20 Mar 2023 17:21:04 +0100 > >> >> >> > >> >> >> Can I ask why 'define-package' was marked obsolete? > >> >> > > >> >> > It never did anything useful. Its original implementation just > >> >> > signaled an error. > >> >> > >> >> I just looked up the definition from when package.el was merged[0], > and > >> it > >> >> did stuff, mainly modifying `package-alist'. > >> >> > >> >> [0] > >> >> > >> > https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/emacs-lisp/package.el?id=44198b6ee97bcb0ac88a5cadd1bf9b62048d0156#n513 > >> >> > >> >> -- > >> >> Philip Kaludercic > >> >> > >> > > -- > Philip Kaludercic > --00000000000099dede05f783d410 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have now looked at that manual, but I am not sure i= f I fully understand it.
But I will find out when trying again to= create the multi-file package soon.

Thanks again = for now!

On Tue, 21 Mar 2023 at 18:15, Philip Kaludercic <philipk@posteo.net&g= t; wrote:
dalani= colai <dalani= colai@gmail.com> writes:

> Thanks for the explanation...
>
>
>> No, the -pkg.el file is generated by ELPA using the information fr= om the
>> main file.=C2=A0 There is no need to write it yourself, in fact it= is a waste
>> effort since it will be overwritten anyway.=C2=A0 Package-vc does = the same
>> btw.
>>
>
> I was trying to create a multi-file package, but before submitting it = to
> elpa-devel, I was testing locally if I did things correctly. So I defi= ned a
> 'local archive' in a directory, then uploaded the .tar file to= that
> directory/archive, and then checked if installing worked. When doing > this, it seemed necessary to create the -pkg.el file manually.

The best way to test it would be to check out elpa.git from
https://git.savannah.gnu.org/cgit/emacs/elpa.git= and follow the manual
in there.

But unless you did something unusual, I would expect it to work (and if
it doesn't, someone here will be able to say why and how to fix it).
> Anyway, I understand things better now.
>
> Thanks again!
>
> On Tue, 21 Mar 2023 at 10:35, Philip Kaludercic <philipk@posteo.net> wrote:
>
>> dalanicolai <dalanicolai@gmail.com> writes:
>>
>> > Ah okay, I see.
>> >
>> > So I assume that this means that as a function 'define-pa= ckage' was
>> > redundant, but we should still include a 'define-package&= #39; in the
>> > -pkg.el file of a multi file package?
>>
>> No, the -pkg.el file is generated by ELPA using the information fr= om the
>> main file.=C2=A0 There is no need to write it yourself, in fact it= is a waste
>> effort since it will be overwritten anyway.=C2=A0 Package-vc does = the same
>> btw.
>>
>> > The initial comment of 'package.el' mentions that the= -pkg.el file
>> > should consist of 'a call to' define-package. I would= say this
>> > formulation is somewhat confusing/misleading then?
>>
>> You are right, that comment is outdated and should be revised.
>>
>> > Or is the -pkg.el file just outdated? And did I miss the news= about it?
>>
>> No, the file is still required because it contains the package
>> descriptor.=C2=A0 The only thing that changed is that instead of t= he contents
>> being evaluated as code, they are read in and processed manually.<= br> >> Without that file, you will notice that `package-load-descriptor&#= 39;
>> wouldn't add the package to `package-alist', which in turn= means that
>> `package--activate-all' wouldn't activate it.
>>
>> > On Mon, 20 Mar 2023 at 20:32, Philip Kaludercic <philipk@posteo.net>=
>> wrote:
>> >
>> >> Eli Zaretskii <eliz@gnu.org> writes:
>> >>
>> >> >> From: dalanicolai <dalanicolai@gmail.com>
>> >> >> Date: Mon, 20 Mar 2023 17:21:04 +0100
>> >> >>
>> >> >> Can I ask why 'define-package' was marke= d obsolete?
>> >> >
>> >> > It never did anything useful.=C2=A0 Its original imp= lementation just
>> >> > signaled an error.
>> >>
>> >> I just looked up the definition from when package.el was = merged[0], and
>> it
>> >> did stuff, mainly modifying `package-alist'.
>> >>
>> >> [0]
>> >>
>> https://git.savannah.gnu.org/cgit/emacs.= git/tree/lisp/emacs-lisp/package.el?id=3D44198b6ee97bcb0ac88a5cadd1bf9b6204= 8d0156#n513
>> >>
>> >> --
>> >> Philip Kaludercic
>> >>
>>

--
Philip Kaludercic
--00000000000099dede05f783d410--