Quoting Lev Lamberov (2020-04-30 12:16:31)
> Чт 30 апр 2020 @ 11:40 Jan Wielemaker <j.wielema...@vu.nl>:
> > On 4/28/20 5:26 PM, Jonas Smedegaard wrote:
> >> Quoting Jan Wielemaker (2020-04-28 16:56:30)
> >
> >>> That is worth a try.  I guess that implies that generating 
> >>> SWI-Prolog (as package) also generates this hash.  What kind of 
> >>> support would be needed from SWI-Prolog to make this work?  Some 
> >>> script/command to create this hash for a particular system?
> >> 
> >> Thanks for your interest in this challenge :-)
> >> 
> >> Yes, if ABI is computed during build then what would be helpful is 
> >> to extend that to expose the computed ABI as a single string.  
> >> Maybe add it as an additional note in output of "swipl --version"?
> >> 
> >> Or if possible to (re)compute at runtime then just document that, 
> >> for us distribution maintainers to integrate into our packaging 
> >> routines.
> >
> > I think I cover this nicely now:
> >
> > janw (linux; master) 68_> swipl --abi_version
> > swipl-2-67-792e14f8-de23899e
> >
> > There is a section in the docs explaining the various binary ABIs 
> > and what aspects rely on them.  There is a new function PL_version() 
> > in the C api that can be used to query the versions individually.
> > The above says:
> >
> >    - Backward compatibility version of the foreign interface is 2
> >    - Saved state file format can be loaded when not older than 67
> >    - 792e14f8 is a fingerprint for the C-defined foreign predicate
> >      signatures.
> >    - de23899e is a fingerprint of the VM instructions and their
> >      signatures.
> 
> That's nice. Thanks for your work!
> 
> Jonas, what do you think about the format? I looked into your examples 
> (uwsgi-plugin-php and asterisk-espeak), these packages use 
> alphanumeric strings as hashes; and IIRC haskell packages also use 
> alphanumeric hashes (but significantly shorter). Of cource we can drop 
> dashes and 'swipl' from the output of swipl --abi_version during 
> build. Or it's better to have alphanumeric string as output of swipl 
> --abi_version?

I think we can use the format almost as-is - just replacing the leading 
"swipl-" with "swi-prolog-abi-".

Maybe sensible to provide not opnly the full ABI but also each of the 4 
more specific ABIs as separate virtual packages, but let's postpone that 
for a brighter future with lots of consuming packages each of them 
needing only some of those specific ABI parts. :-)


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: signature

Reply via email to