id
int64
393k
2.82B
repo
stringclasses
68 values
title
stringlengths
1
936
body
stringlengths
0
256k
โŒ€
labels
stringlengths
2
508
priority
stringclasses
3 values
severity
stringclasses
3 values
51,288,402
go
x/pkgsite: support company-specific doc annotations
<pre>Google internally runs a godoc server serving docs for the standard library + all of Google $GOPATH (all internal Google Go code). In many cases, we'd like to mention the Google-specific libraries or ways of doing things from the standard library docs. It would be nice if there were a file we could maintain that appended company-specific doc annotations to the standard library on at least: -- packages -- funcs -- types -- specific fields on struct types</pre>
NeedsInvestigation
low
Minor
51,288,455
go
runtime: don't allocate for non-escaping conversions to interface{}
<pre>fmt.Fprintf(&quot;%d&quot;, 8) Since all interface data fields are now pointers, an int must be allocated and initialized to 8 so that it can be put in an interface{} to pass to Fprintf. Since we know the 8 doesn't escape, we could instead allocate that 8 on the stack and have the interface data word point to that stack slot. To be safe, we can only do this when the resulting interface{} doesn't escape. We probably also need to be sure the conversion happens at most once so the stack slot is not reused. We could have a special convT2Enoescape call for the compiler to use when it knows the result doesn't escape. Maybe also convT2I, assertT2E, ...</pre>
Performance
high
Critical
51,288,473
go
runtime: make GC runtime stats test run on GCE
<pre>In <a href="https://code.google.com/p/go/source/detail?r=ec6629ef3dae19">https://code.google.com/p/go/source/detail?r=ec6629ef3dae19</a> I removed part of a test that Dmitry liked because it doesn't run on GCE (which only has ~1ms timers apparently). This bug is about restoring the test somehow. We could make it a -short test (so it's skipped on builders, but runs on our machiens). Or try the test first and if we get a 0ns pause, then generate a lot of garbage and try for a &gt;= 1 ms GC pause, which is measurable on Windows (physical hardware) and GCE (any OS).</pre>
NeedsInvestigation
low
Critical
51,288,477
go
x/tools/imports: Removes comments if it doesn't see "package"
<pre>$ printf '// i am precious\n' &gt;i.go &amp;&amp; goimports -d i.go diff i.go gofmt/i.go --- /home/tv/tmp/gofmt524290255 2014-09-03 11:33:53.118042810 -0700 +++ /home/tv/tmp/gofmt219767778 2014-09-03 11:33:53.118042810 -0700 @@ -1 +1 @@ -// i am precious + $ gofmt -d i.go i.go:1:18: expected 'package', found 'EOF' $ printf '// i am precious\nfunc f() {}' &gt;i.go &amp;&amp; goimports -d i.go diff i.go gofmt/i.go --- /home/tv/tmp/gofmt433476709 2014-09-03 11:36:09.002716626 -0700 +++ /home/tv/tmp/gofmt636561536 2014-09-03 11:36:09.002716626 -0700 @@ -1,2 +1 @@ -// i am precious func f() {} \ No newline at end of file I'm ok with getting an error about invalid Go, or having a still-invalid file that preserves the comments. I am not ok with losing my input. This is extra annoying when goimports is hooked into editor save, and I move a documented function into a new file.</pre>
NeedsInvestigation
low
Critical
51,288,516
go
cmd/compile: In struct literals, type check outside in rather than inside out.
<pre>When constructing a struct literal, the types appear to be checked from the &quot;inside out&quot;, that is, it appears that the last thing checked is that the variable type matches the struct field. This leads to <a href="http://play.golang.org/p/vwvF9uNyhU">http://play.golang.org/p/vwvF9uNyhU</a>, where the error is really that the outer literal should be [][]float64, not that the inner literals are the wrong type.</pre>
NeedsInvestigation
low
Critical
51,288,598
go
cmd/compile: random performance fluctuations after unrelated changes
<pre>We see constant performance fluctuations after unrelated changes on the perf dashboard. For example: <a href="http://build.golang.org/perfdetail?commit=96c713ab6c6f2a4b2a8a0bb2e8d674637b6ce596&amp">http://build.golang.org/perfdetail?commit=96c713ab6c6f2a4b2a8a0bb2e8d674637b6ce596&amp</a>;commit0=fee5fcd5f87e75235d93fb297123feb15a59ae38&amp;builder=linux-amd64-perf&amp;benchmark=json <a href="http://build.golang.org/perfdetail?commit=455042166f1366b147e1249b8d5639be7d67bfce&amp">http://build.golang.org/perfdetail?commit=455042166f1366b147e1249b8d5639be7d67bfce&amp</a>;commit0=0a5fafdd2343b083457d0baf6487dfce0f01e25f&amp;builder=windows-amd64-perf&amp;benchmark=json <a href="http://build.golang.org/perfdetail?commit=ad5d9f8f9be743e72f89d85d8bd6348807bdac90&amp">http://build.golang.org/perfdetail?commit=ad5d9f8f9be743e72f89d85d8bd6348807bdac90&amp</a>;commit0=fc588981a45afa430a2d2cd29d234403cb86e1bd&amp;builder=windows-amd64-perf&amp;benchmark=json I can reproduce it locally as well. I've took 2 consecutive commits: changeset: 21142:91110f70916a summary: runtime: allow crash from gsignal stack changeset: 21141:0768bb1fd027 summary: net: fix inconsistent behavior across platforms in SetKeepAlivePeriod and run go.benchmarks binary as: ./bench -bench=json -benchtime=3s -benchnum=100 alternating old and new binaries. The results are: GOPERF-METRIC:time=91998310 GOPERF-METRIC:time=91863644 GOPERF-METRIC:time=91491272 GOPERF-METRIC:time=91988322 new: GOPERF-METRIC:time=93191495 GOPERF-METRIC:time=93222905 GOPERF-METRIC:time=93224972 GOPERF-METRIC:time=93140395 The difference is now that big (probably because my processors panilizes less what is being penalized), but clearly observable. It looks like code alignment issue. Probably loops are not 16-byte aligned or something like this. I guess this also penalizes user binaries in the same random and unpredictable way.</pre>
Performance,NeedsFix
low
Critical
51,288,599
go
go/types: constant values should reported as machine values for concrete types
<pre>Feature request: The reported values of constants should be the respective machine values (perhaps in addition to the precise values) if the constant type is not an untyped type.</pre>
NeedsInvestigation
low
Minor
51,288,624
go
runtime,sync/atomic: unify API for runtime/internal/atomic and sync/atomic
<pre>We need to unify interface of atomic operations between runtime package and sync/atomic package. And then teach gc to replace functions in both packages with intrinsics where possible. This is followup to <a href="https://golang.org/issue/4947">https://golang.org/issue/4947</a> which was about atomic intrinsics for runtime C code.</pre>
Performance
low
Major
51,288,625
go
cmd/compile: merge temporaries more aggressively
<pre>CL 12829043 added a compiler pass that merges temporary variables with equal types and non-overlapping lifetimes. I believe that &quot;equal types&quot; is sufficient but not necessary and that &quot;equivalent w.r.t. GC&quot; is both necessary and sufficient. (Please correct me if I am wrong!) This should allow more temporaries to be merged, further reducing stack usage.</pre>
Performance,NeedsFix
low
Major
51,288,626
go
testing: measure coverage inside boolean expressions
<pre>Test coverage works on basic blocks. It could be extended to short-circuiting boolean expressions like f() &amp;&amp; g(). Approach: func GoCoverBool(ret bool, n int) bool { GoCover.Count[n] = 1 return ret } Rewrite f() &amp;&amp; g() to f() &amp;&amp; GoCoverBool(true, 5) &amp;&amp; g() and f() || g() to f() || GoCoverBool(false, 5) || g(). I don't know what adjustments to the downstream tools this might require.</pre>
help wanted
low
Minor
51,288,651
go
x/sys/unix: Sysctl doesn't supporting writing values
<pre>Hello, This is not really reporting defects but more like a feature request. In syscall package, or go.sys package, Sysctl is defined as: func Sysctl(name string) (value string, err error) It provides a way to read values through sysctl, but makes it impossible to write/update values. Internally, it uses &quot;sysctl&quot; defined in each particular OS / ARCH. For example, (from zsyscall_freebsd_amd64.go): func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) It would be nice if it can be exported in some way because this is essentially the same interface as defined in BSD systems. e.g. <a href="https://www.freebsd.org/cgi/man.cgi?sysctl(3)">https://www.freebsd.org/cgi/man.cgi?sysctl(3)</a> int sysctl(const int *name, u_int namelen, void *oldp, size_t *oldlenp, const void *newp, size_t newlen); int sysctlbyname(const char *name, void *oldp, size_t *oldlenp, const void *newp, size_t newlen); Can we provide a similar set of functions in go.sys that provides full sysctl support (both read / write)? If go.sys is not frozen yet, maybe it's a good idea to use the function names used in most BSD systems, in which case current Sysctl will need to be renamed to, e.g., SysctlRead.</pre>
NeedsInvestigation
low
Critical
51,288,652
go
runtime: shrink stacks more aggressively on explicit GC
<pre>If the user calls runtime.GC or debug.FreeOSMemory, shrink stacks even if they are &gt; 1/4 full. That way we can reclaim more space (at the expense of incurring runtime cost when those goroutines start back up). Maybe also if gp.blockedsince shows the goroutine has been blocked for a long time.</pre>
NeedsInvestigation
low
Critical
51,288,658
go
html/template: provide a way to specify the initial escaping context (JS or CSS) when parsing
<pre>There is currently no way (that I am aware of) to specify the initial escaping context (JS or CSS, or other?) when parsing a template using html/template. The use case where this would be useful is when treating JS or CSS files as templates. In these cases, it would seem to make sense to be able to call Template.Parse() with an initial escaping context, telling it to treat this as a JS (or other) file. Some example use cases for treating JS or CSS files as templates are to inject translated text into them (JS), or dynamically inlining images as data urls (CSS). To work around this using the current system, you get something like this: <a href="http://play.golang.org/p/J-21ux0gLE">http://play.golang.org/p/J-21ux0gLE</a> As you can see, having this as a template: //&lt;script&gt; (function(){console.log(&quot;hello&quot;)})() {{jsraw &quot;//&quot;}}&lt;/script&gt; is rather crufty. It would make much more sense to lose the script tag trickery and instead when we parse, do something like this: t, err := t.Parse(jsInput, template.TypeJS)</pre>
NeedsInvestigation
low
Minor
51,288,659
go
go/types: need way to get from function type to function decl
<pre>From a mail conversation: On Fri, Sep 12, 2014 at 12:09 PM, Peter Collingbourne &lt;[email protected]&gt; wrote: This information is significant for name mangling and is therefore needed. If there were a convenient way to ask a named type for its enclosing function, I think it would be possible to get rid of this traversal. Robert might have opinions on this. On Fri, Sep 12, 2014 at 5:05 PM, Robert Griesemer &lt;[email protected]&gt; wrote: You should be able to get the scope for each variable (Object) via Parent(). Furthermore, Info.Scopes should give you a mapping of nodes to scopes, which should make this simpler. But perhaps I am missing something. Peter Collingbourne: I looked at Info.Scopes. I imagine that I could potentially make that work if I built my own scope-to-function map from that mapping. According to the documentation, I might expect to find (among other things) ast.FuncType keys in the map. Is this what I should expect functions to be represented as? I looked up ast.FuncType and could not see any way to get the function's name. It seems like it would be more useful for me if that map stored FuncDecl keys. (If that wouldn't work for whatever reason, it seems better to me for go/types to maintain the mapping from scopes to objects, maybe just by adding an Object field to Scope). -------------------- Need to rethink connection between function types/decls and scopes.</pre>
Thinking
low
Minor
51,288,681
go
encoding/gob: should report if a name is registered or not.
by **[email protected]**: <pre>It would be nice to have a logical function to go with gob.Register() that reports back if an object is actually registered. This would help establish if encoding of a given object is actually going to be readable on the other end or not. I attached a terrible, poorly written and completely untested conceptual patch to show my intentions.</pre> Attachments: 1. <a href="https://storage.googleapis.com/go-attachment/8779/0/gob.patch">gob.patch</a> (1806 bytes)
NeedsInvestigation
low
Minor
51,288,723
go
cmd/cgo: C streams are not flushed at program exit
by **kalyanakrishna**: <pre>What does 'go version' print? go version go1.3.1 linux/amd64 What steps reproduce the problem? Take the first example on this page: <a href="https://code.google.com/p/go-wiki/wiki/cgo">https://code.google.com/p/go-wiki/wiki/cgo</a> Add func main() { Example() } remove &quot;\n&quot; from cs build and run What happened? Nothing prints What should have happened instead? it should have printed &quot;Hello from stdio&quot; without a trailing newline Additional detail: If &quot;\n&quot; appears in the printf argument anywhere, it will print till \n and discard everything after \n ex: if you change cs to &quot;Hello from stdio \n and go &quot;, it will print &quot;Hello from stdio&quot; this will happen even if you modify printf directly ex: if printf is modified to printf(&quot;%s 123 &quot;, s); it will print till the last &quot;\n&quot; it encounters and discard the rest. so if s was &quot;hello from stdio\n&quot;, it will print &quot;hello from stdio&quot; and discard 123 If possible, include a link to a program on play.golang.org. import &quot;C&quot; wont work on play.golang.org</pre>
NeedsInvestigation
low
Minor
51,288,773
go
cmd/link: invalid dwarf frames
<pre>What does 'go version' print? go version go1.3 darwin/amd64 What steps reproduce the problem? If possible, include a link to a program on play.golang.org. 1. Compile test.go <a href="http://play.golang.org/p/8G9JQFMlmY">http://play.golang.org/p/8G9JQFMlmY</a> 2. Run lldb test 3. b main.foo 4. run What happened? lldb segfaulted What should have happened instead? no segfault Please provide any additional information below. It looks to me like the go compiler is generating invalid dwarf frames. I can't really follow the code in dwarf.c to tell what's going on. Here's what dwarfdump shows: 0x00000014: FDE length: 0x00000020 CIE_pointer: 0x00000000 start_addr: 0x0000000000002000 main.foo range_size: 0x0000000000000060 (end_addr = 0x0000000000002060) Instructions: 0x0000000000002000: CFA=rsp+8 rip=[rsp] DW_CFA_advance_loc (25) DW_CFA_def_cfa_offset_sf (rax, 8) 0x0000000000002019: CFA=rsp+8 rip=[rsp] DW_CFA_advance_loc (55) DW_CFA_def_cfa_offset_sf (rax, 24) 0x0000000000002050: CFA=rsp+24 rip=[rsp+16] DW_CFA_advance_loc (16) DW_CFA_def_cfa_offset_sf (rax, 8) DW_CFA_nop DW_CFA_nop DW_CFA_nop 0x0000000000002060: CFA=rsp+8 rip=[rsp] If I'm reading the dissasembly right, I think the rows should be 0x0000000000002000: CFA=rsp+8 rip=[rsp] 0x0000000000002019: CFA=rsp+24 rip=[rsp+16] 0x0000000000002050: CFA=rsp+8 rip=[rsp] Also, dwarfdump --verify complains because the row for 0x2060 is beyond the address range of the function. Here's the disassembled function: test`main.foo at test.go:3: test[0x2000]: movq %gs:0x8a0, %rcx test[0x2009]: cmpq (%rcx), %rsp test[0x200c]: ja 0x2015 ; main.foo + 21 at test.go:3 test[0x200e]: callq 0x21710 ; runtime.morestack8_noctxt at asm_amd64.s:495 test[0x2013]: jmp 0x2000 ; main.foo at test.go:3 test[0x2015]: subq $0x10, %rsp test[0x2019]: leaq 0x2b800, %rbx test[0x2021]: leaq (%rsp), %rbp test[0x2025]: movq %rbp, %rdi test[0x2028]: movq %rbx, %rsi test[0x202b]: movsq (%rsi), %es:(%rdi) test[0x202d]: movsq (%rsi), %es:(%rdi) test[0x202f]: callq 0x10770 ; runtime.printstring at print.c:373 test[0x2034]: callq 0x107e0 ; runtime.printsp at print.c:384 test[0x2039]: movq 0x18(%rsp), %rbx test[0x203e]: movq %rbx, (%rsp) test[0x2042]: callq 0x10620 ; runtime.printint at print.c:340 test[0x2047]: callq 0x10820 ; runtime.printnl at print.c:390 test[0x204c]: addq $0x10, %rsp test[0x2050]: retq test[0x2051]: addb %al, (%rax) test[0x2053]: addb %al, (%rax) test[0x2055]: addb %al, (%rax) test[0x2057]: addb %al, (%rax) test[0x2059]: addb %al, (%rax) test[0x205b]: addb %al, (%rax) test[0x205d]: addb %al, (%rax)</pre>
NeedsInvestigation
low
Major
51,288,786
go
cmd/go: when compiling with gccgo uses go tool's ReleaseTags, not gccgo's
<pre>What steps reproduce the problem? 1. Install a version of go (such as 1.3) and a version of gccgo that implements a different version of the language (such as gccgo 4.9, which implements go 1.2) 2. Try to build a package that uses the go1.3 build tag to conditionally support go 1.3 features (for example, <a href="https://github.com/docker/docker/tree/master/pkg/pools">https://github.com/docker/docker/tree/master/pkg/pools</a> ) What happened? The go tool attempts to compile the file with the go1.3 built tag with gccgo, and this fails. What should have happened instead? It should have compiled the file with the !go1.3 build tag instead. Please provide any additional information below. The cause for this is pretty clear: the go tool uses the ReleaseTags from the go/build package of the standard library that the go tool was built against, which is not necessarily the same as the one the compiler being invoked. This could be fixed by compiling a little program that prints out go/build.Default.ReleaseTags and using those in the go tool There are other places where go tool and gccgo compiler have different views of things, but this is the one that is biting me today.</pre>
NeedsInvestigation
low
Major
51,288,788
go
cmd/compile: confusing error messages when a type is repeated
<pre>Code: <a href="http://play.golang.org/p/MoahP8X1aD">http://play.golang.org/p/MoahP8X1aD</a> If a type is defined twice in a given package, this can lead to unfortunate interface assignment errors. As an example, in the code above, &quot;type Foo int&quot; exists twice. The error message is prog.go:9: Foo redeclared in this block previous declaration at prog.go:3 prog.go:18: cannot convert Bar literal (type Bar) to type Fooer: Bar does not implement Fooer (wrong type for Foo method) have Foo() Foo want Foo() Foo In this particular case it's fine because the &quot;Foo redeclared&quot; error comes first, but in my actual code the interface conversion error was returned first and then there were more errors before the redeclaration error.</pre>
Suggested
low
Critical
51,288,795
go
crypto/x509: no support for parsing encrypted PKCS8 private keys
by **alex.gaynor**: <pre>Right now only un-encrypted keys are supported, it would be good if encrypted ones were as well.</pre>
FeatureRequest
medium
Critical
51,288,807
go
time: mockable time support
<pre>With <a href="https://github.com/jmhodges/clock">https://github.com/jmhodges/clock</a> and the broader <a href="https://github.com/benbjohnson/clock">https://github.com/benbjohnson/clock</a> API, there's a desire for the timing systems in Go to be fakeable[1]. Using a fake clock instead of time.Now directly is useful when testing code that stores timestamps, caches data, etc. The benbjohnson clock package attempts to make Ticker and Timer calls (as well as their related AfterFunc and Sleep methods) work against a fake time that can be set and updated in tests. However, it relies on some micro-sleeps and runtime.Gosched calls that are obviously going to be flaky. But there is a desire to able to test code that uses Tickers and Timers, not by adjusting the durations they work for (which can induce flaky testing), but by adjusting when they think they need to wake up. To do that, we seem to need more runtime magic to help developers out. In fact, it might be best if a clock package like these lived in the stdlib so that it could be tied more carefully and thoughtfully to the scheduler. [1] or &quot;mockable&quot;, whatever language you prefer. The summary of this issue is to distinguish it from <a href="https://golang.org/issue/5356">issue #5356</a>.</pre>
NeedsInvestigation
medium
Critical
51,288,816
go
net: support for android without cgo
It is possible to build Android OS binaries (not apps) without cgo. Those apps will fail because the Android OS does not define /etc/resolve.conf. Some more details on #8020 and the linked CL.
help wanted,OS-Android
medium
Major
51,288,817
go
os/user: android support
<pre>Android OS does not support getpwuid_r. There does not appear to be a C/C++ interface for this, we may have to call into Java to get some notion of users. As most apps don't make heavy use of OS-level user information, this is a low priority.</pre>
OS-Android
low
Minor
51,288,825
go
runtime: consider using SetFileIoOverlappedRange
<pre>SetFileIoOverlappedRange should improve performance/scalability of networking apps on windows: <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa365540(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/aa365540(v=vs.85).aspx</a> I have a prototype patch: <a href="https://golang.org/cl/12562049/">https://golang.org/cl/12562049/</a> but did not benchmark it. Need to benchmark it and decide whether it is worth it.</pre>
Performance,OS-Windows
low
Major
51,288,826
go
runtime: efficient access to thread-local data
<pre>Currently we have 3 performance issues with accesses to thread-local data (g/m/p): 1. Accesses require non-inlinable function calls. 2. The only thread-local var is now g, while most frequently accesses data is in m. So most of the accesses has an additional indirection. 3. We do lots of duplicate loads of g/m. We need to: 1. Make the thread-local var m (instead of g). 2. Move stack guard of the current g into m (that's the only hot data in g). 3. Declare runtime.curm variable in runtime, teach the compiler to recognize it and turn into tls access. 4. Teach compiler to not do unnecessary duplicate loads of curm (like in <a href="https://golang.org/issue/4946)">https://golang.org/issue/4946)</a>.</pre>
Performance
low
Major
51,288,828
go
runtime: don't pass *Type to new
<pre>Currently we pass a pointer to Type descriptor to new. It preserves alive all methods of allocated types, as Type contains Method array. So linker can't strip them. We should pass a special object that contains only necessary information to new: 1. size 2. size class (needs to be ignored for arrays with more than one element) 2. name string 3. embed GC pointer bitmask or a pointer to satellite GC bitmask (if both are zero, then it's noptr type)</pre>
Performance
low
Minor
51,288,829
go
runtime: don't do unnecessary loads on malloc fast path
<pre>Currently we load runtime.memstats.heap_alloc and runtime.MemProfileRate on every malloc. Both are not strictly necessary and bring 2 unnecessary cache lines into cache. Here are proof-of-concept CLs: <a href="https://golang.org/cl/129810043/">https://golang.org/cl/129810043/</a> <a href="https://golang.org/cl/128100043/">https://golang.org/cl/128100043/</a> Ideally we trigger GC directly from mcacheRefill, but it's not trivial to implement.</pre>
Performance
low
Minor
51,288,836
go
runtime: remove unnecessary allocations in convT2E
<pre>This was at lengths discussed in: <a href="https://golang.org/issue/8405">https://golang.org/issue/8405</a> and previously on golang-dev: <a href="https://groups.google.com/d/msg/golang-dev/pwUh0BVFpY0/zqJInvU3NkQJ">https://groups.google.com/d/msg/golang-dev/pwUh0BVFpY0/zqJInvU3NkQJ</a> Namely, we should allocate heap block for scalars iff the scalar look like a pointer into heap (otherwise GC will ignore it anyway). This will allow to have 1-bit/word GC pointer type info *and* don't allocate additional memory for scalars in interfaces in most cases.</pre>
Performance
low
Major
51,288,838
go
cmd/go: critical path scheduling
<pre>Currently go tool schedules work in topological order, this leads to suboptimal parallelization. It's possible that towards end, very few work items are available leading to idle processors. Critical path scheduling gives much better results in this respect: <a href="http://en.wikipedia.org/wiki/Critical_path_method">http://en.wikipedia.org/wiki/Critical_path_method</a> Here is a prototype CL: <a href="https://golang.org/cl/13235046/diff/3001/src/cmd/go/build.go">https://golang.org/cl/13235046/diff/3001/src/cmd/go/build.go</a> I've observed up to 2x 'go test -a std' speedup on a 32-way machine. We can also assign meaningful weights to work nodes: e.g. test &gt; link &gt; compile. It would also be super useful to somehow assign weights to test nodes proportional to test run time (e.g. runtime tests take significantly more than than most packages). This will have significant effect even on low-core machines (as runtime tests will start first).</pre>
ToolSpeed
medium
Critical
51,288,840
go
cmd/compile: recognize case <-time.After(x)
<pre>Compiler can recognize the common: case &lt;-time.After(x): construct and lower it into: runtime.selectrecvafter(x) Runtime can handle this case much more efficiently: no need to create Timer, chan and arm timers; it just needs to do a timed park of the goroutine until x. As a bonus, the timer does not leak.</pre>
Performance,compiler/runtime
low
Major
51,288,841
go
runtime: fine-grained locking in select
<pre>Fine-grained locking in select provides substantial speedups: benchmark old ns/op new ns/op delta BenchmarkSelectUncontended 213 188 -11.74% BenchmarkSelectUncontended-2 110 97.2 -11.64% BenchmarkSelectUncontended-4 56.2 49.5 -11.92% BenchmarkSelectUncontended-8 29.7 25.9 -12.79% BenchmarkSelectUncontended-16 17.3 16.4 -5.20% BenchmarkSelectUncontended-32 13.7 11.4 -16.79% BenchmarkSelectSyncContended 795 710 -10.69% BenchmarkSelectSyncContended-2 946 710 -24.95% BenchmarkSelectSyncContended-4 1791 1187 -33.72% BenchmarkSelectSyncContended-8 1749 637 -63.58% BenchmarkSelectSyncContended-16 2109 563 -73.30% BenchmarkSelectSyncContended-32 3165 1172 -62.97% BenchmarkSelectAsyncContended 231 208 -9.96% BenchmarkSelectAsyncContended-2 671 209 -68.85% BenchmarkSelectAsyncContended-4 395 215 -45.57% BenchmarkSelectAsyncContended-8 451 240 -46.78% BenchmarkSelectAsyncContended-16 486 233 -52.06% BenchmarkSelectAsyncContended-32 861 395 -54.12% BenchmarkSelectNonblock 126 36.0 -71.43% BenchmarkSelectNonblock-2 155 17.6 -88.65% BenchmarkSelectNonblock-4 285 8.45 -97.04% BenchmarkSelectNonblock-8 212 4.41 -97.92% BenchmarkSelectNonblock-16 180 2.44 -98.64% BenchmarkSelectNonblock-32 395 1.63 -99.59% BenchmarkSelectProdCons 1140 926 -18.77% BenchmarkSelectProdCons-2 653 545 -16.54% BenchmarkSelectProdCons-4 519 352 -32.18% BenchmarkSelectProdCons-8 667 372 -44.23% BenchmarkSelectProdCons-16 751 431 -42.61% BenchmarkSelectProdCons-32 1142 583 -48.95% Implementation: <a href="https://golang.org/cl/112990043/">https://golang.org/cl/112990043/</a></pre>
Performance,early-in-cycle,Scalability
medium
Critical
51,288,844
go
runtime: lock-free channels
<pre>Here is design doc: <a href="https://docs.google.com/document/d/1yIAYmbvL3JxOKOjuCyon7JhW4cSv1wy5hC0ApeGMV9s/pub">https://docs.google.com/document/d/1yIAYmbvL3JxOKOjuCyon7JhW4cSv1wy5hC0ApeGMV9s/pub</a> Here is the implementation: <a href="https://golang.org/cl/12544043/">https://golang.org/cl/12544043/</a> I've benchmarked the change of a real app where chans were abandoned in favor of other sync primitives due to perf reasons: <a href="https://groups.google.com/d/msg/golang-dev/0IElw_BbTrk/cGHMdNoHGQEJ">https://groups.google.com/d/msg/golang-dev/0IElw_BbTrk/cGHMdNoHGQEJ</a> and the change provides 23% end-to-end speedup making chans significantly faster than the other synchronization.</pre>
Performance
high
Critical
51,288,845
go
runtime: throttle goroutines on async chans
<pre>There is a common trick for reduction of contention on sync primitives. Unfortunately it does not have a common name, but see mutexWaiterShift handling in sync/mutex.go for an example. We can use it for async channels to reduce contention as well. Namely: - add a waiterAwake flag to Hchan - when a goroutine sends to async chan and there is a parked receiver, if waiterAwake=false unpark it and set waiterAwake, otherwise do nothing - if the woken receiver discovers empty queue, it resets waiterAwake before parking again - if the woken receiver successfully dequeues from the queue, it does: if queue empty || no parked receivers { waiterAwake = false } else { unpark one parked receiver // responsibility to manage waiterAwake and subsequent parked receivers // transfers to that next recevier } This algorithm ensures that there is at most 1 excessive receiver loafs about producing unnecessary contention. When this receivers goes away, it wakes up another receiver. And so on.</pre>
Performance
low
Minor
51,288,846
go
runtime: squeeze Hchan into 64 bytes
<pre>Currently Hchan is 12 words (on 64-bit machine). It would be nice to squeeze it into 8 words. First it's just memory consumption reduction, and second it will be exactly cache line (and due to malloc alignment, it will be also cache line aligned) which will speedup contented synchronization - ping-pong only one line instead of two + no false sharing. elemtype goes away as it is not needed. dataqsiz is a derivative of qcount/sendx/recvx, so it just goes away as well. recvq/sendq can be reduced to 1 pointer to a head of doubly-linked cycle of waiters. This gives exactly 8 words. FTR, here is a CL that lowers OCAP/OLEN for chans into runtime calls (necessary to remove dataqsiz): <a href="https://golang.org/cl/54570046/">https://golang.org/cl/54570046/</a></pre>
Performance
low
Minor
51,288,847
go
runtime: special case chan struct{}
<pre>chan struct{} is commonly used for semaphores. We can special case it in runtime as atomic counter. Then common case (of no work limiting) will be just atomicinc/atomicdec.</pre>
Performance
low
Minor
51,288,849
go
runtime: make chan-based generators faster
<pre>In some cases parallelism is not needed/desirable -- fine-grained chan-based generators/iterators, or &quot;coroutine-like&quot; approach when you have several independent stacks and manually switch between them. Sync channels substantially limit parallelism, to the point where pipeline-like parallelization does not work. But they do not eliminate it entirely, as after an operation both producer and consumer are runnable. Current implementation handles this &quot;contact bounce&quot; under-parallelization very inefficiently -- goroutines are constantly scheduled and de-scheduled, threads are constantly parked and unparked, work migrate between threads, etc. The idea is to limit parallelism on sync channels even more aggressively. So that fine-grained communication over sync channels can be very efficient. But w/o eliminating concurrency nor affecting semantics. Implementation: 1. Each P has an additional local work queue, let's call it Domain. Work form Domain can't be stolen by other P's. Domain is has maximum size of 4 goroutines. 2. When a goroutine unblocks another goroutine on a sync chan, it adds the other goroutine to own Domain (Domain of the current P) instead of putting it to the normal work queue. This effectively limits parallelism. We can use Domains in other situations, but this is outside of context of this bug. 3. When a goroutine blocks, P schedules one of the goroutines from Domain (if it's not empty). In some circumstances (e.g. a goroutine is preempted due to time slice exhaustion, or blocks in syscall) P can decide to just move all goroutines in the Domain to normal work queue. Then, *before* a goroutine blocks on a sync chan it saves Hchan and elem pointers in G and switches to another goroutine in Domain *once*. Or if it sees that a goroutine in the Domain want to accomplish a pairing operation on the same chan, it executes the operation with that other goroutine. This allows to implement tight communication over sync channels with the cost of just several function calls and w/o several degradation with GOMAXPROCS&gt;1. Communication domains form and break up dynamically. Program semantics are not affected. Here is a prototype implementation: <a href="https://golang.org/cl/74180043/">https://golang.org/cl/74180043/</a> I've benchmarked it on a real application where chan-based generators were abounded due to forementioned reasons: <a href="https://groups.google.com/d/msg/golang-dev/0IElw_BbTrk/cGHMdNoHGQEJ">https://groups.google.com/d/msg/golang-dev/0IElw_BbTrk/cGHMdNoHGQEJ</a> The change provides 17.5x speedup (and it's not the limit as runtime.switchto can be significantly more efficient).</pre>
Performance
low
Critical
51,288,860
go
cmd/link: implement external linking support for ppc64/linux
<pre>We need to fix the 9l linker to provide external linking support, so that -linkmode=external works on power64. This code is currently on the dev.power64 branch and should come into tip after the 1.4 release is out. This means writing elfreloc1, elfsetupplt, adddynsym, adddynrela, etc., in cmd/9l/asm.c and doing whatever else is necessary so that (cd misc/cgo/test &amp;&amp; go test -linkmode=external) passes for both big- and little- endian power64.</pre>
NeedsInvestigation
low
Minor
51,288,861
go
math, crypto, hash: Write power64 versions of assembler routines where applicable
<pre>We want to write power64 versions of the assembler routines in the math package, in several crypto packages, and in the hash/crc32 package. For each of those packages where we have .s files, we should either write a power64 version or determine that the Go version is as good as we can write in assembler.</pre>
NeedsInvestigation
low
Minor
51,288,933
go
go/types: expose interface satisfaction constraints
<pre>The type checker goes to very great lengths to be robust and precise even for ill-typed inputs, and it is very hard to match this level of robustness in other passes over the (typed) AST. As a result, the refactor/lexical and refactor/satisfy packages, both of which recompute information computed but not exposed by go/types, are not safe to run on programs with type errors. refactor/lexical records, for every referring identifier, the structure of the lexical environment at that point, information that is necessary for refactoring tools and impossible to derive from the Scope information currently exposed by the type checker (which is rarely useful). refactor/satisfies records the set of type pairs (x, y) such that x is assignable to interface y, and if it were not assignable, the program would not compile. This also is necessary for refactoring tools. I think the 'lexical' pass could be very cheaply and elegantly implemented into the existing type checker, and I think it should be since it is so useful; 'satisfies' is trickier.</pre>
Refactoring
low
Critical
51,288,937
go
cmd/gofmt: two dimensional slice/array formatting
by **mrekucci**: <pre>go version go1.3.1 darwin/amd64 Try to format next code snippet: <a href="http://play.golang.org/p/b0tIzdvp9i">http://play.golang.org/p/b0tIzdvp9i</a> In my opinion the code should be formatted in a way how it looks like before formatting i.e. columns aligned to comma.</pre>
Thinking
low
Minor
51,288,947
go
cmd/compile: package type name collision with built-in types in compiler error messages
by **sedevelopers01**: <pre>v1.3.3 Thread on go-nuts: <a href="https://groups.google.com/forum/#">https://groups.google.com/forum/#</a>!topic/golang-nuts/Ed3gU3EjbaI Problem: When you define a package level &quot;error&quot; type (lower-case) it shadows the built-in error type and causes error messages like: &gt; Cannot use errors.New(&quot;something wrong&quot;) (type error) as type error in return argument Solutions proposed: Maybe the type name could be shown as &quot;built in type error&quot; in error messages, and the same for &quot;built in type int&quot;. Or, on the other hand, maybe the locally defined type should be shown as &quot;type foo.error&quot; where foo is the package name in which it is defined. And then, why not both? That would make all error messages redundantly unambiguous. We've tried very hard to keep error messages concise. Perhaps we could just add the context where there is ambiguity.</pre>
NeedsFix
low
Critical
51,288,974
go
crypto/sha512: Arm Optimizations not implemented
by **jeromyj**: <pre>sha family hash functions on ARM architectures are quite slow, there is an implementation of sha512 (and sha1) in libgcrypt that has assembly optimized code for ARM Neon. It would be really nice to have something similar implemented into the Go standard library.</pre>
Performance
low
Major
51,288,982
go
x/tools/present: .play snippet don't handle inserted newlines when using the Enter key.
by **smyrman**: <pre>Before filing a bug, please check whether it has been fixed since the latest release. Search the issue tracker and check that you're running the latest version of Go: Run &quot;go version&quot; and compare against <a href="http://golang.org/doc/devel/release.html">http://golang.org/doc/devel/release.html</a> If a newer version of Go exists, install it and retry what you did to reproduce the problem. Thanks. What does 'go version' print? go version go1.3.3 linux/amd64 What steps reproduce the problem? Using the following configuration: - OS: Arch Linux - Web browser: Chrome Version 38.0.2125.104 (64-bit) - Keyboard layout: US Internationl AltGr Unicode combining 1. Edit the code in a present &quot;.play&quot; snippet. 2. Add a new code line by using Enter (not shift enter). 3. Click Run... If possible, include a link to a program on play.golang.org. What happened? The compiler don't detect the newline added by Enter, and the snippet compilation fails. E.g.: prog.go:10: syntax error: unexpected name, expecting semicolon or newline or } [process exited with non-zero status] Program exited. What should have happened instead? The newline should have been detected, and the program should have compiled. Please provide any additional information below. I tested to use Chrome Inspect elements, and I can see that using &quot;shift+Enter&quot; and &quot;Enter&quot;, have slightly different effect on the edited HTML. Adding a line with Shift + Enter works, and the snippet runs. Adding a file with just Enter, creates a new &quot;&lt;pre&gt;&quot;, element, and the snipet don't run (unless semicolons are manually adde to the end of the line).</pre> Attachments: 1. <a href="https://storage.googleapis.com/go-attachment/9011/0/original.png">original.png</a> (13618 bytes) 2. <a href="https://storage.googleapis.com/go-attachment/9011/0/added_line_with_shift_enter.png">added_line_with_shift_enter.png</a> (14761 bytes) 3. <a href="https://storage.googleapis.com/go-attachment/9011/0/added_line_with_just_enter.png">added_line_with_just_enter.png</a> (21574 bytes)
NeedsInvestigation
low
Critical
51,289,031
go
io: no easy way to fan out to multiple readers
by **[email protected]**: <pre>There is currently no good way to fan out from an io.Reader to multiple readers. A use-case we commonly encounter is piping data from one reader to another, and doing some calculation over the piped data on the side in a goroutine. io.TeeReader gets you only half the way, and we found a nice solution based on that and io.Pipe. See <a href="http://play.golang.org/p/xBBeaBdVJf">http://play.golang.org/p/xBBeaBdVJf</a> for an example, piping a .tar.gz from stdin to stdout, printing the tar headers to stderr along the way. Would you be open to introduce a similar StreamReader implementation to io/ioutils?</pre>
NeedsInvestigation
low
Major
51,289,035
go
x/text/unicode/norm: LastBoundary is inconsistent
<pre>The LastBoundary methods seems inconsistent as to where it reports a boundary. When called with a string containing a single (non-combining) character, the boundary is sometimes reported at the start of the string and sometimes at the end: This code: fmt.Printf(&quot;%d\n&quot;, norm.NFD.LastBoundary([]byte(&quot;a&quot;))) fmt.Printf(&quot;%d\n&quot;, norm.NFD.LastBoundary([]byte(&quot;โ™”&quot;))) print 0 and 3. I would expect it to print 0 and 0 or 1 and 3. Perhaps it would be better if neither FirstBoundary (LastBoundary) never reported a boundary at the start (end) of a string. That way it becomes easier to use FirstBoundary and LastBoundary to iterate through strings when use of Iter is not convenient.</pre>
NeedsInvestigation
low
Minor
51,289,037
go
go/build: Import(".", ".", 0) fails to resolve the full package path relative to GOPATH while build.Import(".", <cwd>, 0) works
<pre>What does 'go version' print? go version go1.3.3 linux/amd64 What steps reproduce the problem? 1. mkdir $HOME/src2 2. mkdir $HOME/src2/golang 3. export GOPATH=$HOME/src2/golang 4. mkdir -p $GOPATH/src/foo 5. Put the content of <a href="http://play.golang.org/p/gzOX-Obb75">http://play.golang.org/p/gzOX-Obb75</a> into $GOPATH/src/foo/a.go 6. go run a.go What happened? build.ImportDir() and build.Import() fail to correctly resolve Package.ImportPath to &quot;foo&quot;. I think it used (?) to work recently. I reproduce the problem via <a href="https://github.com/kisielk/errcheck">https://github.com/kisielk/errcheck</a> but it can be easily reproduced with the code I provided above. The problem is actually surfacing in <a href="https://github.com/kisielk/gotool">https://github.com/kisielk/gotool</a> which does the build.ImportDir(&quot;.&quot;, 0) call, which fails to return the correct ImportPath. What should have happened instead? build.ImportDir() and build.Import() with &quot;.&quot; should have the same behavior than when provided os.Getwd(), e.g.: Do the same code path as would dir, _ := os.Getwd() pkg, err := build.Import(&quot;.&quot;, dir, 0) should have the same result than: pkg, err := build.Import(&quot;.&quot;, &quot;.&quot;, 0)</pre>
NeedsInvestigation
low
Minor
51,289,118
go
cmd/link: include $a and $t symbols in arm final link
<pre>The host objdump -d doesn't work correctly on 5l-linked binaries. 5l does not add $a (arm) and $t (thumb) symbols to the output, and thus objdump doesn't know how to disassemble the code. It ends up disassembling as .word directives instead of actual disassembly. objdump can be forced to disassemble correctly using -D, but then you get data sections disassembled into junk. Or you can use go tool objdump, which works but can't disassemble thumb.</pre>
NeedsInvestigation
low
Minor
51,289,121
go
runtime: remove implementation restriction on channel element size
<pre>It appears that gc and the runtime currently disable channel elements to be over 64kB: <a href="http://play.golang.org/p/_aVWt-qiud">http://play.golang.org/p/_aVWt-qiud</a> But I see nothing about this (allowed?) implementation restriction in the spec, despite the spec calling out a number of other implementation-allowed restrictions.</pre>
NeedsInvestigation
medium
Major
51,289,128
go
net/http: DialTLS is not used w/ proxy (by design)
by **joshua.boelter**: <pre>What does 'go version' print? go version go1.4rc1 [windows/amd64 | linux/amd64] What steps reproduce the problem? transport.DialTLS not used when an HTTPS connection is proxied. <a href="http://play.golang.org/p/hSZy5-Sg0I">http://play.golang.org/p/hSZy5-Sg0I</a> Equally concerned developers will introduce unintended security bugs if/when an app is executed in an environment with a proxy. What happened? DialTLS not used (by design) when a proxy is present. What should have happened instead? Need support to reject connections based on factors outside hostname when a proxy is present. e.g. a Verify(...) callback on tls.Config executed after the handshake and other verification steps have executed. Please provide any additional information below. The issue that added DialTLS: <a href="https://golang.org/issue/8522">https://golang.org/issue/8522</a> Patch set #3 (or similar) would address the need. <a href="https://golang.org/cl/137940043/#ps40001">https://golang.org/cl/137940043/#ps40001</a></pre>
NeedsInvestigation
low
Critical
51,289,131
go
runtime: support parallel cache-oblivious algorithms
<pre>Cache-oblivious algorithms automatically take advantage of all levels of caches present in the system (register set, L1/L2/L2, disk) by recursively sub-dividing the problem into smaller parts: <a href="http://en.wikipedia.org/wiki/Cache-oblivious_algorithm">http://en.wikipedia.org/wiki/Cache-oblivious_algorithm</a> Recursive divide-and-conquer is the working horse of lots of parallel algorithms. Here is a sample program that does simple O(N^2) computation using 4 methods: 1. sequential naive (iterative) 2. sequential cache-oblivious 3. parallel naive (iterative) 4. parallel cache-oblivious <a href="http://play.golang.org/p/P4vh-GxnRz">http://play.golang.org/p/P4vh-GxnRz</a> Results are: serial sum... 3m0.149312702s (sum=480293945344) cache oblivious sum... 1m59.191344136s (sum=480293945344) parallel sum(1)... 2m45.547188918s (sum=480293945344) parallel sum(2)... 1m29.9953968s (sum=480293945344) parallel sum(4)... 46.828645173s (sum=480293945344) parallel sum(8)... 27.005117917s (sum=480293945344) parallel sum(16)... 13.942930282s (sum=480293945344) parallel sum(32)... 10.920164632s (sum=480293945344) cache oblivious parallel sum(1)... 2m32.863516062s (sum=480293945344) cache oblivious parallel sum(2)... 1m13.964254945s (sum=480293945344) cache oblivious parallel sum(4)... 43.00664982s (sum=480293945344) cache oblivious parallel sum(8)... 21.625423811s (sum=480293945344) cache oblivious parallel sum(16)... 13.566854603s (sum=480293945344) cache oblivious parallel sum(32)... 9.740402766s (sum=480293945344) Sequential cache-oblivious algorithm is 33% faster even on this small data set. However, parallel cache-oblivious version does not show this speedup. The problem is that parallel cache-oblivious algorithms require LIFO scheduling (or at least as close to LIFO as possible), but current goroutine scheduler does FIFO. As the result the algorithm does BFS instead of DFS, this not only breaks cache locality, but also increases memory consumption from N to 2^N (where N is the depth of the divide-and-conquer tree). Currently a user has to make a choice between efficient cache usage or parallelization, but not both. One way or another we need to support such algorithms.</pre>
Performance
low
Major
51,289,147
go
math/big: print and parse in different bases
<pre>Feature request. The math/big types Int and Rat do not provide facilities analogous to strconv that allow printing and parsing numbers in arbitrary bases. This would be nice to have.</pre>
NeedsInvestigation
low
Minor
51,289,217
go
x/pkgsite: "const" declarations with type on right are not grouped with the type
<pre>Run the godoc tool on a file such as <a href="http://play.golang.org/p/fnp9JT3Ki_">http://play.golang.org/p/fnp9JT3Ki_</a>. The constants with types on the left of &quot;=&quot; are grouped with the type. The equivalent constants with types on the right are not. Since the two styles of declaration produce equivalent constants, they should arguably also produce equivalent documentation.</pre>
NeedsInvestigation
low
Minor
51,289,219
go
x/tools/cmd/goimports: Handle ambiguous import properly
by **cnyegle**: <pre>Before filing a bug, please check whether it has been fixed since the latest release. Search the issue tracker and check that you're running the latest version of Go: Run &quot;go version&quot; and compare against <a href="http://golang.org/doc/devel/release.html">http://golang.org/doc/devel/release.html</a> If a newer version of Go exists, install it and retry what you did to reproduce the problem. Thanks. What does 'go version' print? go version go1.3 linux/amd64 What steps reproduce the problem? If possible, include a link to a program on play.golang.org. Run goimports over this code <a href="http://play.golang.org/p/u_HSZ6xDLX">http://play.golang.org/p/u_HSZ6xDLX</a> What happened? goimports suggest me to import &quot;html/template&quot; What should have happened instead? goimports should suggest &quot;text/template&quot; as well, or add that in a comment with FIXME: tag. Please provide any additional information below. goimports worked very well in the past, so when I find there's some strange escaped character in my template.Execute result it took me a long time to figure out the reason. text/template and html/template have same signature for most if not all functions, so the compiler didn't complain anything. I'd suggest when modifying/suggesting the imports, the tool put all possible candidates in comment with FIXME: tag.</pre>
NeedsInvestigation
low
Critical
51,289,226
go
html/template: add support for template strings (backticks)
by **opennota**: <pre>ES6 specifies a new language feature called &quot;Template Strings&quot; (often also referred to as &quot;Quasi Literals&quot; alongside multi-line strings and others). This allows to execute arbitrary JavaScript code without using parenthesis but back-ticks instead. Inside back-tick delimited strings, placeholders such as ${} can wrap executable code. <a href="http://play.golang.org/p/nBEneuxHNj">http://play.golang.org/p/nBEneuxHNj</a> If you open the output of the above program in a modern browser (e.g., recently released Mozilla Firefox 34 supports template strings), it will happily execute alert(1). References: <a href="https://people.mozilla.org/~jorendorff/es6-draft.html">https://people.mozilla.org/~jorendorff/es6-draft.html</a> <a href="https://html5sec.org/#140">https://html5sec.org/#140</a> <a href="https://html5sec.org/#141">https://html5sec.org/#141</a></pre>
NeedsDecision,FeatureRequest
medium
Critical
51,289,227
go
proposal: sync/v2: prohibit unlocking mutex in a different goroutine
sync.Mutex allows lock/unlock in different goroutines: <a href="http://golang.org/pkg/sync/#Mutex.Unlock">http://golang.org/pkg/sync/#Mutex.Unlock</a> &quot;A locked Mutex is not associated with a particular goroutine. It is allowed for one goroutine to lock a Mutex and then arrange for another goroutine to unlock it.&quot; And the same for RWMutex: <a href="http://golang.org/pkg/sync/#RWMutex.Unlock">http://golang.org/pkg/sync/#RWMutex.Unlock</a> The possibility to unlock the mutex in a different goroutine is very rarely used in real code. And if you really need something more complex than lock/unlock in a single goroutine, you can always use channels. But it creates several problems: 1. Deadlock detection becomes impossible, as there is no notion of &quot;critical sections&quot;. 2. Similarly static lock annotations becomes impossible for the same reason. 3. Optimizations like hardware lock elision (see e.g. Intel HLE) become impossible. 4. Another potential optimization that becomes impossible is priority boosting inside of critical sections. Namely, if a goroutine is preempted inside of a critical sections, scheduler may give it another tiny time slot to finish the critical section (or perhaps it can then voluntarily switch in Unlock). Solaris did this for a long time. We should prohibit possibility to unlock in a different goroutine in Go2.
v2,Proposal
medium
Critical
51,289,244
go
runtime: reduce StackGuard
<pre>We raised it to 512 in the run up to Go 1.4 and I'm raising it to 640 now for Windows/amd64 + write barriers. I'd like to get it back down to something like 256.</pre>
NeedsFix
low
Minor
51,289,249
go
x/sys/unix: Seteuid/Setegid for linux
by **[email protected]**: <pre>Missing syscall.Seteuid/Setegid for linux_amd64 and linux_386 syscall packages.</pre>
NeedsInvestigation
low
Minor
51,497,475
rust
fat-ptr-transmutes lint doesn't work
``` rust #![deny(fat_ptr_transmutes)] use std::mem; fn main() { let x: [u8, ..8] = [0, ..8]; let y: [u8, ..16] = unsafe { mem::transmute(x.as_slice()) }; println!("{}", y.as_slice()); } ``` compiles and runs with no warnings. The problem is that `trans::intrinsic::check_intrinsics` [calls `Session::add_lint`](https://github.com/rust-lang/rust/blob/master/src/librustc_trans/trans/intrinsic.rs#L125-L132) but the pass that emits these lints has already run. See [this comment in `rustc::lint`](https://github.com/rust-lang/rust/blob/master/src/librustc/lint/mod.rs#L24-L29). Please add a test case when fixing this! :)
A-lints,T-compiler,C-bug
low
Major
51,502,427
go
build: redeclaration errors after switching branches
I had to revert to go1.4 yesterday because cross-compiling was (or is) broken, and now master won't build, revealing that we might be .gitignoring too many files. git status shows I have a clean tree at tip, but the build suggests otherwise: ``` mac:go bradfitz$ git status On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working directory clean mac:go bradfitz$ git rev-parse HEAD 2937d88af591920d72d1ddd480df4c2c31532d2d mac:go bradfitz$ cd src/ mac:src bradfitz$ ./make.bash # Building C bootstrap tool. cmd/dist # Building compilers and Go bootstrap tool for host, darwin/amd64. lib9 libbio liblink cmd/gc cmd/6l cmd/6a cmd/6g runtime /Users/bradfitz/go/src/runtime/zruntime_defs_darwin_amd64.go:7: _Gidle redeclared in this block previous declaration at /Users/bradfitz/go/src/runtime/runtime2.go:18 /Users/bradfitz/go/src/runtime/zruntime_defs_darwin_amd64.go:8: _Grunnable redeclared in this block previous declaration at /Users/bradfitz/go/src/runtime/runtime2.go:19 /Users/bradfitz/go/src/runtime/zruntime_defs_darwin_amd64.go:9: _Grunning redeclared in this block previous declaration at /Users/bradfitz/go/src/runtime/runtime2.go:20 /Users/bradfitz/go/src/runtime/zruntime_defs_darwin_amd64.go:10: _Gsyscall redeclared in this block previous declaration at /Users/bradfitz/go/src/runtime/runtime2.go:21 /Users/bradfitz/go/src/runtime/zruntime_defs_darwin_amd64.go:11: _Gwaiting redeclared in this block previous declaration at /Users/bradfitz/go/src/runtime/runtime2.go:22 /Users/bradfitz/go/src/runtime/zruntime_defs_darwin_amd64.go:12: _Gmoribund_unused redeclared in this block previous declaration at /Users/bradfitz/go/src/runtime/runtime2.go:23 /Users/bradfitz/go/src/runtime/zruntime_defs_darwin_amd64.go:13: _Gdead redeclared in this block previous declaration at /Users/bradfitz/go/src/runtime/runtime2.go:24 /Users/bradfitz/go/src/runtime/zruntime_defs_darwin_amd64.go:14: _Genqueue redeclared in this block previous declaration at /Users/bradfitz/go/src/runtime/runtime2.go:25 /Users/bradfitz/go/src/runtime/zruntime_defs_darwin_amd64.go:15: _Gcopystack redeclared in this block previous declaration at /Users/bradfitz/go/src/runtime/runtime2.go:26 /Users/bradfitz/go/src/runtime/zruntime_defs_darwin_amd64.go:16: _Gscan redeclared in this block previous declaration at /Users/bradfitz/go/src/runtime/runtime2.go:28 /Users/bradfitz/go/src/runtime/zruntime_defs_darwin_amd64.go:16: too many errors go tool dist: FAILED: /Users/bradfitz/go/pkg/tool/darwin_amd64/6g -pack -o $WORK/_go_.a -p runtime -+ -asmhdr $WORK/go_asm.h /Users/bradfitz/go/src/runtime/alg.go /Users/bradfitz/go/src/runtime/arch1_amd64.go /Users/bradfitz/go/src/runtime/arch_amd64.go /Users/bradfitz/go/src/runtime/atomic_amd64x.go /Users/bradfitz/go/src/runtime/cgo.go /Users/bradfitz/go/src/runtime/cgocall.go /Users/bradfitz/go/src/runtime/cgocallback.go /Users/bradfitz/go/src/runtime/chan.go /Users/bradfitz/go/src/runtime/chan1.go /Users/bradfitz/go/src/runtime/compiler.go /Users/bradfitz/go/src/runtime/complex.go /Users/bradfitz/go/src/runtime/cpuprof.go /Users/bradfitz/go/src/runtime/cputicks.go /Users/bradfitz/go/src/runtime/debug.go /Users/bradfitz/go/src/runtime/defs_darwin_amd64.go /Users/bradfitz/go/src/runtime/env_posix.go /Users/bradfitz/go/src/runtime/error.go /Users/bradfitz/go/src/runtime/extern.go /Users/bradfitz/go/src/runtime/hashmap.go /Users/bradfitz/go/src/runtime/hashmap_fast.go /Users/bradfitz/go/src/runtime/heapdump.go /Users/bradfitz/go/src/runtime/iface.go /Users/bradfitz/go/src/runtime/lfstack.go /Users/bradfitz/go/src/runtime/lfstack_amd64.go /Users/bradfitz/go/src/runtime/lock_sema.go /Users/bradfitz/go/src/runtime/malloc.go /Users/bradfitz/go/src/runtime/malloc1.go /Users/bradfitz/go/src/runtime/malloc2.go /Users/bradfitz/go/src/runtime/mcache.go /Users/bradfitz/go/src/runtime/mcentral.go /Users/bradfitz/go/src/runtime/mem.go /Users/bradfitz/go/src/runtime/mem_darwin.go /Users/bradfitz/go/src/runtime/mfixalloc.go /Users/bradfitz/go/src/runtime/mgc.go /Users/bradfitz/go/src/runtime/mgc0.go /Users/bradfitz/go/src/runtime/mgc1.go /Users/bradfitz/go/src/runtime/mheap.go /Users/bradfitz/go/src/runtime/mprof.go /Users/bradfitz/go/src/runtime/msize.go /Users/bradfitz/go/src/runtime/netpoll.go /Users/bradfitz/go/src/runtime/netpoll_kqueue.go /Users/bradfitz/go/src/runtime/os1_darwin.go /Users/bradfitz/go/src/runtime/os2_darwin.go /Users/bradfitz/go/src/runtime/os_darwin.go /Users/bradfitz/go/src/runtime/panic.go /Users/bradfitz/go/src/runtime/panic1.go /Users/bradfitz/go/src/runtime/parfor.go /Users/bradfitz/go/src/runtime/print1.go /Users/bradfitz/go/src/runtime/proc.go /Users/bradfitz/go/src/runtime/proc1.go /Users/bradfitz/go/src/runtime/race0.go /Users/bradfitz/go/src/runtime/rdebug.go /Users/bradfitz/go/src/runtime/rune.go /Users/bradfitz/go/src/runtime/runtime.go /Users/bradfitz/go/src/runtime/runtime1.go /Users/bradfitz/go/src/runtime/runtime2.go /Users/bradfitz/go/src/runtime/select.go /Users/bradfitz/go/src/runtime/sema.go /Users/bradfitz/go/src/runtime/signal1_unix.go /Users/bradfitz/go/src/runtime/signal_amd64x.go /Users/bradfitz/go/src/runtime/signal_darwin.go /Users/bradfitz/go/src/runtime/signal_darwin_amd64.go /Users/bradfitz/go/src/runtime/signal_unix.go /Users/bradfitz/go/src/runtime/sigpanic_unix.go /Users/bradfitz/go/src/runtime/sigqueue.go /Users/bradfitz/go/src/runtime/slice.go /Users/bradfitz/go/src/runtime/softfloat64.go /Users/bradfitz/go/src/runtime/sqrt.go /Users/bradfitz/go/src/runtime/stack1.go /Users/bradfitz/go/src/runtime/stack2.go /Users/bradfitz/go/src/runtime/string.go /Users/bradfitz/go/src/runtime/string1.go /Users/bradfitz/go/src/runtime/stubs.go /Users/bradfitz/go/src/runtime/stubs2.go /Users/bradfitz/go/src/runtime/symtab.go /Users/bradfitz/go/src/runtime/sys_x86.go /Users/bradfitz/go/src/runtime/time.go /Users/bradfitz/go/src/runtime/traceback.go /Users/bradfitz/go/src/runtime/type.go /Users/bradfitz/go/src/runtime/typekind.go /Users/bradfitz/go/src/runtime/typekind1.go /Users/bradfitz/go/src/runtime/vdso_none.go /Users/bradfitz/go/src/runtime/wbfat.go /Users/bradfitz/go/src/runtime/zgoarch_amd64.go /Users/bradfitz/go/src/runtime/zgoos_darwin.go /Users/bradfitz/go/src/runtime/zruntime_defs_darwin_amd64.go /Users/bradfitz/go/src/runtime/zversion.go mac:src bradfitz$ ``` Is it this line of .gitignore that's too ignore-y? ``` src/runtime/z* ``` ?
NeedsInvestigation
medium
Critical
51,546,253
nvm
Modifying a file when .bashrc and .zshrc are present
I just switched to zsh so still there's .bashrc and .zshrc present in my ~ . However, it's choosing .bashrc over the one I'm actually using, so I copied it by hand. I know it's a particular problem, but maybe the script could check the current shell and modify whatever file suits it?
shell: zsh,installing nvm: profile detection,pull request wanted
low
Major
51,600,921
go
math/big: improve assembly cores: alignment and unrolling
Suggestions from Torbjรถrn Granlund (personal e-mail): "Aligning: Consider aligning loops to at least a 0 mod 16 address. Same for function start. Tail code after unrolling: Setting up a loop which runs 0-3 iterations is quite expensive. It should be better to follow the pattern: ``` test $2, Rcount je skip2 restore CF [do two "iterations"] save CF skip2: test $2, Rcount je skip1 restore CF [do one "iteration"] skip1: [footer] ``` "
NeedsInvestigation
low
Minor
51,601,084
go
math/big: better multiply primitives
Suggestions from Torbjรถrn Granlund (personal e-mail): " The multiply primitives, in particular addMulVVW surely deserves more attention: Offset the pointers so that you can index with a counter register which goes from -n to 0, saving the CMPQ. Unroll. You can save most of the ADCQ $0, R that way. Basically, do one run with just MULQ where you sum the old highpart (DX) with the new lowpart (AX). You will need some MOVQ to move DX out-of-the-way too. Then do a new run over these sums where you bring in the memory addend. This should double the speed on some newer CPUs. A good addMulVVW is probably really the first thing to write in assembly; addition and subtraction is much less important, usually. "
Performance,NeedsFix
low
Major
51,862,202
go
x/review/git-codereview: add change -d
We should have a change -d command that you run at the same time you click Abandon in the web UI. Or maybe it even does the Abandon for you too. It's too hard to back everything out by hand. @griesemer ran into this with the peano change. @adg
NeedsInvestigation,FeatureRequest
low
Major
51,897,075
go
x/mobile/app: support all-Go app development on windows
The http://golang.org/x/mobile/app package lets you run all-Go apps on desktop darwin and linux with nothing more than the stock Go build. Just `go get` and you're programming. This is done via cgo: we ask for a window, get an OpenGL context, and map mouse events to touch events. We should do the same for Windows. There are a few complications. The first is by default there is C compiler for cgo on windows. On both linux and OS X we can rely on the user to install gcc/xcode because the platform makes it easy. By comparison MinGW is an extra, non-obvious step for windows users and VC++ isn't supported (and not necessarily any more obvious). The second is there is no OpenGL. Well, there is kinda, as provided by graphics card makers, but support in particular for OpenGL ES 2 and EGL is spotty. Luckily, Chrome has this problem too and maintain an open source project implementing ES 2 and EGL for Windows on top of DirectX: https://code.google.com/p/angleproject/ I want to avoid importing angleproject directly into the mobile repository as it has several licenses and I want to keep the notices story for the Go repository simple. So we will need another repository that contains a package that links against angleproject and creates the window. Is there any way about needing windows users to install a C compiler? Can we ship a binary .dll in a repository that is downloaded with go get? If we do, what about the cgo parts of `mobile/app` and `mobile/gl`? Can they be provided by the .dll even if we fetch it as part of a different repository? For `mobile/app` probably, but `mobile/gl` is harder.
OS-Windows,mobile
medium
Critical
51,948,673
rust
Poor performance returning enums larged than a word. Possibly poor code generation?
I've discovered an issue with `IoError`, and really returning any enums that are larger than 1 word, are running an order of magnitude slower than returning an error enum that's 1 word size. Here's my test case: ``` rust extern crate test; use std::mem; use std::vec; use std::io; const BUFFER_SIZE: uint = 128; ////////////////////////////////////////////////////////////////////////////// trait Error { fn is_eof(&self) -> bool; } impl Error for io::IoError { fn is_eof(&self) -> bool { self.kind == io::EndOfFile } } #[deriving(Show, PartialEq, Eq)] enum MyError { EndOfFile, Error, _Error1, } impl Error for MyError { fn is_eof(&self) -> bool { *self == MyError::EndOfFile } } #[deriving(Show, PartialEq, Eq)] enum MyError2 { EndOfFile, Error, _Error1(uint), } impl Error for MyError2 { fn is_eof(&self) -> bool { *self == MyError2::EndOfFile } } impl Error for () { fn is_eof(&self) -> bool { true } } impl Error for Box<MyError> { fn is_eof(&self) -> bool { **self == MyError::EndOfFile } } ////////////////////////////////////////////////////////////////////////////// fn generate_bytes() -> Vec<u8> { let mut bytes = Vec::new(); for i in range(0i, 1024) { bytes.push(i as u8); } bytes } ////////////////////////////////////////////////////////////////////////////// struct Foo11<'a, E> { iter: vec::MoveItems<u8>, f: |&mut Vec<u8>|: 'a -> Result<(), E>, } impl<'a, E: Error> Foo11<'a, E> { fn new<'a>(f: |&mut Vec<u8>|: 'a -> Result<(), E>) -> Foo11<'a, E> { let buf = Vec::with_capacity(BUFFER_SIZE); Foo11 { iter: buf.into_iter(), f: f, } } fn fill_buf(&mut self) -> Result<bool, E> { let mut iter = Vec::new().into_iter(); mem::swap(&mut iter, &mut self.iter); let mut buf = iter.into_inner(); buf.clear(); try!((self.f)(&mut buf)); if buf.is_empty() { Ok(false) } else { self.iter = buf.into_iter(); Ok(true) } } } impl<'a, E: Error> Iterator<Result<u8, E>> for Foo11<'a, E> { fn next(&mut self) -> Option<Result<u8, E>> { loop { match self.iter.next() { Some(value) => { return Some(Ok(value)); } None => { match self.fill_buf() { Ok(false) => { return None; } Ok(true) => { } Err(err) => { return Some(Err(err)); } } } } } } } #[bench] fn bench_foo11_ioerror(b: &mut test::Bencher) { let bytes = generate_bytes(); b.bytes = bytes.len() as u64; b.iter(|| { let mut rdr = bytes.as_slice(); let iter = Foo11::new(|buf| -> Result<(), io::IoError> { match rdr.push(BUFFER_SIZE, buf) { Ok(_) => Ok(()), Err(io::IoError { kind: io::EndOfFile, .. }) => Ok(()), Err(err) => Err(err), } }); for (idx, item) in iter.enumerate() { assert_eq!(idx as u8, item.unwrap()); } }) } #[bench] fn bench_foo11_enum_one_word(b: &mut test::Bencher) { let bytes = generate_bytes(); b.bytes = bytes.len() as u64; b.iter(|| { let mut rdr = bytes.as_slice(); let iter = Foo11::new(|buf| -> Result<(), MyError> { match rdr.push(BUFFER_SIZE, buf) { Ok(_) => Ok(()), Err(io::IoError { kind: io::EndOfFile, .. }) => Ok(()), Err(_) => Err(MyError::Error), } }); for (idx, item) in iter.enumerate() { assert_eq!(idx as u8, item.unwrap()); } }) } #[bench] fn bench_foo11_null(b: &mut test::Bencher) { let bytes = generate_bytes(); b.bytes = bytes.len() as u64; b.iter(|| { let mut rdr = bytes.as_slice(); let iter = Foo11::new(|buf| -> Result<(), ()> { match rdr.push(BUFFER_SIZE, buf) { Ok(_) => Ok(()), Err(io::IoError { kind: io::EndOfFile, .. }) => Ok(()), Err(_) => Ok(()), //{ panic!() } } }); for (idx, item) in iter.enumerate() { assert_eq!(idx as u8, item.unwrap()); } }) } #[bench] fn bench_foo11_enum_2_words(b: &mut test::Bencher) { let bytes = generate_bytes(); b.bytes = bytes.len() as u64; b.iter(|| { let mut rdr = bytes.as_slice(); let iter = Foo11::new(|buf| -> Result<(), MyError2> { match rdr.push(BUFFER_SIZE, buf) { Ok(_) => Ok(()), Err(io::IoError { kind: io::EndOfFile, .. }) => Ok(()), Err(_) => Err(MyError2::Error), } }); for (idx, item) in iter.enumerate() { assert_eq!(idx as u8, item.unwrap()); } }) } #[bench] fn bench_foo11_boxed(b: &mut test::Bencher) { let bytes = generate_bytes(); b.bytes = bytes.len() as u64; b.iter(|| { let mut rdr = bytes.as_slice(); let iter = Foo11::new(|buf| -> Result<(), Box<MyError>> { match rdr.push(BUFFER_SIZE, buf) { Ok(_) => Ok(()), Err(io::IoError { kind: io::EndOfFile, .. }) => Ok(()), Err(_) => Err(box MyError::Error), } }); for (idx, item) in iter.enumerate() { assert_eq!(idx as u8, item.unwrap()); } }) } ``` Here are the results: ``` test bench_foo11_boxed ... bench: 13754 ns/iter (+/- 4222) = 74 MB/s test bench_foo11_enum_2_words ... bench: 15027 ns/iter (+/- 4318) = 68 MB/s test bench_foo11_enum_one_word ... bench: 1550 ns/iter (+/- 417) = 660 MB/s test bench_foo11_ioerror ... bench: 25003 ns/iter (+/- 8007) = 40 MB/s test bench_foo11_null ... bench: 817 ns/iter (+/- 206) = 1253 MB/s ``` On a related note, @alexcrichton just found a similar case with: ``` rust extern crate test; use std::iter::repeat; const N: uint = 100000; #[deriving(Clone)] struct Foo; #[deriving(Clone)] struct Bar { name: &'static str, desc: Option<String>, other: Option<String>, } #[bench] fn b1(b: &mut test::Bencher) { b.iter(|| { let r: Result<u8, Foo> = Ok(1u8); repeat(r).take(N).map(|x| test::black_box(x)).count() }); } #[bench] fn b2(b: &mut test::Bencher) { b.iter(|| { let r: Result<u8, Bar> = Ok(1u8); repeat(r).take(N).map(|x| test::black_box(x)).count() }); } ``` The assembly for `b1` is about 3 instructions, but the assembly for `b2` has a ton of `mov` instructions.
I-slow,T-compiler,C-bug
medium
Critical
52,030,432
go
x/mobile/gl/gles3: OpenGL ES 3 bindings
OpenGL ES 3 is a large extension to ES 2, offering a large number of new features. Eventually we should have support for it. I propose we do so by having a new package that contains the extra enum values and functions, which can be used in conjunction with the existing gl package. This is a very low priority item as ES 3 is not currently usable on Android. 72% of devices only support ES 2, so all software today must first target ES 2 and only use ES 3 as an optional extension. http://developer.android.com/about/dashboards/index.html#OpenGL
mobile
low
Minor
52,061,725
go
proposal: net/v2: Listen is unfriendly to multiple address families, endpoints and subflows
The following example program: ``` go package main import ( "net" ) func main() { net.Listen("tcp", "localhost:8080") select{} } ``` Currently yields this result: ``` $ netstat -nl | grep 8080 tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN ``` While the following result would be optimal: ``` $ netstat -nl | grep 8080 tcp6 0 0 127.0.0.1:8080 :::* LISTEN tcp6 0 0 ::1:8080 :::* LISTEN ``` (Note that the first socket is actually dualstack, and bound to ::ffff:127.0.0.1, but that's less critical than adding the second socket bound to ::1.) More generally, when you call `net.Listen()` on a hostname which resolves to multiple IPv4/IPv6 addresses, only the first IPv4 address is selected. An analogous problem occurs if you `Listen("tcp", ":8080")` on an operating system that doesn't support dualstack sockets: instead of returning a pair of sockets bound to `[::]:8080` and `0.0.0.0:80`, you only get IPv4. The fundamental flaw is that `Listen()` assumes a single socket, which is a leaky abstraction that's inappropriate for high-level things like example servers, e.g.: http://golang.org/pkg/net/#pkg-overview Go should either adapt the `Listen()` API to support multiple sockets, or if that's not feasible, a new multi-socket API should be introduced, which deprecates `Listen()` for all cases except simple non-wildcard addresses.
v2,Proposal
medium
Critical
52,073,087
go
cmd/compile: enhancements to the gc inliner and optimizer
**Background** I recently tried optimizing some hash functions in Go to find out what is possible without resorting to using assembler. I knew gc had an "inliner" but I didn't have any experience with it. I spent some time reading the "inl.c" code. **Summary** Go's inliner seems to work well and I got speed increase of 30% on some hash functions using it. However, the way it is currently configured and controlled effectively turns if off for most cases. Most users won't figure out how to set the `level` (-gcflags="-l -l -l -l -l -l -m") and even less will be willing to recompile the tool chain to change the _hard coded_ `hairiness` variable set to more than 40. The inliner would be more effective if it could handle closures and variadic functions. Finally, a simple idiom recognizer would allow a simple function such as `rot()` to be turned into a single instruction. Taken together these changes could yield significant performance improvements to certain kinds of Go packages. Here are my impressions, suggestions, and requests: A simple code example is here, it's just one one Jenkin's Hash functions: https://play.golang.org/p/rmDG7MR5F9 This comes from: https://github.com/tildeleb/hashland/blob/master/jenkins/jenkins.go The main project is: https://github.com/tildeleb/hashland/ **Observations and Impressions** 1. The inliner works pretty well but you need to add the following flags to build to get it work: `go build -gcflags="-l -l -l -l -l -l -m"` 1. .The inliner has budget for the complexity of functions it is willing to inline. The variable is called `hairiness`. It is current set to 40 and that's not very hairy. In the example above. I had to break `mix()` and `final()` into 3 functions of two lines each, to get them to inline. 40 really seems like a very small budget to me. Hard coding a parameter like this is just wrong. 2. Currently closures can't be inlined. Using the example above, that means the closures `mix()` and `final()` which close over the hash state variables a, b, and c need to moved out of the function "HashWords". Since the state variables a, b, and c are lo longer closed over they need to be passed to and returned from the `mix()` and `final() functions`. For example: `a, b, c = mix(a, b, c)`. If all hash functions had 3 state variables that might be OK. However, other more advanced hash functions have more state. For example in Jenkin's SpookyV2 I had to write: `h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11 = Mix(inul, h0, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11)` Which I hope we can all agree is out of control and is why I believe why closures are the preferred solution to many inlining based use cases. The downside of the closures is that if you have multiple versions of a hash function that use the same mix() and final() code, those closures need to be duplicated inside the top level functions. Again, I prefer the closures. The source code is cleaner, easier to read, and probably easier to optimize because the optimizer doesn't need to optimize out the calling and return stack push/pop sequences to get good code quality. 1. Go needs an idiom recognizer. Consider the example again. The function `rot(x, k)` gets inlined but it doesn't generate a rot insturction. Other compilers are able to do this. Actually, I think a case can be made to add a rotate (no carry) operator (`>>>` or `<<<`) to the language for this particular case, but that's another "issue" as they say. BTW Go generates about 22 instructions to get the rotate done. 2. Variadic functions aren't inlined. I am considering proposing the following as a new interface for hash functions that would be complementary to the current hash streaming interface. `Hash32(b []byte, seeds ...uint32) uint32` `Hash64(b []byte, seeds ...uint64) uint64` `Hash128(b []byte, seeds ...uint64) (uint64, uint64)` `Hash(in []byte, out []byte, seeds ...uint64) []byte` Because of this I would like to see inlining of variadic functions. FWIW I still have to benchmark this vs other alternative calling sequences. **Suggestions** 1. Increase the default "hairiness" from 40. 40 really isn't very much. Set the default "level" to a value higher that 0 or 1. 2. Optimizer command line flags. In the short term add temporary native command line flags to set `hairiness` and `level.` I know the Go team eschews command line flags but some control over the optimization process has been around since the unix epoch and is probably inevitable. For example: `% go build -ilbudget=120 illevel=6` 1. Extend the inliner to inline closures and variadic functions. 2. Over the medium term add a simple idiom recognizer so common idioms such as `rot` in the example above can be turned into single instructions, really (2-3 instructions counting the `MOVQ` to the registers instead of the 20+ now generated to get a rot. 3. Consider adding a rot operator to the language.
compiler/runtime
medium
Major
52,158,076
TypeScript
Find references for shorthand properties
``` ts interface A { foo(); } function foo() { } var a: A = { foo }; a.foo(); // find references on call to foo ``` If you find references on the call to foo, it should also turn up the actual function definition. But the function definition seems to be excluded.
Bug
low
Major
52,177,406
rust
Unboxed closure types look weird in error messages
``` rust fn main() { let x: () = |:| {}; // error: mismatched types: expected `()`, found `closure[<anon>:2:17: 2:23]` (expected (), found closure) } ``` It looks like d258d68 might have changed this for debugging purposes, but forgot to change it back.
C-enhancement,A-diagnostics,T-compiler,WG-diagnostics
low
Critical
52,191,348
neovim
License for docs
Migrated from https://github.com/neovim/docs/issues/29 (which was deleted). --- @ZyX-I suggested CC license for docs. We should implement that so we can have a clear license going forward. https://github.com/neovim/neovim/issues/878#issuecomment-46810685 Existing Vim docs are licensed under http://www.opencontent.org/openpub/ . Relevant line: https://github.com/neovim/neovim/blob/a62fe49d3caa40b8a6efb6528cce725f4dffa78a/runtime/doc/usr_01.txt#L159 Existing Vim docs specify the Vim license: https://github.com/neovim/neovim/blob/08c99dcff0d9397a1d464eee159b1d56217fc5e0/runtime/doc/uganda.txt#L24 We need to add the Neovim license to that.
documentation,runtime,project-management
low
Major
52,193,121
go
proposal: net: should provide an interface for dialing
net.Dialer sounds like it's close to making transports pluggable the way e.g. http.Client / http.Transport behave, but reading further one realizes that net.Dialer is hardcoded to basically be net.Dial with timeouts. This makes e.g. crypto/tls DialWithDialer less useful; I can't just easily replace the whole transport layer with something that e.g. doesn't touch the host TCP stack (think unit tests, Tor, stream protocols constructed on top of UDP, and such). Note that tls.DialWithDialer doesn't just dialer.Dial, it also accesses the Timeout field. By the time Go2 comes around, maybe /x/net/context will have grown into something that can unify this sort of behavior. Of course, the workaround is to dial manually and use tls.Client, but then one is responsible for all the little details that are inside tls.DialWithDialer. Naturally, I don't expect Go1 to change existing APIs, though something new might be workable. Sorry for the ramble, just felt like writing down my hopes of reusability being crushed.
Proposal,NeedsInvestigation
medium
Major
52,196,972
go
x/mobile/event: keyboard support
Both android and iOS provide OS software onscreen keyboards. The event package needs a common API for activating both, and needs to adjust the reported screen space appropriately. There are some curious complications for those of us used to traditional keyboards, but nothing impossible: - there are various ways to suggest different key layouts (for example, just a numeric pad) - word suggestion can translate in a large number of single key presses all at once
mobile
low
Minor
52,342,109
go
x/review/git-codereview: doesn't set upstream to origin/master
We need to set upstream to master like below. ``` $ git checkout -b fix-windows-readlink $ vim foo.go $ git change git rev-parse --abbrev-ref fix-windows-readlink@{u} error: No upstream branch found for 'fix-windows-readlink' error: No upstream branch found for 'fix-windows-readlink' fatal: ambiguous argument 'fix-windows-readlink@{u}': unknown revision or path not in the working tree. Use '--' to separate paths from revisions fix-windows-readlink@{u} ``` ``` git branch --set-upstream fix-windows-readlink origin/master ```
NeedsInvestigation
medium
Critical
52,380,018
kubernetes
REST api - 'kind' property not always exists on entities
'kind' property exists only on the outer entity in REST api hence providing not aligned behavior for REST api consumers. Example: when querying for all services (/api/v1beta1/services) there's an attribute "kind": "ServiceList" on the collection, but in the "items" section with the actual services - none of the services has the "kind" attribute. But when querying for a specific service, for example: http://localhost:8080/api/v1beta1/services/kubernetes-ro There is a "kind": "Service" on the entity. I don't see the necessity to have the "kind" property in the first place since the user knows which resource was called by the api specific url, but even if it has a reason and is by design, the entities attributes should be identical whether retrieved as a single entity or as a collection. Otherwise the client should be adding/deleting attributes when retrieved as a collection by their collection type - which is doable, but definitely not elegant. In other words, either "kind" should be present in each entity when retrieved in bulk AND when retrieved as a single entity, or not present at all for all cases.
priority/backlog,area/api,area/usability,sig/api-machinery,lifecycle/frozen,triage/accepted
medium
Critical
52,422,688
go
x/review/git-codereview: commit-msg hook doesn't play well with Signed-off-by lines
For example, git commit -s will generate this log message: ``` test: test commit Signed-off-by: Shenghou Ma <[email protected]> Change-Id: I3545610fc076ab9da46bb5ed571a49730a5075dc ``` However, it should look this instead, which is generated by the official gerrit commit-msg hook: ``` test: test commit Change-Id: I3545610fc076ab9da46bb5ed571a49730a5075dc Signed-off-by: Shenghou Ma <[email protected]> ```
NeedsInvestigation
low
Minor
52,441,097
go
net: LookupSRV and search domains when name is empty
Using Go 1.4 on Linux x86_64 (Ubuntu). I called the lookupSRV function in the "net" package, with `lookupSRV("service", "tcp", "")` (empty name). I expected this to lookup using my search domains ("_service._tcp.my.search.domain"), but it potentially seems to have queried it with an extra "." ("_service._tcp..my.search.domain"). Is this intended? Or am I just using the function in a strange way? The workaround I'm using right now is to call `lookupSRV("", "", "_service._tcp")` instead.
NeedsInvestigation
low
Major
52,441,857
TypeScript
Add "sealed" key word to mark some public/protected methods not be overriden
From https://github.com/Microsoft/TypeScript/issues/1524, I see that the default method are all "virtual", but sometimes I don't wanna some public method to be overidden. Would you invent a mechasim to force the users that they cannot override a public method (with the key word, something like "sealed")? Thanks!
Suggestion,Needs Proposal
medium
Critical
52,442,654
rust
Spurious test out-of-stack test failure on Android
See https://gist.github.com/aturon/6c03914f968084548cd6 for an example. @alexcrichton dug into this and found strange behavior but wasn't able to make sense of it. The test is going to be marked ignore on android for the time being.
A-codegen,O-android,T-compiler,C-bug,I-flaky-test
low
Critical
52,469,027
rust
Permit impl methods whose bounds cannot be satisfied to have no body
There is a curious case with where clauses where sometimes we can show that a method in an impl could not possibly be called. This is because the impl has more precise information than the trait. Here is an example: ``` rust trait MyTrait<T> { fn method(&self, t: &T) where T : Eq; } struct Foo; struct Bar; // note that `Bar` does not derive `Eq` impl MyTrait<Bar> for Foo { fn method(&self, t: &T) where Bar : Eq { // <-- `Bar : Eq` cannot be satisfied! } } ``` We should permit the method body to be omitted in such a case. As a workaround, once #20020 is fixed, I imagine it would be possible to write an impl like this: ``` impl MyTrait<Bar> for Foo { fn method(&self, t: &T) { // no where clause at all panic!("Bar : Eq could not be satisfied"); } } ``` However, it is unfortunate to require that of the user. For one thing, perhaps it happens later that an impl of `Eq` is added for `Bar` -- now we have this method hanging around that will panic. It'd be nice to detect that statically. The plan then would be to permit: ``` impl MyTrait<Bar> for Foo { fn method(&self, t: &T); // <-- no body or where clauses needed } ``` This serves as a declaration that you believe this method could never be called. At trans time, we will generate a body that simply does the equivalent of `panic!("unsatisfiable method`method`invoked")`. I plan to open an amendment to the where clause RFC describing this particular case.
A-trait-system,T-lang,E-medium,C-feature-request
medium
Major
52,509,518
youtube-dl
youtube-dl -U exit status
I disable networking and run simon@falcon:~$ youtube-dl --version 2014.12.17.2 simon@falcon:~$ youtube-dl -U ERROR: can't find the current version. Please try again later. simon@falcon:~$ echo $? 0 Why not set an non-zero exit status and print the message to STDERR? best regards
request
low
Critical
52,522,748
rust
Parse and accept type equality constraints in where clauses
Implement the missing type equality constraint specified in [RFC 135](https://github.com/rust-lang/rfcs/pull/135). ### Examples ```rs fn sum<I: Iterator>(_: I) -> i32 where I::Item == i32 // or `I::Item = i32` { // ... } ```
A-type-system,T-lang,C-tracking-issue,A-lazy-normalization,S-tracking-unimplemented,S-tracking-design-concerns,T-types
high
Critical
52,537,653
neovim
remove 'imcmdline', 'imdisable', 'imsearch'
These options were effectively disabled in https://github.com/neovim/neovim/pull/1568. Need to investigate if they should be removed. Related: - vscode Nvim GUI: https://github.com/vscode-neovim/vscode-neovim/issues/1370
compatibility
medium
Major
52,555,417
rust
Fully generalize cmp instances
With [cmp/ops reform](https://github.com/rust-lang/rfcs/pull/439), all of the comparison traits allow the types of the two sides to differ. However, the traits provide a _default_ type for the right-hand size that is the same as the left-hand side. Thus, an impl like: ``` rust impl<T: PartialEq> PartialEq for Rc<T> { ... } ``` is more limited than it needs to be; it could instead be ``` rust impl<U, T: PartialEq<U>> PartialEq<Rc<U>> for Rc<T> { ... } ``` (Of course, you could imagine being even more general than that, allowing Rc values to be compared to other values.) The various impls in the standard library should probably be generalized along these lines; currently a few are but most aren't.
T-libs-api,C-feature-request
medium
Major
52,579,174
go
x/review/git-codereview: can't run git change
git-codereview is confused and thinks I'm on some other branch: ``` ba12:oauth2 bradfitz$ go get -u -v golang.org/x/review/git-codereview Fetching https://golang.org/x/review/git-codereview?go-get=1 Parsing meta tags from https://golang.org/x/review/git-codereview?go-get=1 (status code 200) get "golang.org/x/review/git-codereview": found meta tag main.metaImport{Prefix:"golang.org/x/review", VCS:"git", RepoRoot:"https://go.googlesource.com/review"} at https://golang.org/x/review/git-codereview?go-get=1 get "golang.org/x/review/git-codereview": verifying non-authoritative meta tag Fetching https://golang.org/x/review?go-get=1 Parsing meta tags from https://golang.org/x/review?go-get=1 (status code 200) golang.org/x/review (download) ba12:oauth2 bradfitz$ git status # On branch master # Your branch is ahead of 'origin/master' by 12 commits. # (use "git push" to publish your local commits) # # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: transport.go # ba12:oauth2 bradfitz$ git branch * master ba12:oauth2 bradfitz$ git diff --cached diff --git a/transport.go b/transport.go index 9e7b106..10339a0 100644 --- a/transport.go +++ b/transport.go @@ -62,7 +62,7 @@ func (t *Transport) CancelRequest(req *http.Request) { type canceler interface { CancelRequest(*http.Request) } - if cr, ok := t.Base.(canceler); ok { + if cr, ok := t.base().(canceler); ok { t.mu.Lock() modReq := t.modReq[req] delete(t.modReq, req) ba12:oauth2 bradfitz$ git codereview change nilbase git-codereview: cannot branch from work branch; change back to master first. ba12:oauth2 bradfitz$ git branch * master ``` /cc @adg @rsc
NeedsInvestigation
low
Minor
52,612,986
go
x/mobile: allow api users to decide when to SwapBuffers.
While fixing app on x11/egl and porting it to x11/glx I found some need for a redesign. See https://go-review.googlesource.com/#/c/1851 for some discussion. Right now the idea is to always vsync on back buffer swap. This will make any app run at the display devices (probably) fixed refresh rate. An app that takes 1.1 frames to render will wait 0.9 frames for the next vblank causing your app to run at half of the display's refresh rate when you could be running much faster. Refresh rates are not required to be 60hz, so you would have to measure your framerate every frame to figure out if you are running slower or faster. I recommend letting the user trigger a draw and swap and the user running their own timer. The triggers for draw and swap should be separate so people have the choice to use single buffered contexts (which may be making a comeback oddly). For running your own timer I recommend timer.NewTicker(). I found it works perfectly as a frame timer with desktop gl. For controlling whether SwapBuffers() vsync's This simple function is available with nearly the same definition for egl/glx/wgl. https://www.khronos.org/registry/egl/sdk/docs/man/html/eglSwapInterval.xhtml It just takes an integer >= 0 that is the number of vblanks SwapBuffers should wait for. Something similar exists for darwin but ios looks a bit ugly.
mobile
low
Major
52,628,066
youtube-dl
[site request] CollegeRama
Some big universities in Holland are running a presentation site for their lectures. Technical University Delft (TUD) offer great content to many thousands of regular visitors on: http://collegeramacolleges.tudelft.nl/online/faculties/all-faculties/public-lectures/ Basically, a video of the professor/lecturer speaking (or videoclips in their presentation) and a timelapsed sequence of slides (images) is what comprises an online lecture. It would be great if youtube-dl could support this site to: 1) download the lecture video 2) download the presentation (slide images) with a time-code in their name (or perhaps as a second video, or side-by-side/picture-in-picture single video) An example of a lecture: https://collegerama.tudelft.nl/Mediasite/Play/585a43626e544bdd97aeb71a0ec907a01d?catalog=fd32fd35-6c99-466c-89d4-cd3c431bc8a4 I very much hope this can be supported in a future version of Youtube-DL.
site-support-request
low
Minor
52,672,194
go
cmd/vet: flag unkeyed struct literals when a struct has two fields of the same type
Suggested in #9409. Note that vet already flags all unkeyed composite struct literals when the type comes from a different package. This would extend checks to same-package types, but with more stringent criteria. @bradfitz @alandonovan @shurcooL
Analysis
low
Minor
52,696,459
go
net/http: document errors more (*Transport, Client's wrapper errors, etc), how to check canceled, ...
I've been doing some experimenting with Go HTTP clients and servers under load. One of the curious things I've discovered is that calls to (*http.Client).Get occasionally return unusual errors. The documentation at http://golang.org/pkg/net/http/#Client says: "An error is returned if the Client's CheckRedirect function fails or if there was an HTTP protocol error." I've been leaving CheckRedirect nil and testing against a local server that never serves redirects. From the comment, that would imply that I should only receive HTTP protocol errors - which would correspond to the type *http.ProtocolError. For typical socket errors, the clients in fact return a *url.Error - but the only place in the net/http documentation where url.Error is even mentioned is for the client.CheckRedirect field, which is completely unrelated to the errors I'm testing. But that's not all! The *url.Error usually wraps a net.OpError, which seems reasonable enough. In fact, net.Error is what I would have expected in the first place, since I didn't know about url.Error at all before I started these experiments. But instead, the *url.Error occasionally wraps io.EOF. I'm guessing that happens when the socket happens to close at exactly the wrong moment, and because of the poor documentation it's not at all clear to me whether that's the intended behavior of the Client methods or an outright bug in the library. But that's not all either! The error wrapped by the OpError, one would expect, is a net.Error describing the underlying network error for the op. But that's not the case either - it's often a syscall.Errno instead, and syscall.Errno does not implement net.Error. So for temporary conditions, such as EPIPE or ECONNRESET, the net package's preferred mechanism for indicating that the condition _is_ temporary does not work as expected. So I end up needing a big pile of user code to sort through the whole stack of errors, find the root error, and check for particular syscall.Errno values, and that whole big pile of code is now relying on undocumented error spaces that could theoretically change completely with the next Go release. To summarize: error handling in the http package is a mess. Someone familiar with the intended behavior of the package should clarify the documentation at least to the point where it's sensible to say whether the more subtle behaviors (e.g. io.EOF in a url.Error) are bugs or not.
Documentation,help wanted,Proposal,Proposal-Accepted,NeedsFix
medium
Critical
52,772,696
go
go/doc: confusing types displayed for mixed exported/unexported consts
Given: ``` go const ( a, _, c = T, iota, int D, E, f J, k = iota, T L, M ) ``` godoc outputs: ``` const ( _ = T, iota, int D, E J = iota, T L, M ) ``` It is not clear from the output what the type of `D`, `E`, `L`, or `M` is. I came across this while working on a follow-up to #5397. This is an edge case, and I've not seen it in the real world. It is not clear what the correct thing to do here is; probably we should just ignore it.
NeedsInvestigation
low
Minor
52,823,240
go
x/mobile/gl: Mismatch in Uniform and Attrib Value types
Hi, I noticed that the `Value` field of the `Attrib` and `Uniform` types is of different type - `uint` and `int32` respectively. [http://godoc.org/golang.org/x/mobile/gl#Attrib](http://godoc.org/golang.org/x/mobile/gl#Attrib) [http://godoc.org/golang.org/x/mobile/gl#Uniform](http://godoc.org/golang.org/x/mobile/gl#Uniform) According to the documentation, they both should be `uint`. [https://www.khronos.org/opengles/sdk/docs/man3/html/glGetAttribLocation.xhtml](https://www.khronos.org/opengles/sdk/docs/man3/html/glGetAttribLocation.xhtml) [https://www.khronos.org/opengles/sdk/docs/man3/html/glGetUniformLocation.xhtml](https://www.khronos.org/opengles/sdk/docs/man3/html/glGetUniformLocation.xhtml) So I see no sense in them being of different type. Furthermore, shouldn't the type of `Attrib` be a bit more strictly specified - for example `uint32` - similar to other ID types in the `mobile/gl` API? Regards, Momchil Atanasov
mobile
low
Minor
52,832,165
go
cmd/vet: "could not import" warning message not visible without -v.
Using Go 1.4 and latest tools subrepo: ``` ~ $ go version go version go1.4 darwin/amd64 ~ $ gostatus -v ...cmd/vet golang.org/x/tools/... ``` By default, `vet` is supposed to detect "Suspicious calls to functions in the Printf family." I've noticed that it sometimes did not do that reliably (it would detect some cases but not others). I wrote the following .go file that reproduces the issue for me: ``` Go package main import ( "log" "net/url" "golang.org/x/oauth2" ) func main() { thirdParty := oauth2.Config{ ClientID: "some-string", // A string. } stdLib := url.URL{ Path: "some-string", // A string. } log.Printf("Hello, %d.\n", thirdParty.ClientID) // go vet does _not_ catch this. log.Printf("Hello, %d.\n", stdLib.Path) // But it catches this. } ``` #### What did you expect to see? Both printf verb usage issues should be reported, not just one. ``` main.go:18: arg thirdParty.ClientID for printf verb %d of wrong type: string main.go:19: arg stdLib.Path for printf verb %d of wrong type: string ``` #### What did you see instead? Here is my output of `vet` on that file/package: ``` main.go:19: arg stdLib.Path for printf verb %d of wrong type: string ``` It detects the bad printf verb usage for a string type from standard library, but not external library. It would be great if `vet` were more reliable, so I could _depend on it_ to catch all printf verb misuse when possible (and it's certainly possible here).
Analysis
low
Major
52,947,588
go
proposal: spec: add support for int128 and uint128
LanguageChange,Proposal,LanguageChangeReview
high
Critical
52,964,827
go
cmd/gofmt: moves comment in for
On playground (and elsewhere), [this code](http://play.golang.org/p/0kv0J7re1b) ``` go package main func main() { for i := 0; i < 1 /* 9000 */ ; i++ { _ = i } } ``` is transformed by gofmt into [this code](http://play.golang.org/p/0kv0J7re1b): ``` go package main func main() { for i := 0; i < 1; /* 9000 */ i++ { _ = i } } ``` It has swapped the comment and the nearby semi-colon. This code arises when temporarily changing the limit of a loop. I think this swap changes the context of the comment, possibly changing its meaning. It also means that I'll have to swap 9000 (in this example) and the semi-colon back when restoring the original loop limit.
NeedsInvestigation
low
Minor
52,970,987
rust
Conditional compilation based on crate_type
Ideally we should be able to do something like this: Cargo.toml: ``` ..... [lib] path = "src/lib.rs" crate-type = ["rlib","dylib"] ..... ``` src/lib.rs: ``` .... #[no_mangle] #[cfg(crate_type="dylib")] pub unsafe extern "C" fn ..... ``` To allow only exporting the c api in the dylib or perhaps in the dylib and static lib and not in the rust code. This would be consistent with being able to build multiple library formats but allow the unsafe c methods to not be exported to rust code. I checked against: http://doc.rust-lang.org/reference.html#conditional-compilation and did some experimentation myself, with no luck. If anyone has any better suggestions, I'd love to hear them. I'm looking to generate very similar rust and c libraries with similar apis where the c library is just a c style wrapper around the rust api, also written in rust. Ideally i'd keep this in a single source and conditionally define the c api's in the dylib for loading from various languages with c ffi's and exclude the c api from the rust lib.
A-driver,A-attributes,T-lang,C-feature-request
medium
Critical
52,975,813
rust
Use of `ty` macro non-terminal in trait bounds
``` macro_rules! impl_somethingable { ($Base: ty, $Block:ty) => { impl<'a, T> Somethingable for $Block where T: $Base { } } } impl_somethingable!(ATrait, A); ``` ``` <anon>:15:52: 15:60 error: each predicate in a `where` clause must have at least one bound in it <anon>:15 impl<'a, T> Somethingable for $Block where T: $Base { ^~~~~~~~ <anon>:15:56: 15:60 error: expected one of `,` or `{`, found `ATrait` <anon>:15 impl<'a, T> Somethingable for $Block where T: $Base { ^~~~ ``` The solution is to use `$ident` instead of `$ty`, but this is non-obvious to the user, especially since it's perfectly ok to have `ATrait` in that location. Playpen: http://is.gd/AMUJDw cc @huonw
A-grammar,T-lang,C-feature-request
low
Critical
52,978,732
youtube-dl
Add support for peer-stream.com
Hi, could you add support for peer-stream.com so it is possible to use it without adobe flash. ``` $ youtube-dl "http://peer-stream.com/api/embedplayer.php?controlbar=none&width=100%25&height=100%25&prog=onlinetv&groupspec=G:0101010c050e3373617400" [generic] embedplayer: Requesting header WARNING: Falling back on generic information extractor. [generic] embedplayer: Downloading webpage [generic] embedplayer: Extracting information ERROR: Unsupported URL: http://peer-stream.com/api/embedplayer.php?controlbar=none&width=100%25&height=100%25&prog=onlinetv&groupspec=G:0101010c050e3373617400; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. treaki@treakis-tp:/tmp$ youtube-dl --verbose "http://peer-stream.com/api/embedplayer.php?controlbar=none&width=100%25&height=100%25&prog=onlinetv&groupspec=G:0101010c050e3373617400" [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['--verbose', 'http://peer-stream.com/api/embedplayer.php?controlbar=none&width=100%25&height=100%25&prog=onlinetv&groupspec=G:0101010c050e3373617400'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2014.12.17.2 [debug] Python version 2.7.8 - Linux-3.16-3-amd64-x86_64-with-debian-jessie-sid [debug] exe versions: avconv 2.4.3, avprobe 2.4.3, ffmpeg 2.4.3, ffprobe 2.4.3, rtmpdump 2.4 [debug] Proxy map: {} [generic] embedplayer: Requesting header WARNING: Falling back on generic information extractor. [generic] embedplayer: Downloading webpage [generic] embedplayer: Extracting information ERROR: Unsupported URL: http://peer-stream.com/api/embedplayer.php?controlbar=none&width=100%25&height=100%25&prog=onlinetv&groupspec=G:0101010c050e3373617400; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 660, in _real_extract doc = parse_xml(webpage) File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 1444, in parse_xml tree = xml.etree.ElementTree.XML(s.encode('utf-8'), **kwargs) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML parser.feed(text) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed self._raiseerror(v) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror raise err ParseError: not well-formed (invalid token): line 12, column 91 Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 592, in extract_info ie_result = ie.extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 243, in extract return self._real_extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 1060, in _real_extract raise ExtractorError('Unsupported URL: %s' % url) ExtractorError: Unsupported URL: http://peer-stream.com/api/embedplayer.php?controlbar=none&width=100%25&height=100%25&prog=onlinetv&groupspec=G:0101010c050e3373617400; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. $ ``` Thanks a lot and keep up the good work
site-support-request
low
Critical
53,026,095
youtube-dl
Add support for nintendo.com
Hello, Could you please add support for videos on nintendo.com? Here are some examples: http://www.nintendo.com/games/detail/yEiAzhU2eQI1KZ7wOHhngFoAHc1FpHwj http://www.nintendo.com/wiiu/videos/#all/Why_You_Want_Wii_U http://www.nintendo.com/nintendo-direct/04-30-2014/#/video-ndirect ``` $ youtube-dl "http://www.nintendo.com/wiiu/videos/#all/Why_You_Want_Wii_U" --verbose [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['http://www.nintendo.com/wiiu/videos/#all/Why_You_Want_Wii_U', '--verbose'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2014.12.17.2 [debug] Python version 2.7.6 - Darwin-14.0.0-x86_64-i386-64bit [debug] exe versions: rtmpdump 2.4 [debug] Proxy map: {} [generic] Why_You_Want_Wii_U: Requesting header WARNING: Falling back on generic information extractor. [generic] Why_You_Want_Wii_U: Downloading webpage [generic] Why_You_Want_Wii_U: Extracting information ERROR: Unsupported URL: http://www.nintendo.com/wiiu/videos/#all/Why_You_Want_Wii_U; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 660, in _real_extract doc = parse_xml(webpage) File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 1444, in parse_xml tree = xml.etree.ElementTree.XML(s.encode('utf-8'), **kwargs) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML parser.feed(text) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed self._raiseerror(v) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror raise err ParseError: not well-formed (invalid token): line 651, column 139 Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 592, in extract_info ie_result = ie.extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 243, in extract return self._real_extract(url) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/generic.py", line 1060, in _real_extract raise ExtractorError('Unsupported URL: %s' % url) ExtractorError: Unsupported URL: http://www.nintendo.com/wiiu/videos/#all/Why_You_Want_Wii_U; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. $ ```
site-support-request
low
Critical
53,046,383
rust
cache the results of type projection and normalization
Both in trans and in typeck. Must be somewhat careful around type parameters and so forth. Probably we want to introduce a cache onto the fulfillment context to use for normalization as well.
C-cleanup,I-compiletime,A-associated-items,T-compiler
low
Major
53,064,490
go
testing/iotest: add two new readers
Just in case there is interest, here are two other badly-behaved reader types that might make useful additions to `testing/iotest`: ``` go // ZeroNilReader returns 0, nil on every second read. Other calls to read succeed. func ZeroNilReader(r io.Reader) io.Reader // CorruptingReader returns a Reader that modifies any unused portion of the byte slice passed to Read. // It is useful in conjunction with OneByteReader. func CorruptingReader(r io.Reader) io.Reader ``` ``` ```
FeatureRequest
low
Major