-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Clingo loses external information in Specs #24506
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingconcretizationconcretizer-use-caseinteresting dependency hierarchy that would challenge the current concretizerinteresting dependency hierarchy that would challenge the current concretizerimpact-low
Description
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 reportand 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingconcretizationconcretizer-use-caseinteresting dependency hierarchy that would challenge the current concretizerinteresting dependency hierarchy that would challenge the current concretizerimpact-low
Type
Projects
Status
Todo