Spack: Spack should complain if entries in packages.yaml are virtual packages

Created on 21 Oct 2016  路  2Comments  路  Source: spack/spack

We currently allow users to do this:

packages:
  blas:
    blas: /some/path
    buildable: False
  lapack:
    lapack: /some/path
    buildable: False

blas and lapack above are virtual dependencies, but they should be concrete implementations.

Spack should complain when this happens so that users don't spend a lot of time trying to debug this mistake.

On the other hand, it's pretty obvious what the _intent_ is when users do this. They want to do something like:

packages:
  all:
    providers:
      blas: <some-blas>
      lapack: <some-lapack>
  <some-blas>:
    <some-blas>@<some-version>: /some/path
    buildable: False
  <some-lapack>:
    <some-lapack>@<some-version>: /some/path
    buildable: False

The problem is we have no idea which implementation <some-lapack> and <some-blas> are just from looking at the syntax at top -- Spack would need to auto-detect the implementation at /some/path.

We should revisit this when we look at auto-detecting system packages as discussed in #2020.

blas-lapack-scalapack bug discussion xSDK

Most helpful comment

Can't we code a cli command to edit external packages in packages.yaml ? Something like:

spack external-package add <package> --path=<path>
spack external-package remove <package>
spack external-package list

Then going through the CLI it should be easy to intercept this kind of errors.

All 2 comments

Can't we code a cli command to edit external packages in packages.yaml ? Something like:

spack external-package add <package> --path=<path>
spack external-package remove <package>
spack external-package list

Then going through the CLI it should be easy to intercept this kind of errors.

@alalazo See #2507.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adamjstewart picture adamjstewart  路  33Comments

davydden picture davydden  路  36Comments

citibeth picture citibeth  路  49Comments

hartzell picture hartzell  路  31Comments

davydden picture davydden  路  38Comments