Repository navigation
refactor(file): the unasserted claim is AnyKind, so its concrete type can be anyKind - #651
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renames the unasserted file claim from
AnytoAnyKind, so its concrete type under #625 can beanyKind.Closes #650.
Why rename rather than pick a different struct name
anyis a predeclared alias, not a keyword — made an alias in Go 1.18 precisely so pre-existingidentifiers named
anykept compiling. Sotype any struct{…}in packagefilecompiles. Itsilently rebinds all 139 bare
anyoccurrences in the package, includingDiscoverAny(…, value any),Equal(other any),ConvertFrom(value any) (any, error), andUnmarshalYAML(unmarshal func(any) error).Not a diagnostic — a change of meaning that surfaces as errors somewhere else.
Renaming the exported type fixes it at the source, and the new name states the variant's assertion — a
kind, any kind — instead of borrowing Go's word for the empty interface.
Scope
Any→AnyKind,DiscoverAny→DiscoverAnyKind,anyAt→anyKindAt; sources renamed toany_kind*.go;gen/any.gen.goregenerated asgen/any_kind.gen.go; theexistenceVerifiableTypestype-id string; the live
.starassertion intest_judgment_interface_slot_mints.star— which is worthnoting on its own, because it proves the Go type name is observable from Starlark.
Prose was separated from identifiers by hand.
Anyappears as an English word in eight Go comments(
**Any kind moves.**,Any existing file is archived, …). All 75 occurrences were enumerated andclassified rather than swept with a pattern.
Completed plans keep their prose.
any-entry-claims.mdandresource-construction.mdcarry a renamenote at the top instead of being retconned; the living design docs are renamed in place.
Unchanged, deliberately: the authoring token
kind="any"and the enum constantResourceKindAny.Those name the kind axis, not the claim variant.
Serialization
The unasserted claim's URI fragment moves from
…/file.Anyto…/file.AnyKind. Greenfield, so there isno legacy to break, but it is a document change and is recorded as such.
Gate
make build0 ·make test103 ok / 0 fail ·make test-scenarioPASS ·make vetclean under darwin,windows, and linux ·
gofmt -lclean.make check's lint stage fails locally on two typecheck errors inside Go 1.27's own standard library(
crypto/internal/randutilcannot importmath/rand/v2) — a golangci-lint/toolchain mismatch unrelatedto this change. CI's
quality-gateis the authority and passed on #648 against the same toolchain.