Proposal: Ignore sub-minor version components in package id

Joachim Breitner mail at joachim-breitner.de
Tue Nov 8 15:39:52 CET 2011


Hi Duncan,

Am Dienstag, den 08.11.2011, 12:25 +0000 schrieb Duncan Coutts:
> On Mon, 2011-10-03 at 13:18 +0200, Joachim Breitner wrote:
> > I’d like to propose that the package (shown by "ghc-pkg field <pkg> id"
> > and used by "ghc-pkg field <pkg> depends") should only consist of the
> > first three components of the package version, not all of them.
> 
> So I agree with your aims but I suggest a different approach.
> 
> Also, we're conflating issues here:
> 
> The "id" field (or the InstalledPackageId in Cabal parlance) is used to
> uniquely identify each package.
> 
> This is not the same thing as an ABI.
> 
> Note that currently, confusingly, the package id that Cabal creates (for
> ghc) is made up of the package name, version and abi hash. This makes
> people think it is an abi identifier when it is not.
> 
> We need (in future) to be able to distinguish different packages that
> share the same ABI. So what needs to happen is that we include the ABI
> as a separate field in the package db. That abi need not contain the
> version number at all, it can be just some abi hash.
> 
> Then whether the dependencies should then use an installed package id or
> a package abi is an interesting question. I think the right thing is to
> use installed package ids. Just because it would be possible to update a
> dependency to use the latest-ABI compatible version doesn't mean that it
> should be immediate and automatic. Indeed it would prevent us from
> having a persistent package database, as adding new packages would
> change the meaning of existing packages. Switching to a later
> ABI-compatible version of a dependency should be a deliberate act. Hence
> we should use installed package ids for dependencies.

thanks for your feedback. I’m not sure how your approach helps with my
aim, which is: I want to be able to upgrade dependencies without having
to recompile depending packages, unless the ABI changes.

If the depends field of an installed package refers to the package id,
then either I have to rebuild the package; or a new operation “use newer
package with the same ABI” needs to be introduced, which would change
the depends field of an installed package to a new id, under the
provision that the ABI is the same. Is that what you are hinting at?

Greetings,
Joachim
-- 
Joachim "nomeata" Breitner
  mail at joachim-breitner.de  |  nomeata at debian.org  |  GPG: 0x4743206C
  xmpp: nomeata at joachim-breitner.de | http://www.joachim-breitner.de/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/libraries/attachments/20111108/feb879e4/attachment.pgp>


More information about the Libraries mailing list