Remove support for generating dotkit files (#11986)

Dotkit is being used only at a few sites and has been deprecated on new
machines. This commit removes all the code that provide support for the
generation of dotkit module files.

A new validator named "deprecatedProperties" has been added to the
jsonschema validators. It permits to prompt a warning message or exit
with an error if a property that has been marked as deprecated is
encountered.

* Removed references to dotkit in the docs
* Removed references to dotkit in setup-env-test.sh
* Added a unit test for the 'deprecatedProperties' schema validator
This commit is contained in:
Massimiliano Culpo
2019-10-03 07:15:01 +02:00
committed by Todd Gamblin
parent b11984767b
commit 76b9c56110
34 changed files with 121 additions and 426 deletions

View File

@@ -5,27 +5,27 @@
########################################################################
# This is a wrapper around the spack command that forwards calls to
# 'spack use' and 'spack unuse' to shell functions. This in turn
# allows them to be used to invoke dotkit functions.
# 'spack load' and 'spack unload' to shell functions. This in turn
# allows them to be used to invoke environment-modules functions.
#
# 'spack use' is smarter than just 'use' because it converts its
# arguments into a unique spack spec that is then passed to dotkit
# 'spack load' is smarter than just 'load' because it converts its
# arguments into a unique Spack spec that is then passed to environment-modules
# commands. This allows the user to use packages without knowing all
# their installation details.
#
# e.g., rather than requring a full spec for libelf, the user can type:
# e.g., rather than requiring a full spec for libelf, the user can type:
#
# spack use libelf
# spack load libelf
#
# This will first find the available libelf dotkits and use a
# This will first find the available libelf module file and use a
# matching one. If there are two versions of libelf, the user would
# need to be more specific, e.g.:
#
# spack use libelf@0.8.13
# spack load libelf@0.8.13
#
# This is very similar to how regular spack commands work and it
# avoids the need to come up with a user-friendly naming scheme for
# spack dotfiles.
# spack module files.
########################################################################
# accumulate initial flags for main spack command
set _sp_flags = ""
@@ -104,8 +104,6 @@ case env:
breaksw
endsw
endif
case use:
case unuse:
case load:
case unload:
set _sp_module_args=""""
@@ -115,22 +113,10 @@ case unload:
set _sp_spec = ($_sp_spec)
endif
# Here the user has run use or unuse with a spec. Find a matching
# Here the user has run load or unload with a spec. Find a matching
# spec using 'spack module find', then use the appropriate module
# tool's commands to add/remove the result from the environment.
switch ($_sp_subcommand)
case "use":
set _sp_full_spec = ( "`\spack $_sp_flags module dotkit find $_sp_spec`" )
if ( $? == 0 ) then
use $_sp_module_args $_sp_full_spec
endif
breaksw
case "unuse":
set _sp_full_spec = ( "`\spack $_sp_flags module dotkit find $_sp_spec`" )
if ( $? == 0 ) then
unuse $_sp_module_args $_sp_full_spec
endif
breaksw
case "load":
# _sp_module_args may be "-r" for recursive spec retrieval
set _sp_full_spec = ( "`\spack $_sp_flags module tcl find $_sp_module_args $_sp_spec`" )