Source Resolution
Every block can be delivered from multiple package sources — Homebrew, the Stackie supercache CDN, npm, pip, apt, and more. Source resolution picks the best source for your current machine and preferences automatically.
How It Works
When you run stackie up, each block goes through the resolver before
anything is installed. The resolver walks a prioritised list of sources
and selects the first one that satisfies three conditions:
- The block supports it — the block’s definition lists that source.
- Your platform supports it — e.g.
aptis only available on Linux,wingetonly on Windows. - Stackie has it configured — the source driver is loaded and ready.
Default Source Priority
Stackie ships with sensible per-platform defaults. Sources higher in the list are preferred when a block supports multiple options.
| Priority | macOS | Linux | Windows |
|---|---|---|---|
| 1 | go (supercache) | go (supercache) | go (supercache) |
| 2 | node (supercache) | node (supercache) | node (supercache) |
| 3 | system (supercache) | system (supercache) | system (supercache) |
| 4 | elixir (supercache) | elixir (supercache) | elixir (supercache) |
| 5 | supercache CDN | supercache CDN | supercache CDN |
| 6 | Homebrew | apt | winget |
| 7 | npm | Homebrew | scoop |
| 8 | pip | npm | npm |
| 9 | web (direct download) | pip | pip |
| 10 | web | web |
Ecosystem sources (go, node, system, elixir) come first because they use the
Stackie supercache CDN — pre-built, versioned binaries delivered without touching your
system package manager. The generic supercache entry covers any remaining CDN-backed
packages. Traditional package managers (brew, apt, winget) follow as reliable
fallbacks, and web (direct URL download) is the last resort.
Customising Your Preferences
You can override the default order from the Stackie dashboard under
Settings > Source Preferences. For example, if you prefer Homebrew over the
supercache CDN, promote brew to position 1. Your custom order applies
to all stacks on your machine.
Prefer Existing Installation
When Prefer existing installation is enabled (Settings > Source Preferences), the resolver first checks whether the package is already installed via any compatible source on your machine. If it finds one, it uses it — skipping the download entirely.
This is useful if you already have PostgreSQL installed via Homebrew and Stackie would otherwise prefer the supercache version: with this setting on, Stackie reuses your existing install and saves the bandwidth.
What Happens When No Source Matches?
If the resolver exhausts every source in the preference list without finding a compatible
match, stackie up fails with a descriptive error listing the block’s available sources,
your preference order, and the current platform. This usually means the block doesn’t
support your operating system yet, or a required source driver isn’t available.