Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

[インデックス 15735] ファイルの概要

このコミットは、Go言語の標準ライブラリの一部である go/types パッケージに関する変更を記録しています。具体的には、api/next.txt ファイルから go/types パッケージへの参照が削除されています。これは、go/types パッケージがGoのメインリポジトリから独立したリポジトリに移行されたことによるものです。

コミット

commit 5dc1e0f245193eed6e2967ac4eaeb794172ad69b
Author: Rob Pike <r@golang.org>
Date:   Tue Mar 12 14:42:37 2013 -0700

    api/next.txt: remove references to go/types, now in separate repo
    
    R=golang-dev, bradfitz
    CC=golang-dev
    https://golang.org/cl/7663045

GitHub上でのコミットページへのリンク

https://github.com/golang/go/commit/5dc1e0f245193eed6e2967ac4eaeb794172ad69b

元コミット内容

api/next.txt: remove references to go/types, now in separate repo

このコミットメッセージは非常に簡潔ですが、その内容は明確です。api/next.txt ファイルから go/types への参照を削除したこと、そしてその理由が go/types が別のリポジトリに移動したためであることを示しています。

変更の背景

この変更の背景には、Go言語のツールチェインにおける型チェックとセマンティック分析の進化があります。初期のGo言語では、コンパイラが型チェックとセマンティック分析の主要な役割を担っていました。しかし、Go言語のエコシステムが拡大し、IDE、リンター、コード分析ツールなど、コンパイラ以外のツールが型情報やセマンティック情報にアクセスする必要性が高まりました。

go/types パッケージは、Goのソースコードを解析し、型情報やスコープ情報などのセマンティックな詳細を提供する目的で開発されました。当初はGoのメインリポジトリの一部として開発されていましたが、その汎用性と重要性から、Goのコンパイラとは独立して進化し、他のツールからも利用できるようにすることが望ましいと判断されました。

そのため、go/types パッケージはGoのメインリポジトリから分離され、独立したリポジトリ(golang.org/x/tools/go/types など)に移行されました。これにより、go/types はGoのリリースサイクルとは独立して開発・更新されることが可能になり、より迅速な改善や、Goのバージョンに依存しないツールの開発が促進されました。

このコミットは、その移行プロセスの一環として、Goの将来のAPI変更を記録する api/next.txt ファイルから、もはやGoのメインリポジトリの一部ではない go/types 関連のエントリを削除するものです。

前提知識の解説

Go言語のAPIファイル (api/next.txt)

Go言語のプロジェクトでは、将来のAPI変更や追加を記録するために api/next.txt のようなファイルが使用されます。これは、Goの互換性保証(Go 1 Compatibility Promise)を維持するための重要なメカニズムの一部です。GoのAPIは、一度リリースされると、後方互換性を壊す変更は原則として行われません。新しいAPIが追加される場合や、既存のAPIが変更される場合は、まずこの api/next.txt に記録され、レビュープロセスを経てから正式なAPIとして承認されます。このファイルは、GoのAPIの安定性を保証し、開発者が安心してGoのバージョンアップを行えるようにするために不可欠です。

go/types パッケージ

go/types パッケージは、Go言語のソースコードのセマンティック分析を行うためのライブラリです。主な機能は以下の通りです。

  • 型チェック: Goのプログラムが型規則に準拠しているかを確認します。
  • スコープ分析: 変数や関数の定義と使用の関係(スコープ)を解決します。
  • 型情報の提供: 各識別子や式の型情報を提供します。
  • 抽象構文木 (AST) の走査: go/parser パッケージで生成されたASTを基に、より高レベルなセマンティック情報を構築します。

このパッケージは、Goのコンパイラだけでなく、GoLandやVS CodeなどのIDE、go vetstaticcheck のような静的解析ツール、gopls のような言語サーバーなど、Goのコードを理解し、操作する多くのツールで利用されています。

Goのモジュールと独立したリポジトリ (golang.org/x/)

Go言語では、標準ライブラリ以外の公式パッケージは golang.org/x/ 以下にホストされることが一般的です。これらはGoのメインリポジトリとは独立して管理されており、それぞれが独自のバージョン管理とリリースサイクルを持っています。これにより、特定のツールやライブラリの進化がGo本体のリリースに縛られることなく、より柔軟に行えるようになります。go/typesgolang.org/x/tools/go/types のような独立したリポジトリに移行されたのは、この設計思想に基づいています。

技術的詳細

このコミットは、api/next.txt ファイルから go/types パッケージに関連するすべてのエントリを削除するという、非常に直接的な変更です。

api/next.txt は、GoのAPIの変更履歴を追跡するためのテキストファイルであり、各行が pkg <パッケージ名>, <要素の種類> <要素名> ... の形式でAPI要素を記述しています。例えば、pkg go/format, func Node(io.Writer, *token.FileSet, interface{}) errorgo/format パッケージの Node 関数がAPIとして存在することを示しています。

go/types パッケージがGoのメインリポジトリから独立したリポジトリに移動したため、Goの将来のAPIとして api/next.txt にその存在を記録しておく必要がなくなりました。このコミットでは、go/types に関連する約188行のエントリがすべて削除されています。これには、go/types パッケージ内の定数 (BasicKind など)、関数 (Check, DefaultAlignof など)、メソッド、構造体、インターフェースなどが含まれていました。

この変更は、コードの機能的な振る舞いには影響を与えません。これは、Goのプロジェクト管理とAPIの記録方法に関するクリーンアップ作業であり、go/types パッケージがGoのメインリポジトリのAPIの一部ではなくなったことを正式に反映するものです。

コアとなるコードの変更箇所

--- a/api/next.txt
+++ b/api/next.txt
@@ -109,194 +109,6 @@ pkg go/format, func Node(io.Writer, *token.FileSet, interface{}) error
 pkg go/format, func Source([]uint8) ([]uint8, error)
 pkg go/parser, const AllErrors Mode
 pkg go/printer, type Config struct, Indent int
--pkg go/types, const Bool BasicKind
--pkg go/types, const Byte BasicKind
--pkg go/types, const Complex128 BasicKind
--pkg go/types, const Complex64 BasicKind
--pkg go/types, const DefaultMaxAlign ideal-int
--pkg go/types, const DefaultPtrSize ideal-int
--pkg go/types, const Float32 BasicKind
--pkg go/types, const Float64 BasicKind
--pkg go/types, const Int BasicKind
--pkg go/types, const Int16 BasicKind
--pkg go/types, const Int32 BasicKind
--pkg go/types, const Int64 BasicKind
--pkg go/types, const Int8 BasicKind
--pkg go/types, const Invalid BasicKind
--pkg go/types, const IsBoolean BasicInfo
--pkg go/types, const IsComplex BasicInfo
--pkg go/types, const IsConstType BasicInfo
--pkg go/types, const IsFloat BasicInfo
--pkg go/types, const IsInteger BasicInfo
--pkg go/types, const IsNumeric BasicInfo
--pkg go/types, const IsOrdered BasicInfo
--pkg go/types, const IsString BasicInfo
--pkg go/types, const IsUnsigned BasicInfo
--pkg go/types, const IsUntyped BasicInfo
--pkg go/types, const Rune BasicKind
--pkg go/types, const String BasicKind
--pkg go/types, const Uint BasicKind
--pkg go/types, const Uint16 BasicKind
--pkg go/types, const Uint32 BasicKind
--pkg go/types, const Uint64 BasicKind
--pkg go/types, const Uint8 BasicKind
--pkg go/types, const Uintptr BasicKind
--pkg go/types, const UnsafePointer BasicKind
--pkg go/types, const UntypedBool BasicKind
--pkg go/types, const UntypedComplex BasicKind
--pkg go/types, const UntypedFloat BasicKind
--pkg go/types, const UntypedInt BasicKind
--pkg go/types, const UntypedNil BasicKind
--pkg go/types, const UntypedRune BasicKind
--pkg go/types, const UntypedString BasicKind
--pkg go/types, func Check(*token.FileSet, []*ast.File) (*Package, error)
--pkg go/types, func DefaultAlignof(Type) int64
--pkg go/types, func DefaultOffsetsof([]*Field) []int64
--pkg go/types, func DefaultSizeof(Type) int64
--pkg go/types, func FindGcExportData(*bufio.Reader) error
--pkg go/types, func FindPkg(string, string) (string, string)
--pkg go/types, func GcImport(map[string]*Package, string) (*Package, error)
--pkg go/types, func GcImportData(map[string]*Package, string, string, *bufio.Reader) (*Package, error)
--pkg go/types, func IsIdentical(Type, Type) bool
--pkg go/types, method (*Array) String() string
--pkg go/types, method (*Basic) String() string
--pkg go/types, method (*Chan) String() string
--pkg go/types, method (*Const) GetName() string
--pkg go/types, method (*Const) GetPkg() *Package
--pkg go/types, method (*Const) GetPos() token.Pos
--pkg go/types, method (*Const) GetType() Type
--pkg go/types, method (*Context) Check(*token.FileSet, []*ast.File) (*Package, error)
--pkg go/types, method (*Func) GetName() string
--pkg go/types, method (*Func) GetPkg() *Package
--pkg go/types, method (*Func) GetPos() token.Pos
--pkg go/types, method (*Func) GetType() Type
--pkg go/types, method (*Interface) String() string
--pkg go/types, method (*Map) String() string
--pkg go/types, method (*NamedType) String() string
--pkg go/types, method (*Package) GetName() string
--pkg go/types, method (*Package) GetPkg() *Package
--pkg go/types, method (*Package) GetPos() token.Pos
--pkg go/types, method (*Package) GetType() Type
--pkg go/types, method (*Pointer) String() string
--pkg go/types, method (*Result) String() string
--pkg go/types, method (*Scope) Insert(Object) Object
--pkg go/types, method (*Scope) Lookup(string) Object
--pkg go/types, method (*Scope) String() string
--pkg go/types, method (*Signature) String() string
--pkg go/types, method (*Slice) String() string
--pkg go/types, method (*Struct) String() string
--pkg go/types, method (*TypeName) GetName() string
--pkg go/types, method (*TypeName) GetPkg() *Package
--pkg go/types, method (*TypeName) GetPos() token.Pos
--pkg go/types, method (*TypeName) GetType() Type
--pkg go/types, method (*Var) GetName() string
--pkg go/types, method (*Var) GetPkg() *Package
--pkg go/types, method (*Var) GetPos() token.Pos
--pkg go/types, method (*Var) GetType() Type
--pkg go/types, method (Complex) String() string
--pkg go/types, method (Field) IsSame(QualifiedName) bool
--pkg go/types, method (Method) IsSame(QualifiedName) bool
--pkg go/types, method (NilType) String() string
--pkg go/types, method (QualifiedName) IsSame(QualifiedName) bool
--pkg go/types, type Array struct
--pkg go/types, type Array struct, Elt Type
--pkg go/types, type Array struct, Len int64
--pkg go/types, type Basic struct
--pkg go/types, type Basic struct, Info BasicInfo
--pkg go/types, type Basic struct, Kind BasicKind
--pkg go/types, type Basic struct, Name string
--pkg go/types, type Basic struct, Size int64
--pkg go/types, type BasicInfo int
--pkg go/types, type BasicKind int
--pkg go/types, type Chan struct
--pkg go/types, type Chan struct, Dir ast.ChanDir
--pkg go/types, type Chan struct, Elt Type
--pkg go/types, type Complex struct
--pkg go/types, type Complex struct, Im *big.Rat
--pkg go/types, type Complex struct, Re *big.Rat
--pkg go/types, type Const struct
--pkg go/types, type Const struct, Name string
--pkg go/types, type Const struct, Pkg *Package
--pkg go/types, type Const struct, Type Type
--pkg go/types, type Const struct, Val interface{}
--pkg go/types, type Context struct
--pkg go/types, type Context struct, Alignof func(Type) int64
--pkg go/types, type Context struct, Error func(error)
--pkg go/types, type Context struct, Expr func(ast.Expr, Type, interface{})
--pkg go/types, type Context struct, Ident func(*ast.Ident, Object)
--pkg go/types, type Context struct, Import Importer
--pkg go/types, type Context struct, IntSize int64
--pkg go/types, type Context struct, Offsetsof func([]*Field) []int64
--pkg go/types, type Context struct, PtrSize int64
--pkg go/types, type Context struct, Sizeof func(Type) int64
--pkg go/types, type Field struct
--pkg go/types, type Field struct, IsAnonymous bool
--pkg go/types, type Field struct, Tag string
--pkg go/types, type Field struct, Type Type
--pkg go/types, type Field struct, embedded QualifiedName
--pkg go/types, type Func struct
--pkg go/types, type Func struct, Name string
--pkg go/types, type Func struct, Pkg *Package
--pkg go/types, type Func struct, Type Type
--pkg go/types, type Importer func(imports map[string]*Package, path string) (pkg *Package, err error)
--pkg go/types, type Importer func(map[string]*Package, string) (*Package, error)
--pkg go/types, type Interface struct
--pkg go/types, type Interface struct, Methods []*Method
--pkg go/types, type Map struct
--pkg go/types, type Map struct, Elt Type
--pkg go/types, type Map struct, Key Type
--pkg go/types, type Method struct
--pkg go/types, type Method struct, Type *Signature
--pkg go/types, type Method struct, embedded QualifiedName
--pkg go/types, type NamedType struct
--pkg go/types, type NamedType struct, Methods []*Method
--pkg go/types, type NamedType struct, Obj *TypeName
--pkg go/types, type NamedType struct, Underlying Type
--pkg go/types, type NilType struct
--pkg go/types, type Object interface, GetName() string
--pkg go/types, type Object interface, GetPkg() *Package
--pkg go/types, type Object interface, GetPos() token.Pos
--pkg go/types, type Object interface, GetType() Type
--pkg go/types, type Object interface, unexported methods
--pkg go/types, type Package struct
--pkg go/types, type Package struct, Complete bool
--pkg go/types, type Package struct, Imports map[string]*Package
--pkg go/types, type Package struct, Name string
--pkg go/types, type Package struct, Path string
--pkg go/types, type Package struct, Scope *Scope
--pkg go/types, type Pointer struct
--pkg go/types, type Pointer struct, Base Type
--pkg go/types, type QualifiedName struct
--pkg go/types, type QualifiedName struct, Name string
--pkg go/types, type QualifiedName struct, Pkg *Package
--pkg go/types, type Result struct
--pkg go/types, type Result struct, Values []*Var
--pkg go/types, type Scope struct
--pkg go/types, type Scope struct, Entries []Object
--pkg go/types, type Scope struct, Outer *Scope
--pkg go/types, type Signature struct
--pkg go/types, type Signature struct, IsVariadic bool
--pkg go/types, type Signature struct, Params []*Var
--pkg go/types, type Signature struct, Recv *Var
--pkg go/types, type Signature struct, Results []*Var
--pkg go/types, type Slice struct
--pkg go/types, type Slice struct, Elt Type
--pkg go/types, type Struct struct
--pkg go/types, type Struct struct, Fields []*Field
--pkg go/types, type Type interface, String() string
--pkg go/types, type Type interface, unexported methods
--pkg go/types, type TypeName struct
--pkg go/types, type TypeName struct, Name string
--pkg go/types, type TypeName struct, Pkg *Package
--pkg go/types, type TypeName struct, Type Type
--pkg go/types, type Var struct
--pkg go/types, type Var struct, Name string
--pkg go/types, type Var struct, Pkg *Package
--pkg go/types, type Var struct, Type Type
--pkg go/types, var Default Context
--pkg go/types, var Typ [...]*Basic
--pkg go/types, var Universe *Scope
--pkg go/types, var Unsafe *Package
 pkg image, const YCbCrSubsampleRatio440 YCbCrSubsampleRatio
 pkg io, type ByteWriter interface { WriteByte }
 pkg io, type ByteWriter interface, WriteByte(uint8) error

コアとなるコードの解説

上記の差分は、api/next.txt ファイルから go/types パッケージに関連するすべての行が削除されたことを明確に示しています。各行の先頭にある - は、その行が削除されたことを意味します。

削除されたエントリは、go/types パッケージが提供していた様々なAPI要素(定数、関数、型、メソッドなど)を列挙したものです。例えば、以下のようなエントリが含まれていました。

  • pkg go/types, const Bool BasicKind: go/types パッケージの Bool 定数(BasicKind 型)
  • pkg go/types, func Check(*token.FileSet, []*ast.File) (*Package, error): go/types パッケージの Check 関数
  • pkg go/types, type Array struct: go/types パッケージの Array 構造体
  • pkg go/types, method (*Array) String() string: go/types パッケージの Array 型の String メソッド

これらのエントリが削除されたのは、前述の通り go/types パッケージがGoのメインリポジトリから独立したリポジトリに移動し、Goの標準APIの一部ではなくなったためです。この変更により、api/next.txt はGoのコアAPIのみを正確に反映するようになります。

関連リンク

参考にした情報源リンク

  • Goのコミット履歴 (GitHub): https://github.com/golang/go/commits/master
  • Goのコードレビューシステム (Gerrit): https://go-review.googlesource.com/
  • go/types の分離に関する議論や関連する変更履歴 (Web検索による情報)
    • Go issue tracker (例: go/types の分離に関するissueやCL)
    • Go開発者メーリングリストのアーカイブ
    • Goのブログ記事や公式ドキュメント(もしあれば)
    • golang.org/x/tools リポジトリの履歴
  • api/next.txt の役割に関するGoのドキュメントや開発者向けガイド

[インデックス 15735] ファイルの概要

このコミットは、Go言語の標準ライブラリの一部である go/types パッケージに関する変更を記録しています。具体的には、api/next.txt ファイルから go/types パッケージへの参照が削除されています。これは、go/types パッケージがGoのメインリポジトリから独立したリポジトリに移行されたことによるものです。

コミット

commit 5dc1e0f245193eed6e2967ac4eaeb794172ad69b
Author: Rob Pike <r@golang.org>
Date:   Tue Mar 12 14:42:37 2013 -0700

    api/next.txt: remove references to go/types, now in separate repo
    
    R=golang-dev, bradfitz
    CC=golang-dev
    https://golang.org/cl/7663045

GitHub上でのコミットページへのリンク

https://github.com/golang/go/commit/5dc1e0f245193eed6e2967ac4eaeb794172ad69b

元コミット内容

api/next.txt: remove references to go/types, now in separate repo

このコミットメッセージは非常に簡潔ですが、その内容は明確です。api/next.txt ファイルから go/types への参照を削除したこと、そしてその理由が go/types が別のリポジトリに移動したためであることを示しています。

変更の背景

この変更の背景には、Go言語のツールチェインにおける型チェックとセマンティック分析の進化があります。初期のGo言語では、コンパイラが型チェックとセマンティック分析の主要な役割を担っていました。しかし、Go言語のエコシステムが拡大し、IDE、リンター、コード分析ツールなど、コンパイラ以外のツールが型情報やセマンティック情報にアクセスする必要性が高まりました。

go/types パッケージは、Goのソースコードを解析し、型情報やスコープ情報などのセマンティックな詳細を提供する目的で開発されました。当初はGoのメインリポジトリの一部として開発されていましたが、その汎用性と重要性から、Goのコンパイラとは独立して進化し、他のツールからも利用できるようにすることが望ましいと判断されました。

そのため、go/types パッケージはGoのメインリポジトリから分離され、独立したリポジトリ(golang.org/x/tools/go/types など)に移行されました。これにより、go/types はGoのリリースサイクルとは独立して開発・更新されることが可能になり、より迅速な改善や、Goのバージョンに依存しないツールの開発が促進されます。

このコミットは、その移行プロセスの一環として、Goの将来のAPI変更を記録する api/next.txt ファイルから、もはやGoのメインリポジトリの一部ではない go/types 関連のエントリを削除するものです。

前提知識の解説

Go言語のAPIファイル (api/next.txt)

Go言語のプロジェクトでは、将来のAPI変更や追加を記録するために api/next.txt のようなファイルが使用されます。これは、Goの互換性保証(Go 1 Compatibility Promise)を維持するための重要なメカニズムの一部です。GoのAPIは、一度リリースされると、後方互換性を壊す変更は原則として行われません。新しいAPIが追加される場合や、既存のAPIが変更される場合は、まずこの api/next.txt に記録され、レビュープロセスを経てから正式なAPIとして承認されます。このファイルは、GoのAPIの安定性を保証し、開発者が安心してGoのバージョンアップを行えるようにするために不可欠です。

go/types パッケージ

go/types パッケージは、Go言語のソースコードのセマンティック分析を行うためのライブラリです。主な機能は以下の通りです。

  • 型チェック: Goのプログラムが型規則に準拠しているかを確認します。
  • スコープ分析: 変数や関数の定義と使用の関係(スコープ)を解決します。
  • 型情報の提供: 各識別子や式の型情報を提供します。
  • 抽象構文木 (AST) の走査: go/parser パッケージで生成されたASTを基に、より高レベルなセマンティック情報を構築します。

このパッケージは、Goのコンパイラだけでなく、GoLandやVS CodeなどのIDE、go vetstaticcheck のような静的解析ツール、gopls のような言語サーバーなど、Goのコードを理解し、操作する多くのツールで利用されています。

Goのモジュールと独立したリポジトリ (golang.org/x/)

Go言語では、標準ライブラリ以外の公式パッケージは golang.org/x/ 以下にホストされることが一般的です。これらはGoのメインリポジトリとは独立して管理されており、それぞれが独自のバージョン管理とリリースサイクルを持っています。これにより、特定のツールやライブラリの進化がGo本体のリリースに縛られることなく、より柔軟に行えるようになります。go/typesgolang.org/x/tools/go/types のような独立したリポジトリに移行されたのは、この設計思想に基づいています。

技術的詳細

このコミットは、api/next.txt ファイルから go/types パッケージに関連するすべてのエントリを削除するという、非常に直接的な変更です。

api/next.txt は、GoのAPIの変更履歴を追跡するためのテキストファイルであり、各行が pkg <パッケージ名>, <要素の種類> <要素名> ... の形式でAPI要素を記述しています。例えば、pkg go/format, func Node(io.Writer, *token.FileSet, interface{}) errorgo/format パッケージの Node 関数がAPIとして存在することを示しています。

go/types パッケージがGoのメインリポジトリから独立したリポジトリに移動したため、Goの将来のAPIとして api/next.txt にその存在を記録しておく必要がなくなりました。このコミットでは、go/types に関連する約188行のエントリがすべて削除されています。これには、go/types パッケージ内の定数 (BasicKind など)、関数 (Check, DefaultAlignof など)、メソッド、構造体、インターフェースなどが含まれていました。

この変更は、コードの機能的な振る舞いには影響を与えません。これは、Goのプロジェクト管理とAPIの記録方法に関するクリーンアップ作業であり、go/types パッケージがGoのメインリポジトリのAPIの一部ではなくなったことを正式に反映するものです。

コアとなるコードの変更箇所

--- a/api/next.txt
+++ b/api/next.txt
@@ -109,194 +109,6 @@ pkg go/format, func Node(io.Writer, *token.FileSet, interface{}) error
 pkg go/format, func Source([]uint8) ([]uint8, error)
 pkg go/parser, const AllErrors Mode
 pkg go/printer, type Config struct, Indent int
--pkg go/types, const Bool BasicKind
--pkg go/types, const Byte BasicKind
--pkg go/types, const Complex128 BasicKind
--pkg go/types, const Complex64 BasicKind
--pkg go/types, const DefaultMaxAlign ideal-int
--pkg go/types, const DefaultPtrSize ideal-int
--pkg go/types, const Float32 BasicKind
--pkg go/types, const Float64 BasicKind
--pkg go/types, const Int BasicKind
--pkg go/types, const Int16 BasicKind
--pkg go/types, const Int32 BasicKind
--pkg go/types, const Int64 BasicKind
--pkg go/types, const Int8 BasicKind
--pkg go/types, const Invalid BasicKind
--pkg go/types, const IsBoolean BasicInfo
--pkg go/types, const IsComplex BasicInfo
--pkg go/types, const IsConstType BasicInfo
--pkg go/types, const IsFloat BasicInfo
--pkg go/types, const IsInteger BasicInfo
--pkg go/types, const IsNumeric BasicInfo
--pkg go/types, const IsOrdered BasicInfo
--pkg go/types, const IsString BasicInfo
--pkg go/types, const IsUnsigned BasicInfo
--pkg go/types, const IsUntyped BasicInfo
--pkg go/types, const Rune BasicKind
--pkg go/types, const String BasicKind
--pkg go/types, const Uint BasicKind
--pkg go/types, const Uint16 BasicKind
--pkg go/types, const Uint32 BasicKind
--pkg go/types, const Uint64 BasicKind
--pkg go/types, const Uint8 BasicKind
--pkg go/types, const Uintptr BasicKind
--pkg go/types, const UnsafePointer BasicKind
--pkg go/types, const UntypedBool BasicKind
--pkg go/types, const UntypedComplex BasicKind
--pkg go/types, const UntypedFloat BasicKind
--pkg go/types, const UntypedInt BasicKind
--pkg go/types, const UntypedNil BasicKind
--pkg go/types, const UntypedRune BasicKind
--pkg go/types, const UntypedString BasicKind
--pkg go/types, func Check(*token.FileSet, []*ast.File) (*Package, error)
--pkg go/types, func DefaultAlignof(Type) int64
--pkg go/types, func DefaultOffsetsof([]*Field) []int64
--pkg go/types, func DefaultSizeof(Type) int64
--pkg go/types, func FindGcExportData(*bufio.Reader) error
--pkg go/types, func FindPkg(string, string) (string, string)
--pkg go/types, func GcImport(map[string]*Package, string) (*Package, error)
--pkg go/types, func GcImportData(map[string]*Package, string, string, *bufio.Reader) (*Package, error)
--pkg go/types, func IsIdentical(Type, Type) bool
--pkg go/types, method (*Array) String() string
--pkg go/types, method (*Basic) String() string
--pkg go/types, method (*Chan) String() string
--pkg go/types, method (*Const) GetName() string
--pkg go/types, method (*Const) GetPkg() *Package
--pkg go/types, method (*Const) GetPos() token.Pos
--pkg go/types, method (*Const) GetType() Type
--pkg go/types, method (*Context) Check(*token.FileSet, []*ast.File) (*Package, error)
--pkg go/types, method (*Func) GetName() string
--pkg go/types, method (*Func) GetPkg() *Package
--pkg go/types, method (*Func) GetPos() token.Pos
--pkg go/types, method (*Func) GetType() Type
--pkg go/types, method (*Interface) String() string
--pkg go/types, method (*Map) String() string
--pkg go/types, method (*NamedType) String() string
--pkg go/types, method (*Package) GetName() string
--pkg go/types, method (*Package) GetPkg() *Package
--pkg go/types, method (*Package) GetPos() token.Pos
--pkg go/types, method (*Package) GetType() Type
--pkg go/types, method (*Pointer) String() string
--pkg go/types, method (*Result) String() string
--pkg go/types, method (*Scope) Insert(Object) Object
--pkg go/types, method (*Scope) Lookup(string) Object
--pkg go/types, method (*Scope) String() string
--pkg go/types, method (*Signature) String() string
--pkg go/types, method (*Slice) String() string
--pkg go/types, method (*Struct) String() string
--pkg go/types, method (*TypeName) GetName() string
--pkg go/types, method (*TypeName) GetPkg() *Package
--pkg go/types, method (*TypeName) GetPos() token.Pos
--pkg go/types, method (*TypeName) GetType() Type
--pkg go/types, method (*Var) GetName() string
--pkg go/types, method (*Var) GetPkg() *Package
--pkg go/types, method (*Var) GetPos() token.Pos
--pkg go/types, method (*Var) GetType() Type
--pkg go/types, method (Complex) String() string
--pkg go/types, method (Field) IsSame(QualifiedName) bool
--pkg go/types, method (Method) IsSame(QualifiedName) bool
--pkg go/types, method (NilType) String() string
--pkg go/types, method (QualifiedName) IsSame(QualifiedName) bool
--pkg go/types, type Array struct
--pkg go/types, type Array struct, Elt Type
--pkg go/types, type Array struct, Len int64
--pkg go/types, type Basic struct
--pkg go/types, type Basic struct, Info BasicInfo
--pkg go/types, type Basic struct, Kind BasicKind
--pkg go/types, type Basic struct, Name string
--pkg go/types, type Basic struct, Size int64
--pkg go/types, type BasicInfo int
--pkg go/types, type BasicKind int
--pkg go/types, type Chan struct
--pkg go/types, type Chan struct, Dir ast.ChanDir
--pkg go/types, type Chan struct, Elt Type
--pkg go/types, type Complex struct
--pkg go/types, type Complex struct, Im *big.Rat
--pkg go/types, type Complex struct, Re *big.Rat
--pkg go/types, type Const struct
--pkg go/types, type Const struct, Name string
--pkg go/types, type Const struct, Pkg *Package
--pkg go/types, type Const struct, Type Type
--pkg go/types, type Const struct, Val interface{}
--pkg go/types, type Context struct
--pkg go/types, type Context struct, Alignof func(Type) int64
--pkg go/types, type Context struct, Error func(error)
--pkg go/types, type Context struct, Expr func(ast.Expr, Type, interface{})
--pkg go/types, type Context struct, Ident func(*ast.Ident, Object)
--pkg go/types, type Context struct, Import Importer
--pkg go/types, type Context struct, IntSize int64
--pkg go/types, type Context struct, Offsetsof func([]*Field) []int64
--pkg go/types, type Context struct, PtrSize int64
--pkg go/types, type Context struct, Sizeof func(Type) int64
--pkg go/types, type Field struct
--pkg go/types, type Field struct, IsAnonymous bool
--pkg go/types, type Field struct, Tag string
--pkg go/types, type Field struct, Type Type
--pkg go/types, type Field struct, embedded QualifiedName
--pkg go/types, type Func struct
--pkg go/types, type Func struct, Name string
--pkg go/types, type Func struct, Pkg *Package
--pkg go/types, type Func struct, Type Type
--pkg go/types, type Importer func(imports map[string]*Package, path string) (pkg *Package, err error)
--pkg go/types, type Importer func(map[string]*Package, string) (*Package, error)
--pkg go/types, type Interface struct
--pkg go/types, type Interface struct, Methods []*Method
--pkg go/types, type Map struct
--pkg go/types, type Map struct, Elt Type
--pkg go/types, type Map struct, Key Type
--pkg go/types, type Method struct
--pkg go/types, type Method struct, Type *Signature
--pkg go/types, type Method struct, embedded QualifiedName
--pkg go/types, type NamedType struct
--pkg go/types, type NamedType struct, Methods []*Method
--pkg go/types, type NamedType struct, Obj *TypeName
--pkg go/types, type NamedType struct, Underlying Type
--pkg go/types, type NilType struct
--pkg go/types, type Object interface, GetName() string
--pkg go/types, type Object interface, GetPkg() *Package
--pkg go/types, type Object interface, GetPos() token.Pos
--pkg go/types, type Object interface, GetType() Type
--pkg go/types, type Object interface, unexported methods
--pkg go/types, type Package struct
--pkg go/types, type Package struct, Complete bool
--pkg go/types, type Package struct, Imports map[string]*Package
--pkg go/types, type Package struct, Name string
--pkg go/types, type Package struct, Path string
--pkg go/types, type Package struct, Scope *Scope
--pkg go/types, type Pointer struct
--pkg go/types, type Pointer struct, Base Type
--pkg go/types, type QualifiedName struct
--pkg go/types, type QualifiedName struct, Name string
--pkg go/types, type QualifiedName struct, Pkg *Package
--pkg go/types, type Result struct
--pkg go/types, type Result struct, Values []*Var
--pkg go/types, type Scope struct
--pkg go/types, type Scope struct, Entries []Object
--pkg go/types, type Scope struct, Outer *Scope
--pkg go/types, type Signature struct
--pkg go/types, type Signature struct, IsVariadic bool
--pkg go/types, type Signature struct, Params []*Var
--pkg go/types, type Signature struct, Recv *Var
--pkg go/types, type Signature struct, Results []*Var
--pkg go/types, type Slice struct
--pkg go/types, type Slice struct, Elt Type
--pkg go/types, type Struct struct
--pkg go/types, type Struct struct, Fields []*Field
--pkg go/types, type Type interface, String() string
--pkg go/types, type Type interface, unexported methods
--pkg go/types, type TypeName struct
--pkg go/types, type TypeName struct, Name string
--pkg go/types, type TypeName struct, Pkg *Package
--pkg go/types, type TypeName struct, Type Type
--pkg go/types, type Var struct
--pkg go/types, type Var struct, Name string
--pkg go/types, type Var struct, Pkg *Package
--pkg go/types, type Var struct, Type Type
--pkg go/types, var Default Context
--pkg go/types, var Typ [...]*Basic
--pkg go/types, var Universe *Scope
--pkg go/types, var Unsafe *Package
 pkg image, const YCbCrSubsampleRatio440 YCbCrSubsampleRatio
 pkg io, type ByteWriter interface { WriteByte }
 pkg io, type ByteWriter interface, WriteByte(uint8) error

コアとなるコードの解説

上記の差分は、api/next.txt ファイルから go/types パッケージに関連するすべての行が削除されたことを明確に示しています。各行の先頭にある - は、その行が削除されたことを意味します。

削除されたエントリは、go/types パッケージが提供していた様々なAPI要素(定数、関数、型、メソッドなど)を列挙したものです。例えば、以下のようなエントリが含まれていました。

  • pkg go/types, const Bool BasicKind: go/types パッケージの Bool 定数(BasicKind 型)
  • pkg go/types, func Check(*token.FileSet, []*ast.File) (*Package, error): go/types パッケージの Check 関数
  • pkg go/types, type Array struct: go/types パッケージの Array 構造体
  • pkg go/types, method (*Array) String() string: go/types パッケージの Array 型の String メソッド

これらのエントリが削除されたのは、前述の通り go/types パッケージがGoのメインリポジトリから独立したリポジトリに移動し、Goの標準APIの一部ではなくなったためです。この変更により、api/next.txt はGoのコアAPIのみを正確に反映するようになります。

関連リンク

参考にした情報源リンク