Skip to content

Clingo should try harder to avoid deprecated packages #22351

@haampie

Description

@haampie

Steps to reproduce the issue

$ spack spec slurm | grep glib
    ^[email protected]

but this version of glib is marked as deprecated.

I can nudge clingo into taking a newer version of glib:

$ spack spec slurm ^[email protected]: | grep glib
    ^[email protected]

and it concretizes fine to the latest glib.

The problem is that [email protected] depends on meson whereas [email protected] does not, and this ultimately pulls in a virtual dependency on uuid only for the former.

Apparently clingo prefers fewer virtual dependencies over newer versions, so it ends up preferring [email protected] even though it is deprecated.

When setting variant('uuid', default=False, description='Build uuid module') by default in Python, spack spec slurm concretizes to using [email protected] indeed.

So I think there's 2 issues:

  • Clingo should try to prefer new versions over fewer virtual deps
  • Clingo should avoid concretizing to deprecated packages when there is an alternative

Information on your system

  • Spack: 0.16.0-1812-8d2944bf77
  • Python: 3.8.7
  • Platform: linux-ubuntu20.04-zen2
  • Concretizer: clingo

Additional information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions