Skip to content

Handle "just dependencies" better #8

@brettviren

Description

@brettviren

This may be an issue for Spack itself and not so much wire-cell-spack.

It is desirable to use a Spack view to both aggregate spack-installed packages providing the dependencies for developing a package as well as a location for developers to install that package using its native build system.

Specifically we want such a Spack view for developing WCT.

Ideally we may form this view so that it excludes the spack-installed version of WCT. This is because the Spack-installed files may be found during the native build of WCT and lead to some version mismatch problems..

The following options exist to have our cake and eat it too but all are imperfect.

Install, view and purge

spack install wire-cell-toolkit
spack view add -i local wire-cell-toolkit
rm local/include/WireCell* local/lib/libWireCell*

This suffers from taking time to install WCT only to remove it and needing to manually remove correct files.

Install and view of just dependencies

spack install wire-cell-dependencies
spack view add -i local wire-cell-dependencies

A Spack package wire-cell-dependencies was made to install everything but WCT. It consists of a copy-paste of most of wire-cell-toolkit Spack package.py and so is a source of drift over time (update one copy and not the other). In principle, we could make w-c-t depend on w-c-d to avoid this source of drift but then we'd need to version the dependencies in w-c-d as well as the dependency on w-c-d in w-c-t which feels confusing.

Install, view but exclude

spack install wire-cell-toolkit
spack view -e wire-cell-toolkit add -i local wire-cell-toolkit

This makes use of a feature to build a view on a seed but exclude that seed. It still suffers in that the spack install takes a bit longer than needed to install the ignored WCT.

There is spack install --only dependencies wire-cell-toolkit to avoid that but then the spack view will not work as it requires the seed to have been instantiated even when ignred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions