summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2019-08-07bugfix: spack stacks mixed dependency and non-dep constraints (#12315)Greg Becker1-1/+1
Spack stacks drop invalid dependencies applied to packages by a spec_list matrix operation Without this fix, Spack would raise an error if orthogonal dependency constraints and non-dependency constraints were applied to the same package by a matrix and the dependency constraint was invalid for that package. This is an error, fixed by this PR. An example failing configuration: spack: definitions: - packages: [libelf, hdf5+mpi] - compilers: ['%gcc'] - mpis: [^openmpi] specs: - matrix: - $packages - $compilers - $mpis
2019-08-07compiler bootstrapping: enable both single-node and multi-node DAGS(#12310)Peter Scheibel1-7/+15
5f74f22 enabled installing compilers for dependencies but not for the root package (and in particular not for DAGs which consist of one package) this enables bootstrapping compilers for both types of DAGs
2019-08-06tests: explain and test dependency flattening routines (#11993)Tamara Dahlgren2-1/+44
- Add comments to explain that `install_dependency_symlinks` and `flatten_dependencies` are actually used. - Add a test that exercises the routines.
2019-08-06mirrors: mirror config should use spack variable expansions (#9027)Greg Becker2-9/+17
- ensure that `$spack` and other variables are substituted into mirror paths
2019-08-06stacks: fix reference handling in env.write() (#12096)Greg Becker2-2/+27
* stacks: Fix env.write to properly write references * stacks: regression test for 12095
2019-08-03Fix typo in config (#12267)Pariksheet Nanda1-1/+1
Using "compilers" with the "s" is an invalid config section and throws an error. Traceback (most recent call last): File "spack/bin/spack", line 48, in <module> sys.exit(spack.main.main()) File "/home/omsai/src/libkmap/spack/lib/spack/spack/main.py", line 633, in main env = ev.find_environment(args) File "/home/omsai/src/libkmap/spack/lib/spack/spack/environment.py", line 263, in find_environment return Environment(env) File "/home/omsai/src/libkmap/spack/lib/spack/spack/environment.py", line 534, in __init__ self._read_manifest(f) File "/home/omsai/src/libkmap/spack/lib/spack/spack/environment.py", line 561, in _read_manifest self.yaml = _read_yaml(f) File "/home/omsai/src/libkmap/spack/lib/spack/spack/environment.py", line 402, in _read_yaml validate(data, filename) File "/home/omsai/src/libkmap/spack/lib/spack/spack/environment.py", line 395, in validate e, data, filename, e.instance.lc.line + 1) spack.config.ConfigFormatError: /home/omsai/src/libkmap/spack.yaml:15: Additional properties are not allowed ('compilers' was unexpected)
2019-08-03Fix CNL version detection (#12207)Adam J. Stewart2-6/+76
2019-08-02Refactor UI logic out of Environment.concretize (#12213)Massimiliano Culpo4-15/+34
Environment.concretize returns newly-concretized specs rather than printing them; as a result, the _display argument is removed from Environment.concretize (originally only used to avoid printing specs during unit testing). Command logic which invokes Environment.concretize prints these explicitly.
2019-08-01Fix QT4 build for mac (#10944)Seth R. Johnson1-2/+2
This updates the Spack QT package to enable building qt version 4 on MacOS. This includes the following changes to the qt package: * add version 4.8.7 * add option to build with or without shared libs * add options to disable tools, ssl, sql, and freetype support * add qt4-tools patch when building qt@4+tools * add option to build as a framework (only available on MacOS) * replace qt4-el-capitan patch with qt4-mac patch (which includes the edits from qt4-el-capitan) * apply qt4-pcre-include-conflict.patch only for version 4.8.6 (rather than all 4.x versions) * apply qt4-gcc-and-webkit.patch for 4.x versions before 4.8.7 and create a separate qt4-gcc-and-webkit-487.patch for version 4.8.7 * update patch function for qt@4 on MacOS to update configure variables relevant to Spack (e.g. PREFIX) * add option to build freetype with Spack, as a vendored dependency of QT, or not at all (default is to build with Spack) This includes the following edits outside of the qt package: * Update MacOS version utility function to return all parts of the Mac version (rather than just the first two) * gettext package: implement "libs" * python package: add gettext as a dependency
2019-08-01Buildcache: skip binary string replacement with padding when the new install ↵Patrick Gartung1-5/+32
path is longer than the old install path. (#12227) * Raise an exception and exit with a meaningful message when binary path substitution fails. * Skip binary text replacement with padding and issue a warning when the new install path is longer than the old install path.
2019-07-31should not need bin prefix on spack command (#12215)Levi Baber1-1/+1
2019-07-31docs: update tutorial slides for PEARC19Todd Gamblin1-9/+9
2019-07-31Update Package Creation Tutorial for PEARC19 (#12209)Adam J. Stewart7-233/+235
* Update Package Creation Tutorial for PEARC19 * A few remaining fixes * Fix section link
2019-07-31CMake: make ninja verbose as well (#12200)Christoph Junghans1-0/+1
2019-07-31Print environment name when removing active env (#12198)Javier Cervantes1-1/+2
2019-07-31Fix Sphinx deprecation warning when building docs (#12205)Adam J. Stewart1-3/+2
* Fix Sphinx deprecation warning when building docs * Set minimum required version of Sphinx
2019-07-30Add SIPPackage base class (#12157)Adam J. Stewart8-0/+279
2019-07-29Typo fixes in Environments Tutorial (#12107)Adam J. Stewart1-11/+11
2019-07-29intel: Add mpicc wrapper bindir to dependent env (#12132)Greg Becker1-0/+5
2019-07-25use Excecutable instead of exec for editing licenses (#11968)Gregory Lee1-2/+21
* fix defunct editor exit in #11691
2019-07-24new command: `spack maintainers` queries package maintainersTodd Gamblin2-0/+251
- We don't currently make enough use of the maintainers field on packages, though we could use it to assign reviews. - add a command that allows maintainers to be queried - can ask who is maintaining a package or packages - can ask what packages users are maintaining - can list all maintained or unmaintained packages - add tests for the command
2019-07-24tests: Test install of unconcretized spec (#12099)Tamara Dahlgren1-0/+17
2019-07-24Fixed a name clash in the 'from_environment_diff' function (#12116)Massimiliano Culpo2-12/+18
* Added a unit test reproducing the failure in 12085 * Fixed name clash in the 'from_environment_diff' function The bug reported in #12085 stemmed from a name clash among variables, introduced during the refactor in #10753 and not caught by unit tests and reviews.
2019-07-23Typo fixes in Spack Environments docs (#12100)Adam J. Stewart1-17/+17
2019-07-23 error messages: include whole spec for "no externals found" message (#12070)Greg Becker1-2/+2
* Provide better error message when matching externals are found for package marked not buildable
2019-07-23hashing: fix caching of dependency hashes in to_node_dictGregory Becker2-11/+17
2019-07-22commands: add tests for all subcommands of `spack pkg`Todd Gamblin3-24/+271
2019-07-22commands: add `spack pkg changed` subcommand, better test supportTodd Gamblin1-10/+55
- Add `spack pkg changed` to show changed and added packages for a commit. - Make `spack pkg` support tests better.
2019-07-22gcc: support without command line tools (#11040)Denis Davydov1-0/+8
2019-07-22Fix version scraping for CRAN packages (#12021)Adam J. Stewart2-20/+20
* Fix version scraping for CRAN packages * Remove set literals
2019-07-22bugfix: env.write() should stringify Spec lists.Todd Gamblin2-2/+8
- Setting specs from lockfiles was not correctly stringifying concretized user specs. - Fix `_set_user_specs_from_lockfile` - Add some validation code to `SpecList` constructor
2019-07-22hashes: consolidate and make hashing logic more consistentPeter Josef Scheibel8-84/+254
Spack has evolved to have three types of hash functions, and it's becoming hard to tell when each one is called. Whlie we aren't yet ready to get rid of them, we can refactor them so that the code is clearer and easier to track. - Add a `hash_types` module with concise descriptors for hashes. - Consolidate hashing logic in a private `Spec._spec_hash()` function. - `dag_hash()`, `build_hash()`, and `full_hash()` all call `_spec_hash()` - `to_node_dict()`, `to_dict()`, `to_yaml()` and `to_json()` now take a `hash` parameter consistent with the one that `_spec_hash()` requires. Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
2019-07-22env: environments index specs by full DAG w/build depsPeter Josef Scheibel3-30/+257
- ensure that Spec._build_hash attr is defined - add logic to compute _build_hash when it is not already computed (e.g. for specs prior to this PR) - add test to ensure that different instance of a build dep are preserved - test conversion of old env lockfile format to new format - tests: avoid view creation, DAG display in tests using MockPackage - add regression test for more-general bug also fixed by this PR - update lockfile version since the way we are maintaining hashes has changed - write out backup for version-1 lockfiles and test that
2019-07-20Add OpenMP flag for Apple Clang (#12049)Adam J. Stewart2-5/+3
2019-07-20tests: speed up tests that rely on the database fixture (#12031)Massimiliano Culpo6-61/+95
The database and mutable_database fixtures were installing and uninstalling the same specs multiple times to ensure the database for tests has the correct state. This commit optimizes the procedure by caching the state in an external directory, and copying it in instead of going through the installation or uninstallation again. The database fixture is meant not to be modified by tests. This commit enforces this invariant by making the database read-only before starting the test. * Added missing db markers to tests * Added test for uninstall_by_spec * `database` fixture now returns a read-only database * Tests that modify the DB now use `mutable_database` fixture
2019-07-20environment views: refactor stripping build deps (#12069)Greg Becker1-3/+1
2019-07-20compilers: don't raise errors for duplicate compiler definitions (#11910)Greg Becker2-1/+29
Summary: - Allow multiple definitions of compiler in compilers.yaml (use first instance) - Still print debug messages when there are duplicates, to assist users in finding this issue. Merging configs from different scopes can result in multiple compiler being present in the same configuration list. Instead of raising when there are duplicates, take the one with highest precedence. Print a debug message instead of raising, so that we can still diagnose this. We don't have a good way of warning the user about inconsistent configuration *in the same file* -- we'd need to dig into YAML file/line info for that.
2019-07-20environments: add activate/deactivate tests, work wtih `set -u`Todd Gamblin2-6/+54
- [x] Add shell tests to ensure that `spack env activate`, `spack env deactivate`, and `despacktivate` continue to work. - [x] Also ensure that activate and deactivate both work with `set -u`
2019-07-19Package inheritance: Find patch files defined in parent classes using MRO ↵Greg Becker3-1/+40
(#12051) Fixes #8908, 11844 Use Python MRO to find patch files from parent classes.
2019-07-19Fix #11240 (#11995)albestro2-1/+37
* extends mkdirs with permissions for intermediate folders Does not use os.makedirs mode parameter because its behavior is changed with Python 3.7 (it ignores it for intermediate dirs), and moreover it was not possible to set different modes for newly-created folders and leaf folder. reference: - https://bugs.python.org/issue19930 - https://docs.python.org/3.7/library/os.html#os.makedirs * comment mkdirp step easing code understanding * revert mkdir to default for package metapath since metapath is nested in package folder, there is no need to specify permissions for intermediate folders because the prefix already exists. * comment create_install_directory package modes
2019-07-18concretization: fix transient hang in python 3.5Gregory Becker1-1/+2
Bug relates to the interplay between: 1. random dict orders in python 3.5 2. bugfix in initial implementation of stacks for `_concretize_dependencies` when `self._dependencies` is empty 3. bug in coconcretization algorithm computation of split specs Result was transient hang in coconcretization. Fixed #3 (bug in coconcretization) to resolve.
2019-07-18stacks: add option to link only roots or all specs, default to allGregory Becker3-37/+134
2019-07-18stacks: refactor view descriptors into a separate objectGregory Becker2-105/+123
2019-07-18refactor: clean up Environment classGregory Becker2-74/+65
- remove redundant code in Environment.__init__ - use socket.gethostname() instead of which('hostname') - refactor updating SpecList references - refactor 'specs' literals to a single variable for default list name - use six.string_types for python 2/3 compatibility
2019-07-18bugfix: spec lists can now include multiple referencesGregory Becker2-3/+3
2019-07-18stacks: use new format string syntax in environments codeGregory Becker4-11/+12
- Change old spec expressions to use Spack's new spec formatting sytnax.
2019-07-18docs: Add documentation for views in environmentsGregory Becker2-3/+145
2019-07-18stacks: update view management for multiple/combinatorial viewsGregory Becker7-81/+404
This adds notion of a default view, other views in environments
2019-07-18stacks: environment add/remove respect multiply-defined listsGregory Becker2-7/+53
2019-07-18stacks: allow force-removing from a speclist used in a matrixGregory Becker2-12/+21