spack load x should load x + runtime deps by default#25732
spack load x should load x + runtime deps by default#25732haampie wants to merge 1 commit intospack:developfrom
spack load x should load x + runtime deps by default#25732Conversation
change the default of --only=package,dependencies to --only=package, since it already loads the runtime deps of the package anyways, and why would you ever want to load the build deps of the run deps of the build deps of your spec?
|
@becker33 can you comment on this? The failing test says: but For more context see #25723 (comment) |
|
@haampie Results (minutes:seconds) for four trials of the
|
|
This is confusing... it's strictly slower? It's also strictly doing less work than develop... For me after Develop: 695 ms ± 4.19 ms per loop (mean ± std. dev. of 7 runs, 1 loop each) That's 86% faster... Curiously though I don't see much speedup from the command line: |
|
Looks on par with Anyway, it was pretty clear for me that I wasn't getting much benefit for the recursive load of ~100 |
|
And yeah, we're using command line ( |
|
Right... maybe the packages you're loading specify At any rate, I'm confused why |
|
A focus on linking/"including" sounds like a reasonable description of what we have yeah--after all, at least on our end, we really just want CMake to be able to find what Edit: although we do need some binary paths accessible I think--like spack-built Python for example. |
|
Okay, so what I've found is: there's 0.6s (!) difference between querying So, disambiguate spec is the bulk of the time. |
spack load x should load x + runtime deps by default

This PR requires #25755 (we need
setup_run_environmentto be called on dependencies)The current default of
spack load xis to load all dependencies, including build deps of build deps of build deps, which does not make any sense.The PR changes this into loading
xwith its runtime deps. That wayspack load xbehaves equivalent tospack env activate efor an environmentewhich hasxas a root spec.Also it solves a performance issue: #25669.
Question remains what to do with the --only flag. Should
--only=dependenciesonly load runtime deps? Or should it have the original behavior of loading build deps of build deps of build deps too?Note that the discussion below about performance is largely irrelevant for this PR; performance is definitely improved, the example given by @tylerjereddy seems to be of a package that has a bunch of run-time deps that should reallly be build/link deps.