summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2023-08-15Inline a few functions that are not needed anymoreMassimiliano Culpo1-20/+8
2023-08-15Remove the need for "node_regex"Massimiliano Culpo2-12/+21
2023-08-15Rename method: "root_node" -> "main_node"Massimiliano Culpo2-7/+7
2023-08-15Rename const: "root_node_id" -> "main_node_id"Massimiliano Culpo1-13/+14
2023-08-15Rename atom: "special_case" -> "multiple_nodes_attribute"Massimiliano Culpo1-5/+6
2023-08-15Rename atom: "facts" -> "pkg_fact"Massimiliano Culpo3-87/+87
2023-08-15Simplify "node_has_variant" internal atom.Massimiliano Culpo1-13/+13
2023-08-15Removed leftover TODOsMassimiliano Culpo2-14/+5
2023-08-15Improve handling of cases with cyclesMassimiliano Culpo3-28/+54
To avoid paying the cost of setup and of a full grounding again, move cycle detection into a separate program and check first if the solution has cycles. If it has, ground only the integrity constraint preventing cycles and solve again.
2023-08-15Optimize grounding of "can_inherit_flags"Massimiliano Culpo1-3/+6
2023-08-15Fix computation of max nodesMassimiliano Culpo3-30/+39
2023-08-15Add unit-tests for use cases requiring separate concretization of build depsMassimiliano Culpo2-0/+81
2023-08-15Add a new configuration option to select among different concretization modesMassimiliano Culpo4-48/+191
The "concretizer" section has been extended with a "duplicates:strategy" attribute, that can take three values: - "none": only 1 node per package - "minimal": allow multiple nodes opf specific packages - "full": allow full duplication for a build tool
2023-08-15Fix a few bugs in the encoding when imposing constraints on build deps onlyMassimiliano Culpo1-14/+12
These bugs would show up when we try to split nodes by imposing different targets or different compilers to all build dependencies.
2023-08-15Construct unification sets on demand, improve heuristicMassimiliano Culpo3-31/+79
2023-08-15Reduce the number of unification sets to only twoMassimiliano Culpo1-1/+2
2023-08-15Make cycle detection optional, to speed-up grounding and solvingMassimiliano Culpo3-11/+35
2023-08-15Deduplicate trigger and effect conditions in packagesMassimiliano Culpo2-28/+95
This refactor introduces extra indices for triggers and effect of a condition, so that the corresponding clauses are evaluated once for every condition they apply to.
2023-08-15Extract a function to emit variant rulesMassimiliano Culpo1-20/+23
2023-08-15ASP-based solver: do not optimize on known dimensionsMassimiliano Culpo4-30/+33
All the solution modes we use imply that we have to solve for all the literals, except for "when possible". Here we remove a minimization on the number of literals not solved, and emit directly a fact when a literal *has* to be solved.
2023-08-15Tweak a unit test by allowing a different type of exception to be raisedMassimiliano Culpo1-2/+3
2023-08-15Reduce the dependency types in a solveMassimiliano Culpo1-4/+25
Count the maximum number of nodes based on dependency types
2023-08-15Parametrize all the logic program for multiple nodesMassimiliano Culpo3-77/+185
Introduce the concept of "condition sets", i.e. the set of packages on which a package can require / impose conditions. This currently maps to the link/run sub-dag of each package + its direct build dependencies. Parametrize the "condition" and "requirement" logic to multiple nodes.
2023-08-15Introduce unification setsMassimiliano Culpo1-5/+13
Unification sets are possibly overlapping sets of nodes that might contain at most a single configuration for any package.
2023-08-15Allow clingo to generate edgesMassimiliano Culpo2-20/+33
2023-08-15Rework the encoding to introduce node(ID, Package) nested factsMassimiliano Culpo3-543/+635
So far the encoding has a single ID per package, i.e. all the facts will be node(0, Package). This will prepare the stage for extending this logic and having multiple nodes from the same package in a DAG.
2023-08-15Remove unneeded #defined directivesMassimiliano Culpo1-31/+0
2023-08-15Remove useless ruleMassimiliano Culpo1-5/+0
The version_equivalent fact was deleted in #36347, but the corresponding rule was not removed.
2023-08-15Transform many package related facts to use a nested functionMassimiliano Culpo3-112/+141
Each fact that is deduced from package rules, and start with a bare package atom, is transformed into a "facts" atom containing a nested function. For instance we transformed version_declared(Package, ...) -> facts(Package, version_declared(...)) This allows us to clearly mark facts that represent a rule on the package, and will be of help later when we'll have to distinguish the cases where the atom "Package" is being used referred to package rules and not to a node in the DAG.
2023-08-15spack.caches: uppercase global variables (#39428)Massimiliano Culpo9-23/+24
2023-08-15spack.config: use all caps for globals (#39424)Harmen Stoppels29-160/+147
2023-08-14Windows: executable/path handling (#37762)markus-ferrell4-55/+86
Windows executable paths can have spaces in them, which was leading to errors when constructing Executable objects: the parser was intended to handle cases where users could provide an executable along with one or more space-delimited arguments. * Executable now assumes that it is constructed with a string argument that represents the path to the executable, but no additional arguments. * Invocations of Executable.__init__ that depended on this have been updated (this includes the core, tests, and one instance of builtin repository package). * The error handling for failed invocations of Executable.__call__ now includes a check for whether the executable name/path contains a space, to help users debug cases where they (now incorrectly) concatenate the path and the arguments.
2023-08-14Windows: enable "spack install" tests (#34696)markus-ferrell8-181/+72
* The module-level skip for tests in `cmd.install` on Windows is removed. A few classes of errors still persist: * Cdash tests are not working on Windows * Tests for failed installs are also not working (this will require investigating bugs in output redirection) * Environments are not yet supported on Windows overall though, this enables testing of most basic uses of "spack install" * Git repositories cached for version lookups were using a layout that mimicked the URL as much as possible. This was useful for listing the cache directory and understanding what was present at a glance, but the paths were overly long on Windows. On all systems, the layout is now a single directory based on a hash of the Git URL and is shortened (which ensures a consistent and acceptable length, and also avoids special characters). * In particular, this removes util.url.parse_git_url and its associated test, which were used exclusively for generating the git cache layout * Bootstrapping is now enabled for unit tests on Windows
2023-08-14Fix style issues with latest versions of tools (#39422)Massimiliano Culpo10-20/+19
2023-08-14Fix containerize view symlink issue (#39419)Harmen Stoppels1-10/+11
2023-08-14Fix broken semver regex (#39414)Harmen Stoppels2-9/+36
2023-08-14spack bootstrap dev: detect git as an external (#39417)Harmen Stoppels2-2/+11
#36770 added git as a dependency to `setuptools-scm`. This in turn makes `git` a transitive dependency for our bootstrapping process. Since `git` may take a long time to build, and is found on most systems, try to detect it as an external.
2023-08-13autotools: set 'ldlibs' as 'LIBS' (#17254)Sergey Kosukhin1-1/+2
2023-08-12ci: continue to support SPACK_SIGNING_KEY (#39170)Scott Wittenburg1-6/+5
2023-08-12Python: remove maintainer (#39384)Adam J. Stewart3-9/+4
2023-08-11Revert "package import: remove magic import line (#39183)" (#39380)Todd Gamblin5-46/+43
This reverts commit 8e7c53a8ba32e0793e36e66b5fdac8f4f61e644d.
2023-08-11spack.repo: uppercase the global PATH variable (#39372)Massimiliano Culpo74-246/+246
This makes the name of the global variable representing the repository currently in use uppercase. Doing so is advised by pylint rules, and helps to identify where the global is used.
2023-08-11build(deps): bump mypy from 1.4.1 to 1.5.0 in /lib/spack/docs (#39383)dependabot[bot]1-1/+1
Bumps [mypy](https://github.com/python/mypy) from 1.4.1 to 1.5.0. - [Commits](https://github.com/python/mypy/compare/v1.4.1...v1.5.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-10Windows build systems: use ninja and enable tests (#33589)markus-ferrell2-3/+4
* Set default CMake generator is ninja on Windows * Enable build systems tests (except for autotools/make)
2023-08-10build(deps): bump pygments from 2.15.1 to 2.16.1 in /lib/spack/docs (#39365)dependabot[bot]1-1/+1
Bumps [pygments](https://github.com/pygments/pygments) from 2.15.1 to 2.16.1. - [Release notes](https://github.com/pygments/pygments/releases) - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES) - [Commits](https://github.com/pygments/pygments/compare/2.15.1...2.16.1) --- updated-dependencies: - dependency-name: pygments dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-10build(deps): bump flake8 from 6.0.0 to 6.1.0 in /lib/spack/docs (#39366)dependabot[bot]1-1/+1
Bumps [flake8](https://github.com/pycqa/flake8) from 6.0.0 to 6.1.0. - [Commits](https://github.com/pycqa/flake8/compare/6.0.0...6.1.0) --- updated-dependencies: - dependency-name: flake8 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-10build(deps): bump sphinx-design from 0.4.1 to 0.5.0 in /lib/spack/docs (#39367)dependabot[bot]1-1/+1
Bumps [sphinx-design](https://github.com/executablebooks/sphinx-design) from 0.4.1 to 0.5.0. - [Release notes](https://github.com/executablebooks/sphinx-design/releases) - [Changelog](https://github.com/executablebooks/sphinx-design/blob/main/CHANGELOG.md) - [Commits](https://github.com/executablebooks/sphinx-design/compare/v0.4.1...v0.5.0) --- updated-dependencies: - dependency-name: sphinx-design dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-10Prefix conflict messages with package name (#39106)Aiden Grossman2-4/+6
* Prefix conflict messages with package name This patch prefixes all conflict messages with the package name to alleviate what was otherwise a very manual process. Note that this patch is a one line change but has a fairly outsized impact. * same for requires directive --------- Co-authored-by: Harmen Stoppels <me@harmenstoppels.nl>
2023-08-10Fixed broken calls to _if_ninja_target_execute (#38992)Ricard Zarco Badia1-2/+2
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
2023-08-10Revert "Spec versions: allow `git.` references for branches with `/` ↵Harmen Stoppels3-36/+3
(#38239)" (#39354) This reverts commit 3453259c98c7d39655b8495ca2e3677c51284b43.