M-1: mesh-sdk's manifest says version 0.1 and no series
Builds: design 47 G §368, §372, §411 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
// mesh-sdk's own manifest declares its two packages (design 32, SDK-10): the TypeScript `lib` and the Go `go`, built
|
||||
// from the directory go, each in series 0.1, so the Go build module publishes mesh-sdk's Go package through the Go seat
|
||||
// from the directory go, each without a series (design 47 G §411), so the Go build module publishes mesh-sdk's Go package through the Go seat
|
||||
// (design 51). Its words are judged by the group's own indexer, delivered with them (ADR 0621 §4).
|
||||
func TestOwnManifestUsesNoWordTheRunningControllerRefuses(t *testing.T) {
|
||||
raw, err := os.ReadFile("../../module.json")
|
||||
@@ -19,14 +19,17 @@ func TestOwnManifestUsesNoWordTheRunningControllerRefuses(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("mesh-sdk's module.json does not parse: %v", err)
|
||||
}
|
||||
if m.Version != "0.1" || m.UnknownField() != "" {
|
||||
t.Errorf("mesh-sdk's version is %q (unknown word %q), want 0.1 (design 47 G §368, §372)", m.Version, m.UnknownField())
|
||||
}
|
||||
if m.Build == nil || len(m.Build.Artifacts) == 0 {
|
||||
t.Fatal("mesh-sdk's module.json declares no artifact")
|
||||
}
|
||||
packages := map[string]Artifact{}
|
||||
for _, a := range m.Build.Artifacts {
|
||||
packages[a.Language] = a
|
||||
if a.Kind != ArtifactPackage || a.Series != DefaultSeries {
|
||||
t.Errorf("artifact %q is a %s in series %q, want a package in %s", a.Name, a.Kind, a.Series, DefaultSeries)
|
||||
if a.Kind != ArtifactPackage || a.Series != "" {
|
||||
t.Errorf("artifact %q is a %s in series %q, want a package in none (design 47 G §411)", a.Name, a.Kind, a.Series)
|
||||
}
|
||||
}
|
||||
if g := packages["go"]; g.Name != "go" || !slices.Equal(g.Paths, []string{"go"}) {
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"module": "mesh-sdk",
|
||||
"version": "1",
|
||||
"version": "0.1",
|
||||
"slug": "sdk",
|
||||
"build": {
|
||||
"artifacts": [
|
||||
{ "name": "lib", "kind": "package", "language": "typescript", "series": "0.1" },
|
||||
{ "name": "go", "kind": "package", "language": "go", "paths": ["go"], "series": "0.1" }
|
||||
{ "name": "lib", "kind": "package", "language": "typescript" },
|
||||
{ "name": "go", "kind": "package", "language": "go", "paths": ["go"] }
|
||||
]
|
||||
},
|
||||
"resources": []
|
||||
|
||||
Reference in New Issue
Block a user