summaryrefslogtreecommitdiff
path: root/lib/spack/docs/environments.rst
diff options
context:
space:
mode:
authorpsakievich <psakiev@sandia.gov>2022-08-04 14:20:33 -0600
committerGitHub <noreply@github.com>2022-08-04 13:20:33 -0700
commitd67ead597879aa127158c3b6a1e4ea61a2770d93 (patch)
tree449b32c5362fdef698654a04b95d956cdc086742 /lib/spack/docs/environments.rst
parent3b1401f2921d81740c2d17d96a3b25d7ecb4a299 (diff)
downloadspack-d67ead597879aa127158c3b6a1e4ea61a2770d93.tar.gz
spack-d67ead597879aa127158c3b6a1e4ea61a2770d93.tar.bz2
spack-d67ead597879aa127158c3b6a1e4ea61a2770d93.tar.xz
spack-d67ead597879aa127158c3b6a1e4ea61a2770d93.zip
Add documentation for git refs as versions (#31914)
* document git commit versions Include documentation for manually specifying associated known version * document spack develop command Co-authorerd-by: psakievich <psakiev@sandia.gov> Co-authored-by: Gregory Becker <becker33@llnl.gov> Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
Diffstat (limited to 'lib/spack/docs/environments.rst')
-rw-r--r--lib/spack/docs/environments.rst24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/spack/docs/environments.rst b/lib/spack/docs/environments.rst
index ee95d4f779..4c3f6d1971 100644
--- a/lib/spack/docs/environments.rst
+++ b/lib/spack/docs/environments.rst
@@ -376,6 +376,30 @@ from being added again. At the same time, a spec that already exists in the
environment, but only as a dependency, will be added to the environment as a
root spec without the ``--no-add`` option.
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Developing Packages in a Spack Environment
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The ``spack develop`` command allows one to develop Spack packages in
+an environment. It requires a spec containing a concrete version, and
+will configure Spack to install the package from local source. By
+default, it will also clone the package to a subdirectory in the
+environment. This package will have a special variant ``dev_path``
+set, and Spack will ensure the package and its dependents are rebuilt
+any time the environment is installed if the package's local source
+code has been modified. Spack ensures that all instances of a
+developed package in the environment are concretized to match the
+version (and other constraints) passed as the spec argument to the
+``spack develop`` command.
+
+For packages with ``git`` attributes, git branches, tags, and commits can
+also be used as valid concrete versions (see :ref:`version-specifier`).
+This means that for a package ``foo``, ``spack develop foo@git.main`` will clone
+the ``main`` branch of the package, and ``spack install`` will install from
+that git clone if ``foo`` is in the environment.
+Further development on ``foo`` can be tested by reinstalling the environment,
+and eventually committed and pushed to the upstream git repo.
+
^^^^^^^
Loading
^^^^^^^