package guards import ( "strings" "testing" ) // preMoveRastrillo is rastrillo's module path before it moved to // amadan.net/rastrillo/rastrillo (2026-08-31). Nothing after v0.23.0 was // released under it, so code importing it gets no rastrillo fix — which // is how Home's sign-in field kept zooming iOS on every tap for a month // after rastrillo fixed it (polish audit r3, item 1). // // estilo still imports it (chrome's SafeReturn), so it stays in go.mod as // an indirect requirement until estilo moves. Home's own code never may. const preMoveRastrillo = "github.com/carlosframework/rastrillo" // TestNoPreMoveRastrillo fails on any import of rastrillo's old module // path, in any of Home's modules. func TestNoPreMoveRastrillo(t *testing.T) { root := repoRoot(t) for _, path := range goFiles(t, root) { for _, imp := range fileImports(t, path) { if imp == preMoveRastrillo || strings.HasPrefix(imp, preMoveRastrillo+"/") { t.Errorf("%s: imports %q, rastrillo's frozen pre-move path; use amadan.net/rastrillo/rastrillo", relPath(t, root, path), imp) } } } }