Skip to content

Clingo loses external information in Specs #24506

@Paul-Ferrell

Description

@Paul-Ferrell

In working on a new unittest for the checking spec install status, I discovered that when clingo concretizes a spec with an
external_path defined that information is lost. This appears to happen because the spec objects generated by the Clingo solver don't maintain that information, and the original spec has those attributes overwritten by the concretized Spec via the ._dup() method. It's likely that other crucial information from the original Spec isn't preserved as well.

Steps to reproduce the issue

While using the clingo concretizer:

spec = Spec("myspec", external_path='/foo/bar')
print(spec.external_path, spec.external)
spec.concretize()
print(spec.external_path, spec.external)

Error Message

N/A

Information on your system

Clingo doesn't bootstrap on my system, so I ended up debugging this slowly through github unittests.

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
  • I have run the failing commands in debug mode and reported the output

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingconcretizationconcretizer-use-caseinteresting dependency hierarchy that would challenge the current concretizerimpact-low

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions