Address all coments in @trws's latest comment in PR #869.
I addressed them by factoring the code better to follow the visitor pattern. This will allow actions to be easily added in the future. These may not even be file sytsem views. One could add actions to generate shell init scripts, JSON DAG-dumpers, GraphViz DOT file generators, etc (yes, some of these are alread in there - just to give the idea). Also added is a top-level test $ source share/spack/setup-env.sh $ ./share/spack/examples/test_view.sh Read the top of that script first.
Showing
- lib/spack/spack/cmd/view.py 177 additions, 103 deletionslib/spack/spack/cmd/view.py
- share/spack/examples/test_view.sh 31 additions, 0 deletionsshare/spack/examples/test_view.sh
- var/spack/repos/builtin.mock/packages/test-a/package.py 1 addition, 0 deletionsvar/spack/repos/builtin.mock/packages/test-a/package.py
- var/spack/repos/builtin.mock/packages/test-b/package.py 1 addition, 0 deletionsvar/spack/repos/builtin.mock/packages/test-b/package.py
- var/spack/repos/builtin.mock/packages/test-c/package.py 1 addition, 0 deletionsvar/spack/repos/builtin.mock/packages/test-c/package.py
- var/spack/repos/builtin.mock/packages/test-d/package.py 1 addition, 0 deletionsvar/spack/repos/builtin.mock/packages/test-d/package.py
Loading
Please register or sign in to comment