We use stacky compactifications of ALE spaces and a theory of framed sheaves on them to give rigorous definitions of partition functions for supersymmetric gauge theories on ALE spaces. We use the notion of root stack to be able to incorporate instantons on the ALE spaces that have nontrivial holonomy at infinity. Joint work with F. Sala, and M. Pedrini and R. Szabo