Subject: Re: bug#78844: 30.1; feature request: public interface for querying builtin packages and versions

From: Xiyue Deng <[email-masked]>
Date: Sat, 28 Jun 2025 14:03:52 -0700

Hi Stefan,

Stefan Monnier <[email-masked]> writes:

>> The renaming could be fine if the intended users of this API will
>> indeed only want to know about versioned built-in packages, and won't
>> care about those who have no versions.  Is that in fact true?  If so,
>> why aren't unversioned packages important?
>
> FWIW, I'd consider it an error if an entry in
> `package--builtin-versions` has a nil "version".
> There are no such things as "unversioned packages" in this respect.
> So, I think the code is OK but the docstring should not mention that
> we return nil for packages without a version.
>

I think in principle you are correct given that the current public
functions don't provide a way to obtain such a symbol.  But it's
possible that someone can construct a symbol, either by hand or through
a new interface that queries all builtin packages, which is in
`package--builtins' but not in `package--builtin-versions', and the
function will return nil.  Do you think it's worth keeping such
possibility into consideration?

>         Stefan

-- 
Regards,
Xiyue Deng