Skip to content

Instantly share code, notes, and snippets.

View alalazo's full-sized avatar

Massimiliano Culpo alalazo

View GitHub Profile
@alalazo
alalazo / removing_globals.md
Created June 30, 2026 19:18
Removing globals in Spack

Removing globals in Spack

Spack reads a handful of process-global singletons from inside its library code. A function that needs configuration does not take it as an argument, but instead reaches for the global.

This is convenient, but it is also the source of a recurring set of problems:

  • Tests fight the globals. To test a function we mutate a global, run, and restore. That is slow (real IO), leaks state between tests, and makes it easy for an object to go out of sync with the configuration it is being derived from.

  • No two instances at once. Because there is exactly one CONFIG and one STORE, code cannot operate on two of them in the same process without swapping the global back and forth. The clingo bootstrap does this swap today. Environments push and pop config scopes onto the global. Parallel solves with different configs are not possible or harder to do than necessary.

@alalazo
alalazo / boost.md
Created June 6, 2026 07:56
Analysis for Boos Deprecation

Boost version cleanup analysis

This document summarises the consequences of removing old Boost versions from the builtin recipe, at two candidate cut-off points. It covers:

  • which other packages in the builtin repo depend on the removed versions,
  • what can be simplified in repos/spack_repo/builtin/packages/boost/package.py, and
  • notable bugs and milestones in the removed range.

@alalazo
alalazo / propagator-experiment.md
Created June 3, 2026 12:18
Propagator experiment in Python

Experiment: replacing #edge target compatibility with a Python propagator

Background

The solver/edge-for-target branch introduced a #edge directive to enforce target compatibility between non-build dependency edges:

#edge (node(Y, Dependency), node(X, Package)) :
 attr("depends_on", node(X, Package), node(Y, Dependency), Type), Type != "build",
*.dot
.venv