<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go, branch weekly.2011-09-21</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=weekly.2011-09-21</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=weekly.2011-09-21'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2011-09-22T05:06:10Z</updated>
<entry>
<title>weekly.2011-09-21</title>
<updated>2011-09-22T05:06:10Z</updated>
<author>
<name>Andrew Gerrand</name>
<email>adg@golang.org</email>
</author>
<published>2011-09-22T05:06:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=e4ac43b7f07379715cbed7355bc3710e709c34ef'/>
<id>urn:sha1:e4ac43b7f07379715cbed7355bc3710e709c34ef</id>
<content type='text'>
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/5075050
</content>
</entry>
<entry>
<title>exp/template/html: elide comments in template source.</title>
<updated>2011-09-22T04:38:40Z</updated>
<author>
<name>Mike Samuel</name>
<email>mikesamuel@gmail.com</email>
</author>
<published>2011-09-22T04:38:40Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=35819729b83b8521e9ae1bddca5c368672777de5'/>
<id>urn:sha1:35819729b83b8521e9ae1bddca5c368672777de5</id>
<content type='text'>
When templates are stored in external files, developers often embed
comments to explain&amp;|disable code.

  &lt;!-- Oblique reference to project code name here --&gt;
  {{if .C}}...{{else}}&lt;!-- commented out default --&gt;{{end}}

This unnecessarily increases the size of shipped HTML and can leak
information.

This change elides all comments of the following types:
1. &lt;!-- ... --&gt; comments found in source.
2. /*...*/ and // comments found in &lt;script&gt; elements.
3. /*...*/ and // comments found in &lt;style&gt; elements.

It does not elide /*...*/ or // comments found in HTML attributes:
4. &lt;button onclick="/*...*/"&gt;
5. &lt;div style="/*...*/"&gt;

I can find no examples of comments in attributes in Closure Templates
code and doing so would require keeping track of character positions
post decode in

  &lt;button onclick="/&amp;#42;...*/"&gt;

To prevent token joining, /*comments*/ are JS and CSS comments are
replaced with a whitespace char.
HTML comments are not, but to prevent token joining we could try to
detect cases like
   &lt;&lt;!----&gt;b&gt;
   &lt;/&lt;!----&gt;b&gt;
which has a well defined meaning in HTML but will cause a validator
to barf.  This is difficult, and this is a very minor case.
I have punted for now, but if we need to address this case, the best
way would be to normalize '&lt;' in stateText to '&amp;lt;' consistently.

The whitespace to replace a JS /*comment*/ with depends on whether
there is an embedded line terminator since
    break/*
    */foo
    ...
is equivalent to
    break;
    foo
    ...
while
    break/**/foo
    ...
is equivalent to
    break foo;
    ...

Comment eliding can interfere with IE conditional comments.
http://en.wikipedia.org/wiki/Conditional_comment

&lt;!--[if IE 6]&gt;
&lt;p&gt;You are using Internet Explorer 6.&lt;/p&gt;
&lt;![endif]--&gt;

/*@cc_on
  document.write("You are using IE4 or higher");
@*/

I have not encountered these in production template code, and
the typed content change in CL 4962067 provides an escape-hatch
if conditional comments are needed.

R=nigeltao
CC=golang-dev
https://golang.org/cl/4999042
</content>
</entry>
<entry>
<title>A&amp;C: Add Paul Sbarra.</title>
<updated>2011-09-22T03:05:13Z</updated>
<author>
<name>David Symonds</name>
<email>dsymonds@golang.org</email>
</author>
<published>2011-09-22T03:05:13Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=7eab0c2bdc6b3d8694b36254c6ab3e65f8258d26'/>
<id>urn:sha1:7eab0c2bdc6b3d8694b36254c6ab3e65f8258d26</id>
<content type='text'>
R=golang-dev, adg
CC=golang-dev, sbarra.paul
https://golang.org/cl/5044045
</content>
</entry>
<entry>
<title>exp/template/html: simplify transition functions</title>
<updated>2011-09-22T02:04:41Z</updated>
<author>
<name>Mike Samuel</name>
<email>mikesamuel@gmail.com</email>
</author>
<published>2011-09-22T02:04:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=1f577d26d7c7a935c792dacc6cc50826cfd77af0'/>
<id>urn:sha1:1f577d26d7c7a935c792dacc6cc50826cfd77af0</id>
<content type='text'>
This simplifies transition functions to make it easier to reliably
elide comments in a later CL.

Before:
- transition functions are responsible for detecting special end tags.
After:
- the code to detect special end tags is done in one place.

We were relying on end tags being skipped which meant we were
not noticing comments inside script/style elements that contain no
substitutions.
This change means we will notice all such comments where necessary,
but stripTags will notice none since it does not need to.  This speeds
up stripTags.

R=nigeltao
CC=golang-dev
https://golang.org/cl/5074041
</content>
</entry>
<entry>
<title>test: match gccgo error messages</title>
<updated>2011-09-22T00:25:48Z</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2011-09-22T00:25:48Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=9169c27eaa5d3209b687249b5045c27f73327715'/>
<id>urn:sha1:9169c27eaa5d3209b687249b5045c27f73327715</id>
<content type='text'>
bug363.go:13:12: error: invalid context-determined non-integer type for shift operand
bug363.go:16:12: error: invalid context-determined non-integer type for shift operand

pointer.go:34:6: error: incompatible type in initialization (pointer to interface type has no methods)
pointer.go:36:6: error: incompatible type in initialization

method2.go:15:1: error: invalid pointer or interface receiver type
method2.go:16:1: error: invalid pointer or interface receiver type
method2.go:21:1: error: invalid pointer or interface receiver type
method2.go:22:1: error: invalid pointer or interface receiver type
method2.go:28:15: error: type ‘*Val’ has no method ‘val’
method2.go:33:11: error: reference to undefined field or method ‘val’

shift1.go:19:16: error: invalid context-determined non-integer type for shift operand
shift1.go:24:19: error: invalid context-determined non-integer type for shift operand
shift1.go:25:17: error: invalid context-determined non-integer type for shift operand
shift1.go:18:18: error: shift of non-integer operand
shift1.go:26:13: error: floating point constant truncated to integer
shift1.go:33:15: error: integer constant overflow
shift1.go:34:15: error: integer constant overflow
shift1.go:35:17: error: integer constant overflow

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5081051
</content>
</entry>
<entry>
<title>godoc: simplify internal FileSystem interface</title>
<updated>2011-09-21T22:12:06Z</updated>
<author>
<name>Robert Griesemer</name>
<email>gri@golang.org</email>
</author>
<published>2011-09-21T22:12:06Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=ec8469b6c7fcdfd1180c11db9e4862da4f15c172'/>
<id>urn:sha1:ec8469b6c7fcdfd1180c11db9e4862da4f15c172</id>
<content type='text'>
- also fixed bug: ReadFile never closed the file before
- per suggestion by bradfitz

R=bradfitz
CC=golang-dev
https://golang.org/cl/5092047
</content>
</entry>
<entry>
<title>gob: slightly simpler decodeUint</title>
<updated>2011-09-21T21:47:00Z</updated>
<author>
<name>Robert Griesemer</name>
<email>gri@golang.org</email>
</author>
<published>2011-09-21T21:47:00Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=3e02fff00712c3ab714b51c6b61fa6ac79d5275d'/>
<id>urn:sha1:3e02fff00712c3ab714b51c6b61fa6ac79d5275d</id>
<content type='text'>
R=r
CC=golang-dev
https://golang.org/cl/5089048
</content>
</entry>
<entry>
<title>gob: slightly simpler code for encodeUint</title>
<updated>2011-09-21T21:18:48Z</updated>
<author>
<name>Robert Griesemer</name>
<email>gri@golang.org</email>
</author>
<published>2011-09-21T21:18:48Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=91a48115bb7d773ac38f46e3127b6ca8a6c3e980'/>
<id>urn:sha1:91a48115bb7d773ac38f46e3127b6ca8a6c3e980</id>
<content type='text'>
R=r
CC=golang-dev
https://golang.org/cl/5077047
</content>
</entry>
<entry>
<title>bytes: fix Replace so it actually copies</title>
<updated>2011-09-21T15:36:17Z</updated>
<author>
<name>Gustavo Niemeyer</name>
<email>gustavo@niemeyer.net</email>
</author>
<published>2011-09-21T15:36:17Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=d16ceca5c59c79c63f4847244d784ac49c944ff4'/>
<id>urn:sha1:d16ceca5c59c79c63f4847244d784ac49c944ff4</id>
<content type='text'>
The documentation for bytes.Replace says it copies
the slice but it won't necessarily copy them.  Since
the data is mutable, breaking the contract is an issue.

We either have to fix this by making the copy at all
times, as suggested in this CL, or we should change the
documentation and perhaps make better use of the fact
it's fine to mutate the slice in place otherwise.

R=golang-dev, bradfitz, adg, rsc
CC=golang-dev
https://golang.org/cl/5081043
</content>
</entry>
<entry>
<title>http: add a (disabled) test for TLS handshake timeouts</title>
<updated>2011-09-21T15:30:47Z</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@golang.org</email>
</author>
<published>2011-09-21T15:30:47Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=96f968df9ca9533b5f6bd04bc288a047e275b9a2'/>
<id>urn:sha1:96f968df9ca9533b5f6bd04bc288a047e275b9a2</id>
<content type='text'>
It's currently broken and disabled, pending a fix
for Issue 2281.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/5092045
</content>
</entry>
</feed>
