Skip to content

Commit

Permalink
doc/go1.4.html: document new subrepo import paths
Browse files Browse the repository at this point in the history
LGTM=r, adg
R=adg, r, 0xjnml, dr.volker.dobler
CC=golang-codereviews
https://golang.org/cl/166980044
  • Loading branch information
rsc committed Nov 6, 2014
1 parent 590f528 commit 67742ef
Showing 1 changed file with 27 additions and 9 deletions.
36 changes: 27 additions & 9 deletions doc/go1.4.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ <h3 id="android">Android</h3>
<p>
Go 1.4 can build binaries for ARM processors running the Android operating system.
It can also build a <code>.so</code> library that can be loaded by an Android application
using the supporting packages in the <a href="http://code.google.com/p/go.mobile">go.mobile</a> repository.
using the supporting packages in the <a href="http://golang.org/x/mobile">mobile</a> subrepository.
A brief description of the plans for this experimental port are available
<a href="/s/go14android">here</a>.
</p>
Expand Down Expand Up @@ -385,6 +385,24 @@ <h3 id="canonicalimports">Canonical import paths</h3>
<a href="http://golang.org/s/go14customimport">the design document</a>.
</p>

<h3 id="subrepo">Import paths for the subrepositories</h3>

<p>
The Go project subrepositories (<code>code.google.com/p/go.tools</code> and so on)
are now available under custom import paths replacing <code>code.google.com/p/go.</code> with <code>golang.org/x/</code>,
as in <code>golang.org/x/tools</code>.
We will add canonical import comments to the code around June 1, 2015,
at which point Go 1.4 and later will stop accepting the old <code>code.google.com</code> paths.
</p>

<p>
<em>Updating</em>: All code that imports from subrepositories should change
to use the new <code>golang.org</code> paths.
Go 1.0 and later can resolve and import the new paths, so updating will not break
compatibility with older releases.
Code that has not updated will stop compiling with Go 1.4 around June 1, 2015.
</p>

<h3 id="gogenerate">The go generate subcommand</h3>

<p>
Expand All @@ -394,8 +412,8 @@ <h3 id="gogenerate">The go generate subcommand</h3>
For example, it can be used to run the <a href="/cmd/yacc"><code>yacc</code></a>
compiler-compiler on a <code>.y</code> file to produce the Go source file implementing the grammar,
or to automate the generation of <code>String</code> methods for typed constants using the new
<a href="http://godoc.org/code.google.com/p/go.tools/cmd/stringer">stringer</a>
tool in the <code>go.tools</code> repository.
<a href="http://godoc.org/golang.org/x/tools/cmd/stringer">stringer</a>
tool in the <code>golang.org/x/tools</code> subrepository.
</p>

<p>
Expand Down Expand Up @@ -480,7 +498,7 @@ <h3 id="pkg">Changes to package source layout</h3>
<p>
In the main Go source repository, the source code for the packages was kept in
the directory <code>src/pkg</code>, which made sense but differed from
other repositories, including the Go sub-repositories such as <code>go.tools</code>.
other repositories, including the Go subrepositories.
In Go 1.4, the<code> pkg</code> level of the source tree is now gone, so for example
the <a href="/pkg/fmt/"><code>fmt</code></a> package's source, once kept in
directory <code>src/pkg/fmt</code>, now lives one level higher in <code>src/fmt</code>.
Expand Down Expand Up @@ -591,14 +609,14 @@ <h4 id="syscall">syscall</h4>
</p>

<p>
A new subrepository, <a href="http://code.google.com/p/go.sys">go.sys</a>,
A new subrepository, <a href="http://golang.org/x/sys">golang.org/x/sys</a>,
has been created to serve as the location for new developments to support system
calls on all kernels.
It has a nicer structure, with three packages that each hold the implementation of
system calls for one of
<a href="http://godoc.org/code.google.com/p/go.sys/unix">Unix</a>,
<a href="http://godoc.org/code.google.com/p/go.sys/windows">Windows</a> and
<a href="http://godoc.org/code.google.com/p/go.sys/plan9">Plan 9</a>.
<a href="http://godoc.org/golang.org/x/sys/unix">Unix</a>,
<a href="http://godoc.org/golang.org/x/sys/windows">Windows</a> and
<a href="http://godoc.org/golang.org/x/sys/plan9">Plan 9</a>.
These packages will be curated more generously, accepting all reasonable changes
that reflect kernel interfaces in those operating systems.
See the documentation and the article mentioned above for more information.
Expand All @@ -608,7 +626,7 @@ <h4 id="syscall">syscall</h4>
<em>Updating</em>: Existing programs are not affected as the <code>syscall</code>
package is largely unchanged from the 1.3 release.
Future development that requires system calls not in the <code>syscall</code> package
should build on <code>go.sys</code> instead.
should build on <code>golang.org/x/sys</code> instead.
</p>

<h3 id="minor_library_changes">Minor changes to the library</h3>
Expand Down

0 comments on commit 67742ef

Please sign in to comment.