Adopt the Promptkit v0.9 compatibility baseline
This commit is contained in:
@@ -14,8 +14,10 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
scriptoriumModulePath = "gitea.maximumdirect.net/eric/scriptorium"
|
||||
promptkitInternalPath = "gitea.maximumdirect.net/eric/promptkit/internal"
|
||||
scriptoriumModulePath = "gitea.maximumdirect.net/eric/scriptorium"
|
||||
promptkitInternalPath = "gitea.maximumdirect.net/eric/promptkit/internal"
|
||||
promptkitOpenRouterCatalogPath = "gitea.maximumdirect.net/eric/promptkit-backend-openrouter"
|
||||
promptkitRakestrawhomeCatalogPath = "gitea.maximumdirect.net/eric/promptkit-backend-rakestrawhome"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -120,6 +122,24 @@ func TestForbiddenImportScannerDetectsPromptkitInternalPackages(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestForbiddenImportScannerDetectsPromptkitCatalogPackages(t *testing.T) {
|
||||
for _, importPath := range []string{
|
||||
promptkitOpenRouterCatalogPath,
|
||||
promptkitRakestrawhomeCatalogPath,
|
||||
} {
|
||||
t.Run(importPath, func(t *testing.T) {
|
||||
root := t.TempDir()
|
||||
sourcePath := writeGoSource(t, root, "nested/consumer/catalog.go", importPath)
|
||||
|
||||
violations, err := findForbiddenProductionImports(root)
|
||||
if err != nil {
|
||||
t.Fatalf("scan source fixture: %v", err)
|
||||
}
|
||||
assertSingleViolation(t, violations, sourcePath, importPath)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestForbiddenImportScannerAllowsRetainedApplicationPackages(t *testing.T) {
|
||||
root := t.TempDir()
|
||||
sourcePath := filepath.Join(root, "nested/consumer/application.go")
|
||||
@@ -201,6 +221,12 @@ func isForbiddenProductionImport(importPath string) bool {
|
||||
if importPath == promptkitInternalPath || strings.HasPrefix(importPath, promptkitInternalPath+"/") {
|
||||
return true
|
||||
}
|
||||
if importPath == promptkitOpenRouterCatalogPath || strings.HasPrefix(importPath, promptkitOpenRouterCatalogPath+"/") {
|
||||
return true
|
||||
}
|
||||
if importPath == promptkitRakestrawhomeCatalogPath || strings.HasPrefix(importPath, promptkitRakestrawhomeCatalogPath+"/") {
|
||||
return true
|
||||
}
|
||||
for _, root := range removedFrameworkPackageRoots {
|
||||
if importPath == root || strings.HasPrefix(importPath, root+"/") {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user