sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Assignability error reporting should have a more specific error for unions
Labels: Bug,Help Wanted,Domain: Error Messages

``` ts
interface A {
    a: number
}
interface B {
    b: number
}
interface C {
    c: number
}
interface D {
    d: number
}
declare var c: C;
let abc: ((A | B) & C) | D = c;
```

Actual error: 

```
Type 'C' is not assignable to type '((A | B) & C) | D'.
  Type 'C' is not assignable to type 'D'.
    ....
```

Expected error:

```
Type 'C' is not assignable to any branch of the union type '((A | B) & C) | D'.
  For example, type 'C' is not assignable to type 'D'.
    ....
```

Error reporting on unions doesn't mention that the compiler tried to assign the source to all branches of the target. Instead it proceeds to elaborate just the last branch's error. It should make it clear that the error elaboration is just one of several checks that failed. 

Otherwise it is easy to assume that the compiler _only_ tried the last branch and somehow skipped the "more promising" branch (which ultimately also fails, but at least contains the source type).

Based on one of the multiple issues reported by @aleksey-bykov in #6538.
Repository: go
Issue: cmd/compile: stack overflow accessing large return value
Labels: NeedsFix,compiler/runtime

Taken this toy example, that calculates prime numbers: http://play.golang.org/p/XrUCUvC7In

Building this with <b> go build -gcflags -m </b> shows following output

<b>
moved to heap: arr
moved to heap: x
</b>

However, running the program I get following error: 

runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow

runtime stack:
runtime.throw(0x470f80, 0xe)
        c:/go/src/runtime/panic.go:527 +0x97
runtime.newstack()
        c:/go/src/runtime/stack1.go:800 +0xb25
runtime.morestack()
        c:/go/src/runtime/asm_amd64.s:330 +0x87

goroutine 1 [stack growth]:
main.main()
        C:/Users/Daniel/Desktop/rensir.go:27 fp=0xc0c202be50 sp=0xc0c202be48
runtime.main()
        c:/go/src/runtime/proc.go:111 +0x27e fp=0xc0c202bea0 sp=0xc0c202be50
runtime.goexit()
        c:/go/src/runtime/asm_amd64.s:1721 +0x1 fp=0xc0c202bea8 sp=0xc0c202bea0

Is it supposed to get a stackoverflow, if it is a heap object?

Go version: go1.5.3 windows/amd64
OS: windows 7 64 bit
Repository: youtube-dl
Issue: how to configure youtebe-dl when using PAC on windows 7
Labels: request

hi,
I use a PAC file on windows 7 to access the internet.
I try the command "youtube-dl --proxy http://127.0.0.1:16823/adf.pac  https://www.youtube.com/watch?v=ByVPaqN9594" to download some files. but it failed.
i'm not sure if it' correct to set parameter. Could you help me?
Thanks.
Repository: youtube-dl
Issue: Site Support Request: PopTV.com
Labels: site-support-request,geo-restricted

Can you add support for this website?

Example URL: http://poptv.com/post/136762107828/impact-wrestling-premiere-full-episode

```
youtube-dl --verbose http://poptv.com/post/136762107828/impact-wrestling-premiere-full-episode
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'http://poptv.com/post/136762107828/i
mpact-wrestling-premiere-full-episode']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2016.01.15
[debug] Python version 2.7.10 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-77953-gcc83177, ffprobe N-77953-gcc83177, rtmpdum
p 2.4
[debug] Proxy map: {}
[generic] impact-wrestling-premiere-full-episode: Requesting header
WARNING: Falling back on generic information extractor.
[generic] impact-wrestling-premiere-full-episode: Downloading webpage
[generic] impact-wrestling-premiere-full-episode: Extracting information
[brightcove:legacy] AQ~~,AAAB-0j8O8k~,4Zm4raQfNIpvkHb496QWbqJbPs3IHFnC: Download
ing playlist information
ERROR: Empty playlist; 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 t
o call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "youtube_dl\YoutubeDL.pyo", line 665, in extract_info
  File "youtube_dl\extractor\common.pyo", line 312, in extract
  File "youtube_dl\extractor\brightcove.pyo", line 245, in _real_extract
  File "youtube_dl\extractor\brightcove.pyo", line 283, in _get_playlist_info
ExtractorError: Empty playlist; please report this issue on https://yt-dl.org/bu
g . 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 outp
ut.
```
Repository: godot
Issue: Node `duplicate()` doesn't copy internal variables values
Labels: bug,topic:core,confirmed

***Bugsquad edit:** This bug has been confirmed several times already. No need to confirm it further.*

___

Duplicate method don't take into account variable values of duplication root as well as internal nodes. 
I have prepared small test project that can be used to detect some issues related to duplication:
[DuplicateTests.zip](https://github.com/godotengine/godot/files/97344/DuplicateTests.zip) 
it test various scenarios and report results in output console in the following form:

```
(...)
Translation test: SUCCESS
Root export variable test: SUCCESS
Inner export variable test: SUCCESS
Root variable value test: FAIL
Inner variable val test: FAIL
Inner node structure test: SUCCESS

Summary result: FAIL
```

**17.08.2022 UPDATE**
I converted test project from Godot1? to Godot4 . I can confirm I still get the same result:
Godot4 reproduction here: https://github.com/godotengine/godot/issues/3393#issuecomment-1218262767

**Also to clarify: the issue is about usage of Object.duplicate() method and the fact that variables of  returned object (even simple types) are different then in the original one.**
Repository: go
Issue: tour: infinite loop example, after switching page 'Kill' button cannot be accessed
Labels: NeedsInvestigation

Context: http://127.0.0.1:3999/flowcontrol/4

When running example locally process time constraint is removed so infinite loop will happily chug along and can be killed using the button on page:

![image](https://cloud.githubusercontent.com/assets/1690934/12457181/214ef2b0-bf9b-11e5-963a-a7617c57b4bc.png)

However after switching pages the context is lost, program is still running and must be killed manually.

![image](https://cloud.githubusercontent.com/assets/1690934/12457210/3d6d9c94-bf9b-11e5-8077-46af7beab6ef.png)
Repository: rust
Issue: Rustdoc search box fails accessability guidelines
Labels: T-rustdoc,C-bug,A-a11y

Background links: https://www.w3.org/TR/WCAG20-TECHS/H32.html for a11y, http://doc.rust-lang.org/std/ for rustdoc search. Before typing anything:

![2016-01-20-141055_981x72_scrot](https://cloud.githubusercontent.com/assets/27786/12460013/982e9d7a-bf7f-11e5-8743-9be0710e45fa.png)

After typing a query:

![2016-01-20-141108_968x198_scrot](https://cloud.githubusercontent.com/assets/27786/12460014/983196ba-bf7f-11e5-81ae-25364eb0910d.png)

Basically, we currently implement the searchbox by using JS to hook into the submission: https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/static/main.js#L737-L741

So we're not providing a 'submit' button. But we're supposed to.

I'm not sure of the best way to resolve this, exactly. I _think_ the plan would be:
1. create an `<input type="submit">`
2. hide it with CSS
3. have it trigger that JS instead

Does that make sense? I am bad at front-end :(


<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":null}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: angular
Issue: Invalid component selectors should throw an error
Labels: hotlist: error messages,freq1: low,area: compiler,core: directive matching,type: confusing,P4

If you use an unsupported component selector, such as `parent-thing > child-thing`, Angular will **silently** accept this and just capture `child-thing`.
Repository: go
Issue: runtime: improve performance of IndexByte on older processors
Labels: Performance,NeedsFix,compiler/runtime

Pre-avx2 processors use a loop of sse operations to do IndexByte.  They use an unaligned load to do so.  There may be a significant performance win by aligning the loads.  See the comments at the end of https://go-review.googlesource.com/#/c/18703/
Repository: kubernetes
Issue: Secret and ConfigMap should limit # of keys
Labels: priority/backlog,sig/api-machinery,lifecycle/frozen

I think it's best to say "max 1000 keys, max key size is 256 characters. max total size of keys + data is 1 MB" or similar.

@pmorie promises to do this unless someone gets there first.
Repository: go
Issue: cmd/asm: incorrect instruction encodings
Labels: NeedsFix,early-in-cycle

I have constructed a fairly exhaustive test suite for the x86 assembler and identified some problems. The ones in this issue are long-time bugs that appear to have been present since the beginning of the Go project. We should fix them but given the history there is no need to rush the fixes into Go 1.6.

This may not be all of them: my tests don't account for some Go renamings of instructions.

I intend to fix these and check in the tests.

```
ADCB (BX), DL: have encoding "1013", want "1213"
   0:   10 13                   adc    %dl,(%rbx)
   0:   12 13                   adc    (%rbx),%dl

ANDPS (BX), X2: have encoding "660f5413", want "0f5413"
   0:   66 0f 54 13             andpd  (%rbx),%xmm2
   0:   0f 54 13                andps  (%rbx),%xmm2

CMOVLEQ (BX), DX: have encoding "0f4413", want "480f4e13"
   0:   0f 44 13                cmove  (%rbx),%edx
   0:   48 0f 4e 13             cmovle (%rbx),%rdx

MOVQ 0x123456789abcdef1, AX: have encoding "488b0425f1debc9a", want "48a1f1debc9a78563412"
   0:   48 8b 04 25 f1 de bc    mov    0xffffffff9abcdef1,%rax
   7:   9a 
   0:   48 a1 f1 de bc 9a 78    movabs 0x123456789abcdef1,%rax
   7:   56 34 12 

MOVQ AX, $0x123456789abcdef1: have encoding "48890425f1debc9a", want "48a3f1debc9a78563412"
   0:   48 89 04 25 f1 de bc    mov    %rax,0xffffffff9abcdef1
   7:   9a 
   0:   48 a3 f1 de bc 9a 78    movabs %rax,0x123456789abcdef1
   7:   56 34 12
```
Repository: angular
Issue: Angular2 Routing: persisting route tabs and child routes
Labels: feature,freq2: medium,area: router,feature: under consideration

(I posted the problem on SO: http://stackoverflow.com/questions/34925782/angular2-routing-persisting-route-tabs-and-child-routes but decided to ask here, too, hopefully more specific this time)

So, basically Router in Angular 2 destroys inactive components (my tabs!). The problem is I don't want this behaviour. Reason is I have some components like charts and data grid and want to switch between them fast, I don't want to recreate them.

I've found some workaround for one-level routing but it's totally not a solution.

`app.ts`:

``` ts
    @Component({ /*...*/ })
    @RouteConfig([
        {path: '/**', redirectTo: ['Dashboard']},

        {path: '/dashboard', name: 'Dashboard', component: EmptyRoute},
        {path: '/products/...', name: 'Products', component: EmptyRoute},
        {path: '/sales', name: 'Sales', component: EmptyRoute},
        {path: '/reports', name: 'Reports', component: EmptyRoute},
    ])
    export class App {
        constructor(private router: Router) {
        }

        public isRouteActive(route) {
            return this.router.isRouteActive(this.router.generate(route))
        }
    }
```

As you can see `component` is set to `EmptyRoute` (just an empty view `@Component` with no methods and no data) and I don't use `<router-outlet>` but instead I instantiate my route components manually:

`app.html`:

``` ts
    <dashboard [hidden]="!isRouteActive(['/Dashboard'])"></dashboard>
    <products-management [hidden]="!isRouteActive(['/Products'])"></products-management>
    <sales [hidden]="!isRouteActive(['/Sales'])"></sales>
    <reports [hidden]="!isRouteActive(['/Reports'])"></reports>
```

but of course it doesn't work for child routes. In my (existing - written with Angular 1.x) application I have `/products/product/21/pricing` or `/products/product/21` etc. (could get rid of `products/` part in the middle but whatever).

So, going back to `Router`. It instantiates and destroys. Ideally, I'd like to:
1. instantiate components only once - or better - decide when I want to do this (some Strategy?)
2. decide whether to **destroy or hide** components. When I hide a component I want to reuse it when route switches to the component.


**EDIT** on 14.11.2017: some people ask me about solution - yeah, I ditched Angular and use [Elm](http://elm-lang.org/) for private projects and changed my job.
Repository: go
Issue: x/net/http2: export more tunable knobs
Labels: NeedsInvestigation

There are several default window settings in `transport.go`:

``` go
    // transportDefaultConnFlow is how many connection-level flow control
    // tokens we give the server at start-up, past the default 64k.
    transportDefaultConnFlow = 1 << 30

    // transportDefaultStreamFlow is how many stream-level flow
    // control tokens we announce to the peer, and how many bytes
    // we buffer per stream.
    transportDefaultStreamFlow = 4 << 20

    // transportDefaultStreamMinRefresh is the minimum number of bytes we'll send
    // a stream-level WINDOW_UPDATE for at a time.
    transportDefaultStreamMinRefresh = 4 << 10
```

`NewClientConn` method will use these without looking up other places. However, these default values are not suitable for all situations like high-latency high-throughput network.

Can you provide some setters to change these values instead of rewrite the whole thing using `Framer` or forking and rewriting this repo?
Repository: neovim
Issue: weird newline behaviour when terminal scrolls because of new output
Labels: bug,terminal

<img width="1440" alt="screen shot 2016-01-23 at 11 54 41 pm" src="https://cloud.githubusercontent.com/assets/10180857/12534552/ae0cb06e-c22c-11e5-9f35-59e8dd842481.png">

Noticed this when testing #4085. Yes it is the same script. If the output of that script exceeds the terminal and it has to scroll, the background colour carries over to the rest of the line. It doesn't respect the newline.
Repository: opencv
Issue: Possible wrong tutorial (Arithmetic operation Tut for Python)
Labels: bug,category: documentation,category: samples,affected: 3.4

Studying opencv in python as new here, I came across the [Arithmetic operations tutorial](http://docs.opencv.org/master/d0/d86/tutorial_py_image_arithmetics.html) and the `cv2.threshold(...)` command. In the Bitwise operation section I runned the code multiple times  and the result was not as show in the pictures below. 
I got somthing closer to the  desired result by changing the thresold method as it is to:

`ret, mask = cv2.threshold(img2gray, 250, 255, cv2.THRESH_BINARY_INV)`

which results in the desired mask (Results attached)

I can see that the tutorial tried to extract the mask by the complementary command (low thres, `cv. THRES_BINARY`) but this results in a non desired output (**in my case at least and unless I miss something**)

![img](https://cloud.githubusercontent.com/assets/15565563/12549927/3cf9e3b8-c369-11e5-90ce-f571feb0969d.PNG)
![imggray](https://cloud.githubusercontent.com/assets/15565563/12549929/3d02c3a2-c369-11e5-83a8-c84a25de45ed.PNG)
![mask](https://cloud.githubusercontent.com/assets/15565563/12549928/3d022334-c369-11e5-9770-82cff712a5fc.PNG)
![res](https://cloud.githubusercontent.com/assets/15565563/12549930/3d033e40-c369-11e5-89a5-3ab8ac346587.PNG)
Repository: opencv
Issue: Support BORDER_TRANSPARENT for image filtering
Labels: category: core

Image filtering functions like cv::blur do not support BORDER_TRANSPARENT as border handling option. An exception is thrown within cv::borderInterpolate if this value is used. BORDER_TRANSPARENT could have practical uses in case of cv::Mat obtained as region of interest (operator parenthesis) of another cv::Mat: the edge pixels would be computed from pixels in the input image outside the region of interest cv::Mat, but inside the containing cv::Mat. The implementation would be actually very simple, by adding these 2 lines of code at the beginning of cv::borderInterpolate:

```
if( borderType == BORDER_TRANSPARENT )
    return p;
```

(I have tested it with blur and gaussian filter and it seemingly works fine)
One drawback is that the user would have to check that its region of interest cv::Mat is far enough from the borders of the containing cv::Mat (the distance would have to be `(kernelSize/2)+1`.
(In the functions I tested it does crash if I don't take these precautions)
 How difficult would it be to perform this check only once at the beginning of the filtering function, and throw an informative exception in case?
Repository: nvm
Issue: nvm problems caused by "npm version" of nvm
Labels: informational,pull request wanted

Perhaps the **Problems** section of the README.markdown could note there is an old, npm-installed (or homebrew-installed) version of nvm that does not work with modern systems. (In fact, its github page/repo has disappeared...) It could say something like:

> **Outdated nvm** There is an older, unmaintained version of nvm that conflicts with this project. If it's installed, you may see messages like `"local" not implemented yet` or `Error: Cannot find module './nvm-help'` when typing nvm commands. You should remove that version with `npm uninstall -g nvm`, then re-run the **Install Script** above.

PS It would be helpful if each of the items in the **Problems** section had the first phrase bolded, so that people can see that they're separate questions/issues.
Repository: kubernetes
Issue: Service Account Key Rotation
Labels: area/security,kind/documentation,kind/cleanup,sig/auth,priority/important-longterm,lifecycle/frozen

A user asked how to rotate service account keys.
[discussion thread](https://groups.google.com/forum/#!msg/google-containers/qSo2Q5kGI6I/use7PIYuCAAJ)

Currently, user restarts controller manager with new keypair and then restarts all pods.
User pointed out problems with that procedure:
1. you cannot restart pod instantly
2.  until a pod is restarted, it is basically broken when assuming it requires access to the API.  (KubeDNS in particular is a problem)
3. many pods are restarted which actually don't have to be restarted as they don't access the API

For problem 2, I suggested the following improved procedure:
1. Cluster is started with keypair 1
   - `kube-apiserver -service-account-key-file=pub-1` 
   - `kube-controller-mgr --service-account-private-key-file=priv-1`.
2. time passes.  service account tokens are generated with first keypair
3. it is time to rotate.  generate new key pair, `pub-2` and `priv-2`
4. run with both keypairs
   -  Accept both: `kube-apiserver -service-account-key-file=pub-1,pub-2`
   - Generate new: `kube-controller-mgr --service-account-private-key-file=priv-2`
5. for each service account, delete all token secrets and references to them.  Token controller will make new ones, and the new ones will use the new key.
6. restart pods at a leisurely pace.
7. stop accepting old tokens
   -  `kube-apiserver -service-account-key-file=pub-1` 
   - `kube-controller-mgr --service-account-private-key-file=priv-1`

What is missing is that `-service-account-key-file` only accepts a single public key.  Code deeper in the token authenticator appears to handle a list of keys.  

For problem 3:

Action items:
- [ ] make the flag take a list
- [ ] close #16779 so that it can be explicit which pods do not need (and so do not have) a service account token.
- [ ] document rotation procedure, mentioning how to find and to skip pods without a token.
- [ ] e2e test where keys are rotated
Repository: go
Issue: proposal: os/v2: File should be an interface
Labels: v2,Proposal

By analogy with #13473, os.File should also be an interface. That would permit a program to use files in the abstract sense, including implementations not provided by the os package.
Repository: neovim
Issue: terminal: tty RPC via APC ctrlseq
Labels: enhancement,terminal

I've been using neovim's terminal feature extensively lately (notice all my bug reports :P) and I had a couple really neat ideas that I think would be a must have feature for anyone who uses ssh and neovim. 

First in the neovim terminal if you are sshed onto a server, if you type `nvim file` instead of opening a new neovim instance on the server it pipes back the data to your already neovim. This would make editing over SSH very seamless. You already have the terminal open and maybe you were doing something and bam if you type nvim you can edit now in your already open instance (access to clipboard etc).

I know about netrw's ability to edit files over the network but it would be really nice if it was seamless. I have to type `e scp://server/pathtofile` which is really annoying but a simple `nvim file` would make it much easier. 

Second is either syncing the working directories of the terminals with neovim similar to `set autochdir` or to be able to again pipe straight into the open neovim instance from the terminal. 

These are ideas I want to implement myself but I wanted some input first.

edit: nvm I'm never gonna have the time to implement all this. Sorry!
Repository: go
Issue: gccgo, doc:  comments on doc/install/gccgo for gcc release 6
Labels: NeedsInvestigation

I know that it is likely that some changes are planned for golang.org/doc/install/gccgo for the release of gcc 6.  Here are a few comments/suggestions on this page.

With the changes to split stack support in gccgo for gcc release 6, it no longer required to use --with-ld on the configure option (and probably better not to? maybe both methods should be described).  In gcc 6, if the gold linker is found in the PATH when gcc is configured, then it will be used as the linker for gccgo, as required for split stack.

Also, split stack is now implemented for PowerPC64 big and little endian in addition to x86.

On the section describing how to build gccgo, another way to get gcc source is from the weekly snapshots or releases from the various mirrors for GNU GCC found here https://gcc.gnu.org/mirrors.html.  This is much faster than using svn to get the source.

When describing the setting of the LD_LIBRARY_PATH, the paths used are not correct based on the systems I've looked at (ppc64le & x86).  The shared libraries are found under ${prefix}/lib64 or ${prefix}/lib, so that is the path needed for LD_LIBRARY_PATH or when setting the runpath with the -W option.

The example showing -gccgoflags should have the options within quotes.

It would be nice to see something that mentions the use of the go tool built for gccgo and how it is preferred over using gccgo directly or the go tool from golang with the -compiler option.  When using the go tool built for gccgo, then using 'go version' displays version information about gccgo.  Also, if 'go build' is used to build an application with build tags then it matches against the tags for gccgo as expected.  When using the go tool from golang with the -compiler option, the build tags are matched against the golang values and not the gccgo values.
Repository: go
Issue: runtime/race: deflake tests
Labels: help wanted,NeedsFix,compiler/runtime

See https://go-review.googlesource.com/#/c/18968 for context.
Race tests run with GOMAXPROCS=1, this makes them more or less reliable. But the ultimate solution is to explicitly annotate tests with required execution order by means of a special "invisible" synchronization primitive (that's what is done for C++ ThreadSanitizer tests). But that would require going over 350 tests.