Skip to content

new_installer.py: implement --use-buildcache, --cache-only, --use-cache and --only#51593

Merged
haampie merged 6 commits intodevelopfrom
hs/fix/new-installer-pkg-vs-deps
Nov 18, 2025
Merged

new_installer.py: implement --use-buildcache, --cache-only, --use-cache and --only#51593
haampie merged 6 commits intodevelopfrom
hs/fix/new-installer-pkg-vs-deps

Conversation

@haampie
Copy link
Copy Markdown
Member

@haampie haampie commented Nov 17, 2025

Implement various flags that influence the build graph the new installer works on. Turn this graph into a class of its own: BuildGraph.

  • Implement cache related flags: --use-buildcache (dependencies/package):(always,never,auto), --cache-only, --use-cache
  • Implement --only flag:
    • --only dependencies is implemented by pruning roots just like already installed packages are pruned, and
    • --only package is implemented by raising if after pruning non-roots are in the install queue.

Plus add a bunch of tests related to the build graph object, which run in ~0.4s.

@haampie haampie changed the title new_installer.py: implement --only new_installer.py: implement --use-buildcache, --cache-only, --use-cache and --only Nov 18, 2025
Signed-off-by: Harmen Stoppels <[email protected]>

This comment was marked as outdated.

alalazo
alalazo previously approved these changes Nov 18, 2025
Copy link
Copy Markdown
Member

@alalazo alalazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Verified both a source only and a cache only installation.

Signed-off-by: Harmen Stoppels <[email protected]>
@haampie haampie merged commit 443e1e3 into develop Nov 18, 2025
31 of 32 checks passed
@haampie haampie deleted the hs/fix/new-installer-pkg-vs-deps branch November 18, 2025 13:29
psakievich pushed a commit to psakievich/spack that referenced this pull request Dec 1, 2025
…e-cache` and `--only` (spack#51593)

Implement various flags that influence the build graph the new installer works on. Turn this graph into a class of its own: `BuildGraph`.

* Implement cache related flags: `--use-buildcache (dependencies/package):(always,never,auto)`, `--cache-only`, `--use-cache`
* Implement `--only` flag:
  * `--only dependencies` is implemented by pruning roots just like already installed packages are pruned, and 
  * `--only package` is implemented by raising if after pruning non-roots are in the install queue.

Plus add a bunch of tests related to the build graph object, which run in ~0.4s.

Signed-off-by: Harmen Stoppels <[email protected]>
@becker33 becker33 mentioned this pull request Jan 11, 2026
2 tasks
becker33 pushed a commit that referenced this pull request Jan 11, 2026
…e-cache` and `--only` (#51593)

Implement various flags that influence the build graph the new installer works on. Turn this graph into a class of its own: `BuildGraph`.

* Implement cache related flags: `--use-buildcache (dependencies/package):(always,never,auto)`, `--cache-only`, `--use-cache`
* Implement `--only` flag:
  * `--only dependencies` is implemented by pruning roots just like already installed packages are pruned, and 
  * `--only package` is implemented by raising if after pruning non-roots are in the install queue.

Plus add a bunch of tests related to the build graph object, which run in ~0.4s.

Signed-off-by: Harmen Stoppels <[email protected]>
becker33 pushed a commit that referenced this pull request Jan 11, 2026
…e-cache` and `--only` (#51593)

Implement various flags that influence the build graph the new installer works on. Turn this graph into a class of its own: `BuildGraph`.

* Implement cache related flags: `--use-buildcache (dependencies/package):(always,never,auto)`, `--cache-only`, `--use-cache`
* Implement `--only` flag:
  * `--only dependencies` is implemented by pruning roots just like already installed packages are pruned, and
  * `--only package` is implemented by raising if after pruning non-roots are in the install queue.

Plus add a bunch of tests related to the build graph object, which run in ~0.4s.

Signed-off-by: Harmen Stoppels <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
becker33 pushed a commit that referenced this pull request Jan 12, 2026
…e-cache` and `--only` (#51593)

Implement various flags that influence the build graph the new installer works on. Turn this graph into a class of its own: `BuildGraph`.

* Implement cache related flags: `--use-buildcache (dependencies/package):(always,never,auto)`, `--cache-only`, `--use-cache`
* Implement `--only` flag:
  * `--only dependencies` is implemented by pruning roots just like already installed packages are pruned, and
  * `--only package` is implemented by raising if after pruning non-roots are in the install queue.

Plus add a bunch of tests related to the build graph object, which run in ~0.4s.

Signed-off-by: Harmen Stoppels <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
becker33 pushed a commit that referenced this pull request Jan 15, 2026
…e-cache` and `--only` (#51593)

Implement various flags that influence the build graph the new installer works on. Turn this graph into a class of its own: `BuildGraph`.

* Implement cache related flags: `--use-buildcache (dependencies/package):(always,never,auto)`, `--cache-only`, `--use-cache`
* Implement `--only` flag:
  * `--only dependencies` is implemented by pruning roots just like already installed packages are pruned, and
  * `--only package` is implemented by raising if after pruning non-roots are in the install queue.

Plus add a bunch of tests related to the build graph object, which run in ~0.4s.

Signed-off-by: Harmen Stoppels <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
vjranagit pushed a commit to vjranagit/spack that referenced this pull request Jan 18, 2026
…e-cache` and `--only` (spack#51593)

Implement various flags that influence the build graph the new installer works on. Turn this graph into a class of its own: `BuildGraph`.

* Implement cache related flags: `--use-buildcache (dependencies/package):(always,never,auto)`, `--cache-only`, `--use-cache`
* Implement `--only` flag:
  * `--only dependencies` is implemented by pruning roots just like already installed packages are pruned, and
  * `--only package` is implemented by raising if after pruning non-roots are in the install queue.

Plus add a bunch of tests related to the build graph object, which run in ~0.4s.

Signed-off-by: Harmen Stoppels <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
becker33 pushed a commit that referenced this pull request Jan 22, 2026
…e-cache` and `--only` (#51593)

Implement various flags that influence the build graph the new installer works on. Turn this graph into a class of its own: `BuildGraph`.

* Implement cache related flags: `--use-buildcache (dependencies/package):(always,never,auto)`, `--cache-only`, `--use-cache`
* Implement `--only` flag:
  * `--only dependencies` is implemented by pruning roots just like already installed packages are pruned, and
  * `--only package` is implemented by raising if after pruning non-roots are in the install queue.

Plus add a bunch of tests related to the build graph object, which run in ~0.4s.

Signed-off-by: Harmen Stoppels <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
becker33 pushed a commit that referenced this pull request Jan 26, 2026
…e-cache` and `--only` (#51593)

Implement various flags that influence the build graph the new installer works on. Turn this graph into a class of its own: `BuildGraph`.

* Implement cache related flags: `--use-buildcache (dependencies/package):(always,never,auto)`, `--cache-only`, `--use-cache`
* Implement `--only` flag:
  * `--only dependencies` is implemented by pruning roots just like already installed packages are pruned, and
  * `--only package` is implemented by raising if after pruning non-roots are in the install queue.

Plus add a bunch of tests related to the build graph object, which run in ~0.4s.

Signed-off-by: Harmen Stoppels <[email protected]>
Signed-off-by: Gregory Becker <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants