Skip to content

Commit 3f9ec7e

Browse files
committed
Update for variant change
Signed-off-by: psakiev <[email protected]>
1 parent 741c220 commit 3f9ec7e

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

outputs/dev.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,13 @@ example dev/develop-4 "spack install"
4242
example dev/develop-5 "spack develop --recursive scr"
4343
example dev/develop-5 "spack find -cv macsio"
4444

45-
example dev/develop-6 "spack develop nekbone"
46-
example dev/develop-6 "# Not the verison we wanted. This time lets add a version"
47-
example dev/develop-6 "spack develop --force [email protected]"`
45+
fake_example dev/develop-6 "spack develop scr build_type=Debug"
46+
spack develop scr build_type=Debug
47+
example dev/develop-6 "spack develop --no-modify-concrete-specs macsio build_type=Debug"
48+
49+
example dev/develop-7 "# Not the verison we wanted. This time lets add a version"
50+
example dev/develop-7 "spack develop --no-modify-concrete-specs [email protected] build_type=Debug"
51+
example dev/develop-7 "spack concretize --force"
4852

4953
example dev/otherdevel "cd ~"
5054
cd ~ || exit

tutorial_developer_workflows.rst

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,24 @@ If we don't want Spack to update the concrete environment's specs we can pass th
233233
Using ``---no-modify-concrete-spec`` will require you to force concretize an environment to have the develop specs take affect.
234234

235235
There are a limited set of use-cases where one might want to use this option.
236-
It can be useful for debugging unexpected behavior and For illustrative purposes We will show an example of adding a develop spec that is not yet in the environment, and how to update the local source if you decide to change the version.
237-
Let's say we plan to extend our environment to develop the ``nekbone`` package.
236+
Some example cases include:
237+
238+
- Updating a develop spec before updating the environment to change a variant or version
239+
- Adding a develop spec that is not yet in the environment
240+
- Debugging unexpected behavior
241+
242+
For illustrative purposes we will show an example of switching ``scr`` to a debug build via the ``build_type=Debug`` variant.
238243

239244
.. literalinclude:: outputs/dev/develop-6.out
240245
:language: console
241246

242-
The ``spack develop`` command only has any effect if the developed package appears in the environment, as a root or dependency.
243-
Some additional concerns to use the ``spack develop`` command effectively:
247+
We see that naively updating the develops spec, resulted first in an error and then an undesired version change.
248+
To preserve the version and get the new variant added we run the following commands:
249+
250+
.. literalinclude:: outputs/dev/develop-7.out
251+
:language: console
252+
253+
Some additional concerns to navigate for effective use of the ``spack develop`` command include:
244254

245255
* ``spack add <package>`` with the matching version you want to develop is a way to ensure the develop spec is satisfied in the ``spack.yaml`` environments file.
246256
* If the spec is not already concrete in the environment, you need to provide Spack a spec version so it can supply the correct flags for the package's build system.

0 commit comments

Comments
 (0)