You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorial_developer_workflows.rst
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,11 +152,12 @@ The mechanics of how this section is used to enforce develpoment are as follows:
152
152
1. Specs in the environment that ``satisfy`` the develop specs are selected for development.
153
153
2. Any specs selected in step 1 receive a ``dev_path=`` variant.
154
154
This variant tells Spack where to find the source code for the spec.
155
+
Adding the variant modifies the DAG hash of the spec and all of its downstream dependencies.
155
156
3. Calls to ``spack install`` will now use the source code at ``dev_path`` when building that package.
156
157
4. Spack doesn't clean this build up after a successful build so subsequent calls to ``spack install`` trigger incremental builds.
157
158
158
-
If the environment is already concretized ``spack develop`` performs step 1 and 2 in situ and updates the ``spack.lock`` file unless the ``--no-modify-concrete-specs`` option is passed.
159
-
If ``--no-modify-concrete-specs`` is passed, the environment is not yet concretized, or needs to be futher changed to satisfy the develop specs (i.e. change version of the package) then selection of develop specs and assignment of ``dev_path`` are handled by the concretizer.
159
+
If the environment is already concretized ``spack develop`` performs step 1 and 2 in situ and updates the ``spack.lock`` file by default.
160
+
If the environment is not yet concretizedthe selection of develop specs and assignment of ``dev_path`` are handled during concretization.
160
161
161
162
So how does Spack determine the value of the ``dev_path`` variant?
162
163
By default, the source code is downloaded into a subdirectory of the environment using Spack's staging functionality.
@@ -211,9 +212,10 @@ Multi-package development
211
212
-------------------------
212
213
213
214
You may have noticed that ``macsio`` is restaged and fully rebuilt each time we call ``spack install``.
214
-
This is an unnecessary expense for cross package development.
215
-
Luckily, Spack has tools to reduce this expense.
216
-
We will use this as an opportunity to introduce another ``spack develop`` feature: the ``--recursive`` option.
215
+
Usually developers do not want to fully rebuild the canonical source every time; either for performance or because they are co-developing the two packages.
216
+
Spack does not limit how many packages can be developed so ``spack develop`` can be applied to any spec in our environment including ``macsio``.
217
+
The ``--recursive`` option provides a convenient way to mark all downstream dependencies as develop specs.
218
+
217
219
218
220
.. literalinclude:: outputs/dev/develop-5.out
219
221
:language: console
@@ -230,11 +232,8 @@ So far all of our calls to ``spack develop`` have been on a concretized environm
230
232
If we don't want Spack to update the concrete environment's specs we can pass the ``---no-modify-concrete-spec``.
231
233
Using ``---no-modify-concrete-spec`` will require you to force concretize an environment to have the develop specs take affect.
232
234
233
-
Examples of where we might want to use this feature are:
234
-
- The package we wish to develop is repeated in our environment and we need to be more selective.
235
-
- We want to mark a develop spec that doesn't exist yet in the environment.
236
-
237
-
We will show an example of the latter, and how to update the local source if you decide to change the version.
235
+
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.
238
237
Let's say we plan to extend our environment to develop the ``nekbone`` package.
0 commit comments