Hi, Чт 30 апр 2020 @ 11:40 Jan Wielemaker <j.wielema...@vu.nl>:
> Hi Jonas, > > 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? Jan, is this hash computed only for Core_system cmake component or other components are involved too? Please, could you take a look into #959027. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959027 Jan, in case you'd like to contribute into discussion of #959027, please let's keep it separate from this (#958419) bug report. In this case please CC 958...@bugs.debian.org. Cheers! Lev