sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/vet: check for http.Error followed by other statements in handler?
Labels: Analysis

Using `go1.6`

I recently saw code that did the following:

```
func serveHTTP(resp http.ResponseWriter, req *http.Request) {
    ...

    if err := foo(); err != nil {
        http.Error(resp, err.Error(), http.StatusInternalServerError)
    }

    if err := bar(); err != nil {
        http.Error(resp, err.Error(), http.StatusInternalServerError)
    }
}
```

The assumption made was that http.Error() terminates the current handler in some magical way. Instead, Error simply sets the headers and writes the body message, and it is the programmer's responsibility to return. We should document this.
Repository: neovim
Issue: Suggest add the ability to filter "Tag match list" according kind type
Labels: enhancement

In most situations, I want to jump to the function definition when I run `:tj tagname`, but the result will return all kinds of tags include both `prototype` and `function`.

Could we add options for `tj` liked commands, so when we run `:tj tagname kind=function`, it only return all the function tags?

Thanks.
Repository: go
Issue: proposal: spec: allow assignment-compatible values in append and copy
Labels: LanguageChange,Proposal,LanguageChangeReview

As discussed [here](https://groups.google.com/forum/#!searchin/golang-nuts/copy/golang-nuts/C9S-ztnDnI8/SWBNQDh7FQAJ), it might be useful to make the append and copy built-ins somewhat more accepting of different types.

I have made a proposal document here:

https://docs.google.com/document/d/1HilKzERLb521XaG0Lgi6zkkj25VlXqc1oHEUmQ1v3aI
Repository: youtube-dl
Issue: Site support request: Request to support downloading from http://music.raag.fm
Labels: site-support-request

Hello there,  request you to pls add support for downloading from the site http://music.raag.fm

Example full URL's

Full Album: http://music.raag.fm/punjabi-songs/various-the-djs-1-vol-1

Single song:  http://music.raag.fm/song/337802/yaari-jattan-di-malkit-singh

Playlist: http://music.raag.fm/user/16001/music-meniac  

Thanks -Jay
Repository: TypeScript
Issue: Suggestion: stricter operators
Labels: Suggestion,Help Wanted,Effort: Moderate

Currently operators like "+" are defined such that they match their semantics in JS.  The below are all allowed by the compiler and produce the shown values, even with `--strictNullChecks` on.
- `2 + 'a'` => `"2a"`
-  `null + 'a'` => `"nulla"` (!)
- `2 - null` => `2`

I propose letting users opt in (maybe via some `--strictOperators`) to strict operator behavior.  Concretely I think this means:
- restrict `+`, and `+=` to just `number` and `string`, e.g. for the former only declare
  
  ``` js
  function +(a: number, b: number): number;
  function +(a: string, b: string): string;
  ```
- restrict `-` and `-=` to just `number`

(`any` should continue to work as normal, of course.)

Relevant spec section:
https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#419-binary-operators

See also "Expression operators" in the `strictNullTypes` change: https://github.com/Microsoft/TypeScript/pull/7140
and in particular this rationale: https://github.com/Microsoft/TypeScript/pull/7140#issuecomment-186432250

This would fall under of "stricter" TypeScript, https://github.com/Microsoft/TypeScript/issues/274 .
Repository: opencv
Issue: viz::Viz3d window closes automatically after thread being ended
Labels: feature,category: viz

### Please state the information for your system
- OpenCV version: 3.1
- Host OS: Windows 10
### In which part of the OpenCV library you got the issue?

Examples:
- viz
- viz::Viz3d window closes automatically after thread being ended
### Expected behaviour
### Actual behaviour
### Additional description

I want to visualize a gradually growing point cloud using viz::Viz3d, and I've tried to show and update a viz::Viz3d window from within a thread, it runs just OK, but when the thread ends the viz::Viz3d window also disappears, which I think is abnormal, I expected the viz::Viz3d window to stay open so I can check out the overall quality of the point cloud when it is completed.
### Code example to reproduce the issue / Steps to reproduce the issue

``` .cpp
// the basic structure of my codes is shown below (kinda like a pseudo-code):

viz::Viz3d wnd3d("3D Window");

UINT Thread(LPVOID param)
{
    for (int i = 0; i < nImgs; ++i)
    {
        Mat XYZs = GeneratePointCloud(vImgs[i]);

        viz::WCloud cld(XYZs);

        wnd3d.showWidget("cloud", cld);

        wnd3d.spinOnce();
    }

    return TRUE;
}

void OnClickMenu()
{
    // TODO: Add your command handler code here
    AfxBeginThread(Thread, this, THREAD_PRIORITY_NORMAL);
}
```
Repository: TypeScript
Issue: negating type constraints
Labels: Suggestion,Awaiting More Feedback

Sometimes it's useful to put a limit on what a type parameter can be. In a way it is a counterpart of the `extends` constraint.
### Problem

Consider an example, a [classic function](https://msdn.microsoft.com/en-us/library/ee340357.aspx) that takes whatever and returns void:

```
function ignore<a>(value: a) : void {};
```

However we must not apply this function to Promises, because it might get us a temporal leak if we do.

```
function readFileAsync(): Promise<string>;
ignore(readFileAsync()); // <-- untracked promise, temporal leak
```

Unfortunately it is way too easy to get into a situation when a promise is passed to that function unintentionally as a result of refactoring:

```
// before
function readFileSync(): string;
ignore(readFileSync()); // typechecks, works as intended, no problem

// after refactoring
function readFileAsync(): Promise<string>; // <-- went async here
ignore(readFileAsync()); // typechecks, unintended temporal leak, big problem
```
### Solution

The situation above could have been avoided if TypeScript allowed negating constraints:

```
function ignore<a unlike Promise<any>>(value: a): void {} // <-- hypothetical syntax
```
Repository: go
Issue: runtime: avoid unnecessary work in allocSpanLocked
Labels: compiler/runtime

[moved from #14921]

These two lines in "*mheap.allocSpanLocked" are (or hopefully will soon be) the most common source of writebarrierptr calls for which *dst == src.

```
588:        h_spans[p-1] = s

603:        h_spans[p+n] = s
```

(Line numbers from commit de7ee57c7ead59899d5b412a839c995de0e813b5.)

As @aclements notes, this might be best addressed by algorithmic improvements. If those assignments are doing nothing, probably lots of the surrounding code is either.
Repository: go
Issue: net: use IPv4/IPv6/MAC/EUI reserved address blocks for documentation
Labels: Documentation,help wanted,NeedsInvestigation

There are reserved address blocks for documentation; https://tools.ietf.org/html/rfc5737 and https://tools.ietf.org/html/rfc3849. It'd be better to use them for documentation updates.
- IPv4 address block for doc: 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24
- IPv6 address block for doc: 2001:db8::/32 (also see https://tools.ietf.org/html/rfc5952)
Repository: TypeScript
Issue: Exported ambient variables are neither emitted nor an error
Labels: Bug

**TypeScript Version:** 

1.9.0-dev.20160411

**Code**

foo.ts:

``` typescript
export type Foo = { bar: string; }
declare var foo: Foo;
export { foo };
```

bar.ts:

``` typescript
import { foo } from "./foo";
console.log(foo.bar);
```

`tsc -t es5 -m commonjs ./foo.ts ./bar.ts`

**Expected behavior:**

Either it should be an error to export an ambient variable, or it should be emitted something like this:

foo.js:

``` javascript
"use strict";
exports.foo = foo;
```

bar.js:

``` javascript
"use strict";
var foo_1 = require("./foo");
console.log(foo_1.foo.bar);
```

**Actual behavior:** 

No error, and foo.js is emitted with no export, causing bar.js to blow up at runtime.

foo.js:

``` javascript
"use strict";
```
Repository: go
Issue: cmd/compile: eliminate write barrier for self-referencing pointer
Labels: Performance,compiler/runtime

Go code often does something like:

```
type Buffer struct {
   buf []byte
   bootstrap [64]byte
}
var b *Buffer = ...
b.buf = b.bootstrap[:]
```

I don't think we need a write barrier when we write the slice pointer into b.buf, because the pointer always points from an object into (part of) itself.

But see the discussion in #14855 .  Writing a pointer to the heap without a write barrier is tricky in the presence of races.  Make sure the arguments in that issue don't apply here (I don't think they do, writing a self-pointer is like writing nil).

@aclements
Repository: kubernetes
Issue: Multiple RateLimiters in a "single" client.
Labels: sig/api-machinery,lifecycle/frozen

Ref. #22421

Currently one "client", or rather ClientSet consists of multiple clients (one for each API group). This makes reasoning about QPS per component much harder - clients in a single ClientSet should share a single RateLimiter.

cc @wojtek-t @krousey @wojtek-t
Repository: go
Issue: x/build/cmd/coordinator: make trybots post their status report upon cancellation
Labels: Builders,NeedsFix,FeatureRequest

If trybots cancel themselves due to a new patchset version or the current patchset being merged, they should post their status to Gerrit before they go away.
Repository: rust
Issue: DWARF doesn't distinguish struct, tuple, and tuple struct
Labels: A-debuginfo,P-low,T-compiler,C-bug

Currently the DWARF generated by rustc doesn't distinguish a struct, a tuple, or a tuple struct.  They are all represented by `DW_TAG_structure_type`.

In gdb I handle this by examining the type name and assume that if it starts with "(" then it is a tuple.  A tuple struct is detected by seeing if the first field is named "__0".  Neither of these methods are really very good -- they work ok with today's debuginfo but are not really in the spirit of DWARF.

This requires a DWARF addition.  In the short term it would be possible to pick an extension value in the `DW_AT` user space (this must be done carefully to avoid clashing with other known extensions).
Repository: go
Issue: x/build: set GOTRACEBACK=2 on all builders?
Labels: Builders,Proposal,Proposal-Accepted

Some of the bugs are fairly hard to reproduce, and without
the system function stacks, it's difficult to see the problem.

For example, #15145.

I propose that we set `GOTRACEBACK=2` on all builders.
Repository: go
Issue: x/text/currency: add support for arbitrary-precision currency amounts
Labels: NeedsDecision,FeatureRequest

Add support for arbitrary-precision currency amounts with math/big. The interface as-is could handle things like currency.USD.Amount(big.Rat(1, 100)).
Repository: TypeScript
Issue: No compile error thrown when `this` referenced before call to `super` completes
Labels: Suggestion,Help Wanted,Effort: Difficult

**TypeScript Version:** 

1.8.9

**Code**
JSFiddle: https://jsfiddle.net/kitsonk/fs9t96ep/
TS Playground: http://goo.gl/X7cgvV

``` ts
class A {
    constructor(fn: () => void) {
        fn.call(this);
    }
    foo: string = 'foo';
}

class B extends A {
    constructor() {
        super(() => {
            console.log(this);
        });
    }
    bar: string = 'bar';
}

const b = new B();

```

**Expected behavior:**
Typescript should guard against the use of `this` as the call to `super` has not completed. Thus it should not compile.

**Actual behavior:** 
Typescript compiles this successfully. It works fine when the target is set to `es5` but breaks the browser when target is set to `es6`.
Error is: VM89:55 Uncaught ReferenceError: this is not defined
Repository: youtube-dl
Issue: [GameOne] Unable to extract video url
Labels: geo-restricted

http://gameone.de/tv/220

```
$ youtube-dl --verbose 'http://gameone.de/tv/220'
[debug] System config: []
[debug] User config: ['-4', '--prefer-free-formats', '--no-cache-dir', '--no-mtime', '--youtube-skip-dash-manifest']
[debug] Command-line args: ['--verbose', 'http://gameone.de/tv/220']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.04.13
[debug] Python version 3.5.1+ - Linux-4.5.0-gnu.nonpae-i686-with-debian-stretch-sid
[debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1, rtmpdump 2.4
[debug] Proxy map: {}
[GameOne] 220: Downloading webpage
ERROR: Unable to extract video url; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how 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/lib/python3.5/dist-packages/youtube_dl/YoutubeDL.py", line 671, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/extractor/common.py", line 341, in extract
    return self._real_extract(url)
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/extractor/gameone.py", line 63, in _real_extract
    og_video = self._og_search_video_url(webpage, secure=False)
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/extractor/common.py", line 744, in _og_search_video_url
    return self._html_search_regex(regexes, html, name, **kargs)
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/extractor/common.py", line 653, in _html_search_regex
    res = self._search_regex(pattern, string, name, default, fatal, flags, group)
  File "/usr/local/lib/python3.5/dist-packages/youtube_dl/extractor/common.py", line 644, in _search_regex
    raise RegexNotFoundError('Unable to extract %s' % _name)
youtube_dl.utils.RegexNotFoundError: Unable to extract video url; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
```
Repository: go
Issue: syscall: use Docker container for making auto-generated files
Labels: compiler/runtime

The auto-generation of the `syscall/z*.go` files is a mess.

Their generation depends on the headers installed on the host system, so nobody can reliably generate them without making a bunch of accidental unrelated changes.

This applies equally to pkg `syscall` and to `golang.org/x/sys/unix`.

Let's use a Dockerfile in there and then run mkwhatever.{sh,pl,go} file in Docker, and then `docker cp` the auto-generated files out of the container back to the host.

Recent chaos:
- https://go-review.googlesource.com/#/c/21971/
- https://go-review.googlesource.com/#/c/21582/
- etc (basically any change)

It's less clear what to do about other Unix, like OpenBSD (https://go-review.googlesource.com/#/c/21797/, etc). @mdempsky? Jails? But openbsd is tricky for other reasons: #15227

Windows seems to be fine.

/cc @ianlancetaylor
Repository: go
Issue: cmd/compile: sync/atomic.SwapPointer arguments escape for the wrong reason
Labels: NeedsFix,compiler/runtime

In the implementation of sync/atomic.SwapPointer (which is in runtime/atomic_pointer.go), there's nothing that causes the "new" argument to escape, even though it needs to (because you could be swapping it in to a global). The compiler agrees:

```
$ go build -gcflags "-m -m" -a runtime |& grep sync_atomic_SwapPointer                                                                     
runtime/atomic_pointer.go:58: sync_atomic_SwapPointer ptr does not escape
runtime/atomic_pointer.go:58: sync_atomic_SwapPointer new does not escape
```

However, you can't actually tickle this. For example, in principle the following program should sneak the address of stack variable y into a global variable:

```
package main

import (
    "sync/atomic"
    "unsafe"
)

var x unsafe.Pointer

func main() {
    var y int
    z := unsafe.Pointer(&y)
    atomic.SwapPointer(&x, z)
}
```

But it doesn't!

```
$ go build -gcflags "-m -m" x.go
# command-line-arguments                        
./aesc.go:13: &x escapes to heap
./aesc.go:13:   from &x (passed to function[unknown]) at ./aesc.go:13
./aesc.go:11: moved to heap: y
./aesc.go:12: &y escapes to heap
./aesc.go:12:   from z (assigned) at ./aesc.go:12
./aesc.go:12:   from z (passed to function[unknown]) at ./aesc.go:12
```

This happens to work right now, but for the wrong reason: because SwapPointer is defined in the runtime and we use a "go:linkname" comment to expose it from sync/atomic, there's no escape information at all when the test program calls SwapPointer (hence the "passed to function[unknown]"), so the compiler conservatively assumes everything escapes. (In fact, the first argument doesn't have to escape and we have annotations in the runtime to that effect, but they never make it through.)

This all seems very fragile.

/cc @dr2chase @randall77
Repository: flutter
Issue: RenderObject.debugCheckingIntrinsics mode should catch exceptions and explain what's going on
Labels: team,framework,P3,team-framework,triaged-framework

It's easy to get into situations where you throw during the RenderObject.debugCheckingIntrinsics mode.
It's hard to understand why your code is getting called in that mode.

We should catch all exceptions and include detailed information about what's going on and how to handle it.
Repository: go
Issue: x/build: Windows Nano Server builders?
Labels: help wanted,OS-Windows,Builders,new-builder

Per #15286, I guess we'll need Windows Nano Server builders at some point.

How? GCE? Azure?

Can Microsoft run them for us? Or give us Azure credit?

/cc @jstarks
Repository: flutter
Issue: Implicit animations don't handle being animated very well
Labels: framework,a: animation,d: examples,has reproducible steps,P3,team-framework,triaged-framework,found in release: 3.19,found in release: 3.20

e.g. consider an `AnimatedDefaultTextStyle` being configured using a `TextStyle` derived from the current `Theme`. If the `Theme` itself is being animated from an `AnimatedTheme`, then the `AnimatedDefaultTextStyle` doesn't make any progress until the `AnimatedTheme` has finished.
Repository: go
Issue: runtime: heavy time.Now usage cause taskgated to consume lots of cpu
Labels: Performance,OS-Darwin,NeedsInvestigation,compiler/runtime

Please answer these questions before submitting your issue. Thanks!
1. What version of Go are you using (`go version`)?

go version devel +bd72497 Mon Apr 11 01:52:10 2016 +0000 darwin/amd64
1. What operating system and processor architecture are you using (`go env`)?

darwin/amd64
1. What did you do?
   Run this program

```
package main

import (
        "fmt"
        "time"
)

func main() {
        t1 := time.Now().Add(-1 * time.Second) // ensure there is no collision on first iteration
        for {
                t2 := time.Now()
                d := t2.Sub(t1)
                if d == 0 {
                        fmt.Println("collision at", t2)
                }
                t1 = t2
        }
}
```
1. What did you expect to see?

This program should cause 100% cpu usage.
1. What did you see instead?

The program causes 100% cpu usage, but `taskgated` is also heavily used , around 20% on my system. 

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/taskgated.8.html

Reports that taskgated is responsible for implemting the mach `task_for_pid` syscall (?), so it looks like we're calling this syscall many times, we should probably not do that and cache the task port once per process.
Repository: flutter
Issue: When running 'flutter' from a directory that appears to be a flutter repo but isn't the one that 'flutter' is itself from, display a warning message
Labels: c: new feature,tool,P3,team-tool,triaged-tool

We've had reports of people cloning Flutter twice (presumably months apart), and the second time, since flutter is already on their path, they get all kinds of confused because things like "flutter upgrade" upgrade the "wrong" repo.
Repository: youtube-dl
Issue:  Add a "--force-https" option.
Labels: request

Idea came from Noscript addon for Firefox.
So, when you have `http://www.youtube.com/watch?v=qn6CMz18lkQ` link, and you know its supports https and instead of  adding  "s" to links every time, you could just add site to config option `--force-https=www.youtube.com` and it will always force links from youtube to https for this site and others you add.
Repository: go
Issue: cmd/compile: combine extension with register loads and stores on amd64
Labels: Performance,compiler/runtime

Extending a register load or store currently generates suboptimal code with the SSA backend. In some cases, this is a regression from the old backend. For example:

`func load8(i uint8) uint64 { return uint64(i) }`

Generates:

```
"".load8 t=1 size=16 args=0x10 locals=0x0
    0x0000 00000 (extend.go:3)  TEXT    "".load8(SB), $0-16
    0x0000 00000 (extend.go:3)  FUNCDATA    $0, gclocals·23e8278e2b69a3a75fa59b23c49ed6ad(SB)
    0x0000 00000 (extend.go:3)  FUNCDATA    $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
    0x0000 00000 (extend.go:3)  MOVBLZX "".i+8(FP), AX
    0x0005 00005 (extend.go:3)  MOVBQZX AL, AX
    0x0008 00008 (extend.go:3)  MOVQ    AX, "".~r1+16(FP)
    0x000d 00013 (extend.go:3)  RET
```

The old back end generates:

```
"".load8 t=1 size=16 args=0x10 locals=0x0
    0x0000 00000 (extend.go:3)  TEXT    "".load8(SB), $0-16
    0x0000 00000 (extend.go:3)  FUNCDATA    $0, gclocals·23e8278e2b69a3a75fa59b23c49ed6ad(SB)
    0x0000 00000 (extend.go:3)  FUNCDATA    $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
    0x0000 00000 (extend.go:3)  MOVBQZX "".i+8(FP), BX
    0x0005 00005 (extend.go:3)  MOVQ    BX, "".~r1+16(FP)
    0x000a 00010 (extend.go:3)  RET
```

I tried fixing this in CL 21838, but the fix was partial and probably not in the right place.

It's hard to do this as part of the arch-specific rewrite rules, because (a) you lose the type extension work that the ssa conversion did for you and have to recreate it later and (b) you don't know where all the register loads and stores will be, because regalloc hasn't run.

However, it's hard to do this as part of converting final SSA to instructions (genvalue), since that's really geared to handle one value at a time, in isolation.

Teaching regalloc to combine these MOVs seems arch-specific and would further complicate already complicated machinery. Maybe the thing to do is to add an arch-specific rewrite pass after regalloc ("peep"?), using hand-written rewrite rules. Input requested.

Related, for those extension MOVs that remain, we should test whether CWB and friends are desirable--they are shorter, but are register-restricted and the internet disagrees about whether they are as fast.

Here are some test cases:

``` go
package x

func load8(i uint8) uint64   { return uint64(i) }
func load32(i uint32) uint64 { return uint64(i) }

func store8(i uint64) uint64  { return uint64(uint8(i)) }
func store32(i uint64) uint64 { return uint64(uint32(i)) }

var p *int

func load8spill(i uint8) uint64 {
    i++            // use i
    print(i)       // spill i
    j := uint64(i) // use and extend i
    return j
}

func load32spill(i uint32) uint64 {
    i++            // use i
    print(i)       // spill i
    j := uint64(i) // use and extend i
    return j
}

func store8spill(i uint64) uint64 {
    j := uint8(i)    // convert
    print(j)         // spill
    return uint64(j) // use
}

func store32spill(i uint64) uint64 {
    j := uint32(i)   // convert
    print(j)         // spill
    return uint64(j) // use
}
```

cc @randall77
Repository: go
Issue: misc/trace: switch back to lean config
Labels: NeedsFix

https://go-review.googlesource.com/#/c/22013 updates trace-viewer to newer revision (required to unbreak visualization in chrome). But trace-viewer (catapult) is broken itself at the moment:
https://github.com/catapult-project/catapult/issues/2247
So the change uses full config instead of lean config. Full config works, but leads to larger html.
We need to switch back to lean config when the bug is fixed.
Repository: TypeScript
Issue: reference search doesn't work with `extends`
Labels: Bug

![image](https://cloud.githubusercontent.com/assets/937933/14536286/9b3111b2-023f-11e6-85b6-7199a0f94c59.png)

``` typescript
function asOf<b>() {
    return function as<a extends b>(value: a) :a {
        return value;
    };
}
interface I { boom(): void; }
const value = asOf<I>()({ boom: undefined });
value.boom // <-- find me! // expected to be found in I, actual nope
```