[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] scratch/package-fix e5d5cdf 1/2: emacs-lisp/package.el
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] scratch/package-fix e5d5cdf 1/2: emacs-lisp/package.el: Indicate incompatible packages. |
Date: |
Thu, 12 Feb 2015 09:41:01 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
>> > + ((not (package--compatible-p pkg-desc)) "incompat")
>> Of course, this should be transitive: if one of the required packages is
>> "incompat", then the package is also "incompat".
> Ideally, yes. That's why I factored it out as a function.
> However, this is called on each package about to be printed, and checking
> whether the dependencies are available imposes a performance cost that I'm
> not sure we should pay. The time for printing the package list will go from
> linear to quadratic in the number of packages.
I understand, I was just pointing out that this current solution
is incomplete. I expect that it's sufficient for now.
The algorithmic problem is quite real, indeed.
We could solve it by adding a "compatible" field to the struct, which
we'd set to `yes' or `no' (so as to memoize previous computations), so
the complexity would stay linear in the number of packages (though also
linear in the number of number of `requires').
Stefan