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

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

このコミットは、Go言語の週次スナップショット weekly.2012-03-22 をリリースしたものです。これはGo 1のリリース候補第2版(Go 1 Release Candidate 2)に相当し、Go 1の正式リリースに向けた最終段階での様々なバグ修正、改善、ドキュメント更新が含まれています。

コミット

  • コミットハッシュ: 145c48c1d196dd3af6ca4841bbb48954257d7782
  • Author: Andrew Gerrand adg@golang.org
  • Date: Fri Mar 23 11:56:54 2012 +1100
  • コミットメッセージ:
    weekly.2012-03-22
    
    R=golang-dev, r, dave
    CC=golang-dev
    https://golang.org/cl/5876068
    

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

https://github.com/golang/go/commit/145c48c1d196dd3af6ca4841bbb48954257d7782

元コミット内容

weekly.2012-03-22

R=golang-dev, r, dave
CC=golang-dev
https://golang.org/cl/5876068

変更の背景

このコミットは、Go言語のバージョン1(Go 1)の正式リリースに向けて、開発の最終段階で行われたものです。Goプロジェクトでは、正式リリース前に定期的に「週次スナップショット(weekly snapshot)」を公開し、開発者コミュニティからのフィードバックを募り、バグを修正し、安定性を向上させていました。

weekly.2012-03-22 は、特に「Go 1 Release Candidate 2」として位置づけられており、これはGo 1の最終リリースに非常に近い状態であることを示しています。リリース候補版は、新機能の追加はほとんど行わず、既存のバグの修正やパフォーマンスの最適化、ドキュメントの整備に重点を置きます。このコミットの目的は、Go 1の安定性と品質を確保し、広範な採用に耐えうる堅牢なバージョンを提供することにありました。特にWindowsインストーラーの修正が言及されており、クロスプラットフォーム対応の改善も重要な焦点であったことが伺えます。

前提知識の解説

Go言語のリリースサイクルと週次スナップショット

Go言語は、安定したリリースを提供するために、明確なリリースサイクルを持っています。Go 1の時代には、現在のような半年ごとのメジャーリリースサイクルが確立される前であり、開発の進捗をコミュニティと共有するために「週次スナップショット」が頻繁に公開されていました。これらは、最新の開発ブランチの状態を反映したもので、開発者はこれらを使って新しい機能や修正を試すことができました。

リリース候補 (Release Candidate, RC)

ソフトウェア開発において、リリース候補(RC)は、正式リリース前の最終段階のバージョンを指します。RC版は、新機能の追加は凍結され、主にバグ修正と安定化に焦点が当てられます。RC版が複数回リリースされることも珍しくなく、それぞれのRC版で発見された問題が修正され、次のRC版で検証されます。Go 1 RC2は、Go 1の正式リリースに向けて、非常に重要なマイルストーンでした。

Mercurial (.hgtags)

Goプロジェクトは、初期には分散型バージョン管理システムであるMercurial(Hg)を使用していました。.hgtags ファイルは、Mercurialリポジトリにおいて、特定のコミットハッシュにタグ(バージョン名など)を関連付けるために使用されるファイルです。このファイルは、リポジトリの履歴における特定の時点をマークするために利用され、週次スナップショットのようなリリースポイントを記録するのに役立ちました。

doc/devel/weekly.html

このファイルは、Goプロジェクトの週次スナップショットに関する情報をまとめたドキュメントです。各週次スナップショットで導入された変更点や注目すべき事項がリストアップされており、開発者が最新の変更を把握するための重要な情報源となっていました。このコミットでは、weekly.2012-03-22 のセクションが追加され、その内容が詳細に記述されています。

技術的詳細

このコミットは、Go 1 Release Candidate 2のリリースに伴う広範な変更を反映しています。主な変更点は doc/devel/weekly.html に詳細にリストされており、コンパイラ、リンカ、標準ライブラリ、ツール、ドキュメントなど、Goエコシステム全体にわたる多岐にわたる修正が含まれています。

以下に、doc/devel/weekly.html に記載されている主要な変更点をいくつかピックアップして解説します。

  • コンパイラ/リンカ (5l, 6l, 8l):
    • fix stack split logic for stacks near default segment size.: スタック分割ロジックの修正。Goのランタイムは、必要に応じてスタックを動的に拡張(スタック分割)しますが、特定の条件下(デフォルトセグメントサイズに近いスタック)で問題が発生していた可能性があります。この修正は、スタックの効率的かつ安全な管理を保証します。
  • ビルドシステム (build):
    • catch API changes during build: ビルド中にAPIの変更を検出する機能の追加。これは、Go 1の安定したAPIを維持するために重要であり、互換性のない変更が誤って導入されるのを防ぐのに役立ちます。
    • do more during windows build: Windowsビルドプロセスの改善。Windows環境でのGoのビルド体験を向上させるための変更です。
    • unset GOPATH before tests: テスト実行前に GOPATH 環境変数をアンセットする。これは、テストの独立性を高め、ユーザーの GOPATH 設定に依存しない一貫したテスト環境を確保するためのプラクティスです。
  • cmd/cgo:
    • add support for function export for gccgo: gccgo (GCCベースのGoコンパイラ) における関数エクスポートのサポート追加。CgoはGoとC/C++コードを連携させるためのツールであり、この変更はgccgoユーザーにとってのCgoの機能性を向上させます。
    • fix handling of errno for gccgo: gccgoでのerrno(システムコールエラーコード)のハンドリング修正。Cgoを介したシステムコールで正確なエラー情報がGoコードに伝達されるようにします。
  • cmd/go:
    • add -fno-common by default on Darwin: Darwin(macOS)環境でデフォルトで-fno-commonフラグを追加。これは、リンカがシンボルを処理する方法に関連するもので、特定のリンカの問題を回避するために使用されることがあります。
    • fix directory->import path conversion: ディレクトリからインポートパスへの変換ロジックの修正。Goのパッケージ管理において、正しいインポートパスの解決は非常に重要です。
  • cmd/godoc:
    • add toys, tour button to playground: godocのプレイグラウンドに「toys」と「tour」ボタンを追加。これは、Goの学習者がインタラクティブにコードを試したり、Goツアーを体験したりするための利便性を高めます。
    • inform users that the playground doesn't work via local godoc: ローカルのgodocではプレイグラウンドが動作しないことをユーザーに通知。ユーザーの混乱を避けるためのUX改善です。
  • doc (ドキュメント):
    • add Go Concurrency Patterns: Timing out, moving on article: Goの並行処理パターンに関する新しい記事の追加。Goの強みである並行処理に関する深い洞察を提供します。
    • add Go image/draw package article and convert code snippets to Go1: image/drawパッケージに関する記事の追加と、コードスニペットのGo 1対応。
    • add Gobs of data article: Goのシリアライゼーション形式であるgobに関する記事の追加。
    • add Godoc: documenting Go code article: godocツールを使ったGoコードのドキュメンテーションに関する記事の追加。
    • add JSON and Go article: JSONとGoの連携に関する記事の追加。
    • これらのドキュメント追加は、Go 1のリリースに向けて、Goの機能やベストプラクティスに関する包括的な情報を提供することを目的としています。
  • html/template:
    • add Templates and XXXEscape functions: HTMLテンプレートエンジンに新しい関数を追加。これは、ウェブアプリケーション開発におけるセキュリティ(XSS対策など)と利便性を向上させるためのものです。
  • os:
    • IsNotExist() should also consider ERROR_PATH_NOT_FOUND on Windows: Windows環境でIsNotExist()関数がERROR_PATH_NOT_FOUNDエラーも考慮するように修正。これにより、ファイルやディレクトリが存在しないことのチェックがWindowsでより堅牢になります。
  • path/filepath:
    • implement Match and Glob on windows: Windows環境でのMatchGlob関数の実装。これにより、ファイルパスのパターンマッチングとグロビングがWindowsでも正しく機能するようになります。
  • reflect:
    • panic if MakeSlice is given bad len/cap arguments: MakeSlice関数に不正なlen/cap引数が与えられた場合にパニックするように修正。リフレクションAPIの堅牢性を高めます。
  • runtime:
    • manage stack by ourselves for badcallback on windows/amd64: Windows/amd64環境での不正なコールバックに対するスタック管理の修正。ランタイムの安定性に関わる重要な修正です。
  • sort:
    • fix computation of maxDepth to avoid infinite loop: ソートアルゴリズムにおけるmaxDepthの計算修正。無限ループを回避し、ソートの安定性を確保します。
  • syscall:
    • Test SCM_CREDENTIALS, SO_PASSCRED on Linux: LinuxでのソケットオプションSCM_CREDENTIALSSO_PASSCREDのテスト追加。Unixドメインソケットを介した資格情報やファイルディスクリプタの受け渡しに関する機能のテストです。

これらの変更は、Go 1の安定性、パフォーマンス、クロスプラットフォーム互換性、そして開発者体験を向上させるための多岐にわたる努力を示しています。

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

このコミットにおけるコアとなるコードの変更は、主に以下の2つのファイルに集中しています。

  1. .hgtags
  2. doc/devel/weekly.html

.hgtags の変更

--- a/.hgtags
+++ b/.hgtags
@@ -108,4 +108,3 @@ b4a91b6933748db1a7150c06a1b55ad506e52906 weekly.2011-11-18
 96bd78e7d35e892113bdfa1bdc392d3a5f2e644b weekly.2012-02-22
 f4470a54e6dbcdd52d8d404e12e4754adcd2c948 weekly.2012-03-04
 3cdba7b0650c6c906ef3e782654f61701abd7dd2 weekly.2012-03-13
-3cdba7b0650c6c906ef3e782654f61701abd7dd2 weekly

この変更では、3cdba7b0650c6c906ef3e782654f61701abd7dd2 weekly という行が削除されています。これは、おそらく以前の週次スナップショットのタグ付けが、新しい週次スナップショットのリリースに伴い整理されたものと考えられます。Mercurialのタグ管理の一環として、古いまたは一時的なタグが削除された可能性があります。

doc/devel/weekly.html の変更

--- a/doc/devel/weekly.html
+++ b/doc/devel/weekly.html
@@ -14,7 +14,95 @@ hg pull
 hg update weekly.<i>YYYY-MM-DD</i>
 </pre>
 
-<h2 id=\"2012-03-13\">2012-03-13</h2>
+<h2 id=\"2012-03-22\">2012-03-22 (Go 1 Release Candidate 2)</h2>
+\n+\n+<pre>\n+As with last week\'s snapshot, this snapshot is another Go 1 release candidate.\n+A notable change in this snapshot are Windows installer fixes.\n+\n+Changes in this snapshot:\n+* 5l, 6l, 8l: fix stack split logic for stacks near default segment size.\n+* archive/zip: move r.zip off disk, into reader_test.go.\n+* build: catch API changes during build,\n+\tdo more during windows build (thanks Alex Brainman),\n+\tlengthen timeout for the lengthy runtime test (thanks Shenghou Ma),\n+\tunset GOPATH before tests (thanks Shenghou Ma).\n+* cmd/cgo: add support for function export for gccgo (thanks Rémy Oudompheng),\n+\tfix handling of errno for gccgo.\n+* cmd/go: add -fno-common by default on Darwin (thanks Shenghou Ma),\n+\tdon\'t add detail to errPrintedOutput,\n+\tfix directory->import path conversion,\n+\tmake build errors more visible,\n+\tuse .o, not .{5,6,8}, for gccgo created object files,\n+\twork around occasional ETXTBSY running cgo.\n+* cmd/godoc: add toys, tour button to playground,\n+\tinform users that the playground doesn\'t work via local godoc,\n+\tstyle example headings like links,\n+\tuse *goroot as base path in zip file,\n+\tuse FormatText for formating code in html template,\n+\tuse shorter titles for tabs.\n+* cmd/gofmt: show ascii in usage (thanks Yasuhiro Matsumoto).\n+* cmd/pack: also recognize \'\\\\\' as path separator in filenames (thanks Shenghou Ma).\n+* crypto/tls: always send a Certificate message if one was requested.\n+* doc/install: remove reference to \"Go Tutorial\" (thanks Shenghou Ma).\n+* doc/play: use []rune instead of []int (thanks Yasuhiro Matsumoto).\n+* doc: add Go Concurrency Patterns: Timing out, moving on article (thanks Francisco Souza),\n+\tadd Go image/draw package article and convert code snippets to Go1,\n+\tadd Gobs of data article (thanks Francisco Souza),\n+\tadd Godoc: documenting Go code article (thanks Francisco Souza),\n+\tadd JSON and Go article (thanks Francisco Souza),\n+\tgeneral update of gccgo installation instructions,\n+\tminor updates to most docs.\n+* flag: add examples.\n+* gc: fix struct and array comparisons for new bool rules (thanks Anthony Martin),\n+\tuse quoted string format in import error,\n+\twhen expanding append inline, preserve arguments.\n+* go/build: clarify why we exclude files starting with \'_\' or \'.\' (thanks Shenghou Ma),\n+\tclearer argument name for Import (src -> srcDir),\n+\tdo not report Target for local imports,\n+\tfix match.\n+* go/printer, gofmt: fix multi-line logic.\n+* html/template: add Templates and XXXEscape functions,\n+\tfix nil pointer bug,\n+\tfix panic on Clone.\n+* io/ioutil: fix crash when Stat fails.\n+* make.bat: fix for old files (thanks Christopher Redden),\n+\tdon\'t show error message if old generated files do not exist (thanks Shenghou Ma),\n+\tproperly handle directories with spaces (thanks Alex Brainman).\n+* misc/cgo/gmp: update for Go 1 (thanks Shenghou Ma).\n+* misc/dashboard: remove old python package dashboard.\n+* misc/dist: don\'t ship cmd/cov or cmd/prof,\n+\tforce modes to 0755 or 0644 in tarballs,\n+\tremove exp and old before building.\n+* misc/vim: restore fileencodings (thanks Yasuhiro Matsumoto).\n+* net/http: couple more triv.go modernizations,\n+\tensure triv.go compiles and runs (thanks Robert Hencke).\n+* net: drop unnecessary type assertions and fix leak in test (thanks Mikio Hara).\n+* os: IsNotExist() should also consider ERROR_PATH_NOT_FOUND on Windows (thanks Shenghou Ma),\n+\tdo not assume syscall.Write will write everything,\n+\tremove document duplication in error predicate functions (thanks Shenghou Ma),\n+\treturn some invented data from Stat(DevNull) on windows (thanks Alex Brainman).\n+* path/filepath: implement Match and Glob on windows (thanks Alex Brainman).\n+* reflect: document PkgPath, Method, StructField,\n+\tpanic if MakeSlice is given bad len/cap arguments.\n+* run.bat: disable test in test\\bench\\go1 to fix build (thanks Alex Brainman).\n+* runtime/cgo: darwin signal masking (thanks Mikio Hara),\n+\tlinux signal masking (thanks Mikio Hara).\n+* runtime: do not handle signals before configuring handler,\n+\tmanage stack by ourselves for badcallback on windows/amd64 (thanks Shenghou Ma),\n+\tremove unused goc2c.c (thanks Shenghou Ma).\n+* sort: add time complexity to doc (thanks Stefan Nilsson),\n+\tfix computation of maxDepth to avoid infinite loop (thanks Stefan Nilsson).\n+* spec: delete references to unsafe.Reflect,Typeof,Unreflect.\n+* syscall: Test SCM_CREDENTIALS, SO_PASSCRED on Linux (thanks Albert Strasheim),\n+\tadd a test for passing an fd over a unix socket,\n+\tdelete passfd_test.go.\n+* test: use testlib in a few more cases (thanks Shenghou Ma).\n+* text/template: fix a couple of parse bugs around identifiers,\n+\tvariables do not take arguments.\n+</pre>\n+\n+<h2 id=\"2012-03-13\">2012-03-13 (Go 1 Release Candidate 1)</h2>\n \n <pre>\n This weekly snapshot is very close to what we expect will be the contents of\n```

この変更は、`doc/devel/weekly.html` ファイルに新しいセクション `<h2 id="2012-03-22">2012-03-22 (Go 1 Release Candidate 2)</h2>` を追加し、その下にGo 1 RC2に含まれる変更点の詳細なリストを記述しています。このリストは、前述の「技術的詳細」セクションで解説したように、コンパイラ、ランタイム、標準ライブラリ、ツール、ドキュメントなど、Goエコシステムの様々な側面における修正と改善を網羅しています。

また、既存の `<h2 id="2012-03-13">2012-03-13</h2>` の見出しが `<h2 id="2012-03-13">2012-03-13 (Go 1 Release Candidate 1)</h2>` に変更されており、Go 1 RC1としての位置づけが明確にされています。

## コアとなるコードの解説

### `.hgtags` の役割

`.hgtags` ファイルは、Mercurialリポジトリにおけるタグの定義を保持します。各行は `[コミットハッシュ] [タグ名]` の形式で構成され、特定のコミットに人間が読める名前(タグ)を関連付けます。このコミットで特定の行が削除されたのは、おそらく古い週次スナップショットのタグが整理されたためです。これは、リポジトリのタグ履歴をクリーンに保つための一般的なメンテナンス作業です。

### `doc/devel/weekly.html` の役割

`doc/devel/weekly.html` は、Goプロジェクトの公式ドキュメントの一部であり、週次スナップショットのリリースノートとして機能していました。このファイルは、各週次スナップショットで導入された変更点、バグ修正、新機能などを開発者コミュニティに伝えるための主要なチャネルでした。

このコミットでこのファイルが更新されたことは、Go 1 Release Candidate 2のリリースが正式に行われたことを意味します。ファイルに追加された詳細な変更リストは、開発者がGo 1 RC2にアップグレードする際に何が変更されたかを理解し、自身のコードベースへの影響を評価するための重要な情報源となります。特に、Windowsインストーラーの修正や、Go 1のAPI互換性に関する言及は、このリリースがGo 1の安定性と広範な採用に焦点を当てていたことを強調しています。

このドキュメントは、Go開発チームがコミュニティに対して透明性を保ち、開発の進捗状況を定期的に共有する上で不可欠な役割を果たしていました。

## 関連リンク

*   Go言語公式サイト: [https://go.dev/](https://go.dev/)
*   Go 1 Release Notes (最終版): [https://go.dev/doc/go1](https://go.dev/doc/go1) (Go 1.0の正式リリースノート)

## 参考にした情報源リンク

*   `/home/orange/Project/comemo/commit_data/12727.txt` (コミット情報)
*   Google Web Search (query: "Go 1 Release Candidate 2 release date")