sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/compile: slow to compile large map literals containing dynamic elements
Labels: ToolSpeed,compiler/runtime

### What version of Go are you using (`go version`)?

`go version go1.8 darwin/amd64`

### What operating system and processor architecture are you using (`go env`)?

```
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/afisk/gopath"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/_q/9g3l6s7x3v92ws74nng9g2g00000gn/T/go-build418677857=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
```

### What did you do?

Used `text/template` to generate a very large go file to embed data, and then just ran `go build`

```
$ git clone https://github.com/getlantern/httpseverywhere.git
$ cd httpseverywhere
$ git checkout too-large-for-go
$ go build
```

### What did you expect to see?
A successfully built binary

### What did you see instead?

```
$ go build
# github.com/getlantern/httpseverywhere
panic: runtime error: makeslice: len out of range

goroutine 1 [running]:
cmd/compile/internal/gc.newliveness(0xc4272221b0, 0xc42011c238, 0xc49bc7e000, 0x4a651, 0x5ac00, 0xc4da1da000, 0x832c, 0x9800, 0xc48ef5f898)
	/usr/local/go/src/cmd/compile/internal/gc/plive.go:717 +0x145


cmd/compile/internal/gc.liveness(0xc4272221b0, 0xc42011c238, 0xc4c21321c0, 0xc4c2132230)
	/usr/local/go/src/cmd/compile/internal/gc/plive.go:1740 +0x14f
cmd/compile/internal/gc.genssa(0xc45d30b440, 0xc42011c238, 0xc4c21321c0, 0xc4c2132230)
	/usr/local/go/src/cmd/compile/internal/gc/ssa.go:4500 +0x77c
cmd/compile/internal/gc.compile(0xc4272221b0)
	/usr/local/go/src/cmd/compile/internal/gc/pgen.go:443 +0x707
cmd/compile/internal/gc.funccompile(0xc4272221b0)
	/usr/local/go/src/cmd/compile/internal/gc/dcl.go:1292 +0xdc
cmd/compile/internal/gc.fninit(0xc420115c00, 0x3b, 0x70)
	/usr/local/go/src/cmd/compile/internal/gc/init.go:164 +0xb8d
cmd/compile/internal/gc.Main()
	/usr/local/go/src/cmd/compile/internal/gc/main.go:471 +0x23b1
main.main()
	/usr/local/go/src/cmd/compile/main.go:50 +0xfe
```
Repository: kubernetes
Issue: Recommended liveness check for kube-apiserver
Labels: area/security,sig/api-machinery,kind/feature,lifecycle/frozen

For 1.6, what is the healthz endpoint / recommended liveness check for a secure setup (RBAC, kubeadm discovery not enabled, insecure port disabled)?

`curl https://127.0.0.1/healthz` is returning a 401 for me.

Edit: What I originally called "kubeadm discovery not enabled" is now more commonly / correctly called "setting --anonymous-auth=false on apiserver".
Repository: go
Issue: cmd/go: document that generate processes packages in command line order
Labels: Suggested,Documentation,help wanted,NeedsFix

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?

```
go version go1.8 linux/amd64
```

### What operating system and processor architecture are you using (`go env`)?

```
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/myitcv/mgo/src/modelogiq.com/g/_vendor:/home/myitcv/mgo"
GORACE=""
GOROOT="/home/myitcv/gos"
GOTOOLDIR="/home/myitcv/gos/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build675075507=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
```

### What did you do?

`go generate` accepts a number of packages as arguments, packages on which to run `go generate`. `go generate -help` makes no mention of the order in which those packages will be `go generate`-d

The lack of any mention on the order of execution might well be intentional... 

But in any case I'd like to propose we define the order and document it (this issue could conceivably be a proposal, very happy to redo as such)

The use case stems a use case where `go generate`-ors end up parsing dependencies in order to make decisions on their output. In this context, having `go generate` run in reverse dependency order (there's probably a more precise term?) on the set of packages provided as arguments avoids the need to re-run `go generate` multiple times (which incidentally is the current alternative, clearly not ideal)

### What did you expect to see?

"Expect" is not the correct word here... because the order is unspecified I can't reasonably have an expectation. More a "hope" perhaps that:

`go generate` should run in reverse-dependency order on the set of packages passed to it as arguments.

### What did you see instead?

It runs in an unspecified order.

cc @robpike perhaps?
Repository: angular
Issue: broken animations in angular4
Labels: type: bug/fix,area: animations,freq3: high,P3

[X ] bug report 

**Current behavior**
I have animation on routerTransition and it is breaking my app. the error is like this

> ERROR Error: Uncaught (in promise): Error: The provided animation trigger "c12#routeAnimation" has not been registered!
> Error: The provided animation trigger "c12#routeAnimation" has not been registered!
>     at InjectableAnimationEngine.DomAnimationEngine.setProperty (browser.es5.js:1354) [angular]
>     at AnimationRenderer.setProperty (animations.es5.js:226) [angular] 
```
The only thing changed is i have upgraded angular to 4. Previously is was working just fine. This is how i used routerTransitions in my component
> animations: [routerTransition],
> host: '[@routeAnimation]': ''
```

   
  
**Expected behavior**
It should work as it is been working in previous version

**Minimal reproduction of the problem with instructions**
in a ts file add this

```
import { animate, state, style, transition, trigger } from '@angular/animations';`
export const routerTransition =
    trigger('routerAnimations', [
        state('void', style({position: 'absolute', overflow: 'hidden', width: '100%', top: '50px', left: '20px'})),
        state('*', style({position: 'absolute', overflow: 'hidden', width: '100%', top: '50px', left: '20px'})),
        transition(':enter', [
            style({transform: 'translateX(100%)'}),
            animate('0.5s ease-in-out', style({transform: 'translateX(0%)'}))
        ]),
        transition(':leave', [
            style({transform: 'translateX(0%)'}),
            animate('0.5s ease-out', style({transform: 'translateX(-100%)'}))
        ])
    ]);
```

And then inject it into a component like this

```
host: '[@routeAnimation]': 'true'
animations: [routerTransition],
```


**What is the motivation / use case for changing the behavior?**
<!-- Describe the motivation or the concrete use case -->

**Please tell us about your environment:**
<!-- Operating system, IDE, package manager, HTTP server, ... -->
Window 10
* **Angular version:** 4

* **Browser:** [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
<!-- All browsers where this could be reproduced -->
 Chrome
* **Language:** [all | TypeScript X.X | ES6/7 | ES5]
Typescript 2.2.2
* **Node (for AoT issues):** `node --version` =   
6.9
Repository: TypeScript
Issue: add a constraint for immutable types
Labels: Suggestion,Awaiting More Feedback

say, i have a generic function that by design requires that its parameters may only take immutable arguments, i wish i could get such guarantee from TS by declaring my function as follows:

```typescript
function doThings<readonly T>(value: T): Result<T> {
   // ...
}
```
as far as how to make an interface immutable:
```typescript
readonly interface Point {
   readonly x: number;
   readonly y: number;
}
```

so the problem being solve here is to make sure that the caller won't mutate the argument after it is passed to the function

**simple use case**: a hash-based data container, which calculates a hash of a given value, and will store it at that hash, and it all will work until the value is mutated outside and tha stored hash is no longer valid, so the container doesn't really work anymore

**another use case**: a cache or object pool or any other situation when there are many parties involved in taking hold of the same object, which must be guaranteed from being mutated by one party to prevent spooky action at a distance for all other parties
Repository: rust
Issue: Rustdoc incorrectly orders trait impls
Labels: T-rustdoc,C-bug

Documentation for `Rc`: https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html
Source code: https://doc.rust-lang.org/nightly/src/alloc/rc.rs.html#263-265

In the source impls for `!Send` and `!Sync` come one after another. In the generated documentation they don't.

The docs should respect the order of impls in the source - that's what I've been told in the `#rust-docs` channel. In fact, other impls for `Rc` apparently don't follow the order from the source either. What order *do* they follow? :)
Repository: opencv
Issue: [Feature Request] VResizeLanczos4Vec_32s8u
Labels: feature,category: imgproc

Hi :)

I was testing out some image resizing with opencv and I realized that Lanczos4 ran substantially slower than bicubic. I was curious why this was, so I went digging, and found out that the bicubic resampler engages a vectorized implementation `VResizeCubicVec_32s8u`, which I believe operates on 4, 8-bit unsigned ints. Lanczos seems to have some vectorized implementations, but none for this particular configuration. I can confirm from profiling that the Lanczos resampler is running non-vectorized code.

It'd be great to add this vectorized codepath to imgwarp.cpp. I've done a little SSE work before but even still it's pretty tricky, so I'm not sure if the other vectorized implementations can be modified to work for Lanczos. Hopefully this won't be a lot of work :)
Repository: go
Issue: gccgo: unneeded hash/equal functions emitted for runtime types
Labels: NeedsInvestigation

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?

gccgo trunk/tip
go version devel +7e817859b3 Mon Mar 27 18:51:42 2017 +0000 linux/amd64

### What operating system and processor architecture are you using (`go env`)?

GOARCH="amd64"
GOOS="linux"

### What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

https://play.golang.org/p/tl4iNxoar6

### What did you expect to see?

This program compiles and builds with gccgo, however I note that the compiler is generating more hash/equal functions that it needs to. In particular, it seems to have decided that it should generate hash/equal functions for the anonymous type corresponding to the BySize field in runtime.MemStats, along with a few other runtime types. This is not a bad thing from a correctness point of view, but it results in extra wasted work at compile time and link time, as well as object file bloat.

### What did you see instead?

I would expect that the compiler would be able to recognize that the type in question is in an external package and that the hash/equal functions can be picked up externally.
Repository: rust
Issue: Add explicit or zero constructor for `std::time::Instant`
Labels: T-libs-api

**Updated: [see below](https://github.com/rust-lang/rust/issues/40910#issuecomment-1015362071)**

----

I'd like to be able to construct an `Instant` with value 0 (whatever epoch that is, I don't care).

Motivation: we have code to schedule timeouts taking a `Duration`. We have a mock version of the same scheduler which doesn't use real time but has the same API, and uses `Instant` internally (simply because converting between `Instant` and `Duration` is convenient and gives us mock code closer to the real code). Since the only way of constructing an `Instant` at the moment is `Instant::now()`, we currently store a "start time" when constructing the scheduler and compare all times to that; this would be simpler if we could simply use zero.
Repository: vscode
Issue: showInputBox should have the ability to have an array of quickpick options as well
Labels: feature-request,api,quick-pick

If you do showInputBox, you can receive input from a user.

If you do showQuickPick you can have the user choose from a list.

There is no way to receive input from a user AND show a list of choices.

If you try this with showQuickPick, and the user enters something that is not in the array, undefined is returned.

I think that showInputBox should have an overload that displays options just like in showQuickPick and returns the value instead of undefined if it is not an entry from the array.
Repository: go
Issue: x/mobile: fix x/mobile/gl just like c opengl or go-gl
Labels: mobile

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?
1.7

### What operating system and processor architecture are you using (`go env`)?
mac os

### What did you do?
migrate a program from pc to mobile
go get -u github.com/go-gl/glfw/v3.2/glfw               --> golang.org/x/mobile/app
go get -u github.com/go-gl/gl/v2.1/gl                   --> golang.org/x/mobile/gl
go get -u github.com/timshannon/go-openal/openal        --> golang.org/x/mobile/exp/audio/al
I wish to do the above change

### What did you expect to see?
 [golang.org/x/mobile/gl] act just like [github.com/go-gl/gl/v2.1/gl ]

### What did you see instead?
There is lot of differences ,  
--------------------------------------------------------------------------------------------------
//not implemented
gl.TexImage1D
gl.Begin(gl.TRIANGLE_STRIP)
gl.End()
gl.PushMatrix()			
gl.PopMatrix()
gl.MatrixMode(gl.PROJECTION)
gl.TexCoord2f(1, 1)
gl.Vertex2f(x2, y2)
gl.Color4f(r, g, b, a)
gl.LoadIdentity()
gl.Ortho(0, float64(sys.scrrect[2]), 0, float64(sys.scrrect[3]), -1, 1)
gl.Translated(0, float64(sys.scrrect[3]), 0)
--------------------------------------------------------------------------------------------------
//interface/behaviour change 
gl.GenTextures(1, &paltex)  -->CreateTexture
gl.DeleteTextures(1, &paltex)	--> DeleteTexture
--------------------------------------------------------------------------------------------------
//unclear
gl.Str(src) -->GetString(pname Enum) string  ???
gl.DeleteObjectARB(fragObj) --> DeleteShader    ????
gl.GetInfoLogARB -->GetProgramInfoLog|	GetShaderInfoLog  ????
Repository: go
Issue: proposal: spec: relax structural matching for conversions
Labels: LanguageChange,Proposal,LanguageChangeReview

Currently, as of Go 1.8, one can convert between two identical types, A and B, defined as follows:

```
type A struct {
	Foo int
}

type B struct {
	Foo int
}
```

It is however not possible to convert between `[]A` and `[]B`, even though the memory layout of both slices is identical, and one has to resort to following hackery to get both compile time checking and O(1) conversion time:

```
package main

import (
	"fmt"
	"unsafe"
)

type A struct {
	Foo int
}

type B struct {
	Foo int
}

// Compile time check that A and B are the same
var _ = A(B{})

func main() {
	a := A{Foo: 5}
	fmt.Println(B(a))
	
	as := []A{{Foo: 5}}
	fmt.Println(*(*[]B)(unsafe.Pointer(&as)))
}
```

This is often useful when different parts of an application are responsible for different parts of the handling of the lifetime of an object. For example, a database layer could return []A, which would be a type with `db:"foo"` decorators to help with database deserialization using the sqlx package, while the 
http handler wants to use []B, because it contains the field tags necessary for json serialization.

Currently, a copy or unsafe is required, I propose allowing slices with identical memory layouts to be converted between another, and to restrict this to only 1 level deep to reduce possible complexity in the compiler.

This is a similar reasoning why the spec was changed to allow structs with different field tags to be converted between eachother, and I believe it would help avoid usage of unsafe and copies in many applications which seperate out concerns between different layers.
Repository: rust
Issue: support deeply nested coercions
Labels: A-type-system,C-enhancement,T-compiler,T-types

It would be nice if this code were to compile:

```rust
struct Foo {
    v: Vec<i32>
}

fn bar(f: &Foo, g: &[i32]) {
    let x = match true {
        true => {
            match f {
                &Foo { ref v } => &v,
            }
        }
        false => {
            g
        }
    };

    println!("{:?}", x);
}

fn main() { }
```

At present, it does not. The reason is that we apply a `&x[..]` coercion to the inner match expression, but the result of the arm is not coerced, and hence has type `&&Vec<i32>`. This then fails the borrow-check because the borrow of `v` outlives the arm. If you change the arm to `&Foo { ref v } => v` or `&Foo { ref v } => &v[..]`, it will compile fine.

The following very similar example using an `if` does work, or at least **did**,  but somewhat accidentally. Pull request https://github.com/rust-lang/rust/pull/40224 winds up breaking it as part of a refactoring; hopefully nobody will notice. =)

```rust
struct Foo {
    v: Vec<i32>
}

fn bar(f: &Foo, g: &[i32]) {
    let x = if true {
        match f {
            &Foo { ref v } => &v,
        }
    } else {
        g
    };

    println!("{:?}", x);
}

fn main() { }
```
Repository: TypeScript
Issue: Broken inference between index typed object and Record
Labels: Suggestion,In Discussion

**TypeScript Version:**  2.2.2

**Code**

```ts
interface Errors {
  [field: string]: {
    key: string
    message: string
  }
}

const errors: Errors = {}

function genericObjectFunction<K extends string, V>(obj: Record<K, V>): [K, V][] {
  return []
}

/*
 Argument of type 'Errors' is not assignable to parameter of type 'Record<string, never>'.
 Index signatures are incompatible.
 Type '{ key: string; message: string; }' is not assignable to type 'never'.
 */
genericObjectFunction(errors)
```

The types seem generally compatible though, as expected this is legal:

```ts
const errorRecord: Record<string, { key: string, message: string }> = errors
```

**Expected behavior:**
`genericObjectFunction(errors)` should compile.
Repository: go
Issue: proposal: spec: add decimal float types (IEEE 754-2008)
Labels: LanguageChange,Proposal,LanguageChangeReview

I know there was a proposal about decimal as an std package.
But according to https://en.wikipedia.org/wiki/Decimal_floating_point, there have already been multiple compliant hardware implementations, and supported by several commonly used programming languages. I think having decimal as first-class citizen like the other part of the IEEE-754 standard makes sense.

The upside is we don't have to spend the effort on API design upfront to make it useful like math.big. We can just limit the scope of the operations only within the Go's existing arithmetic operators. Designing a good numerical/arithmetic API beyond the conventional operators is harder and can be deferred later with no harm.
Repository: go
Issue: runtime/pprof: provide memory mapping info on macOS
Labels: help wanted,NeedsFix,compiler/runtime

Noticed during google/pprof#120

https://github.com/golang/go/blob/master/src/runtime/pprof/proto.go#L370 
depends on /proc/self/maps which results in missing memory mapping info in
profile data from non-linux system (e.g. OSX).

Provide it to help offline symbolization for non-Go symbols.
Repository: youtube-dl
Issue: [cloudy] unable to download video data: HTTP Error 403
Labels: cant-reproduce

- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.03.26**
- [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) 
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones

### What is the purpose of your *issue*?
- [x] Bug report (encountered problems with youtube-dl)
- [ ] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---

### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue*

---

### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows:

Add `-v` flag to **your command line** you run youtube-dl with, copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```):
```
$ youtube-dl -v http://www.cloudy.ec/v/1b2368a59f8ff
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'http://www.cloudy.ec/v/1b2368a59f8ff']
[debug] Encodings: locale cp1256, fs mbcs, out cp720, pref cp1256
[debug] youtube-dl version 2017.03.26
[debug] Python version 3.4.4 - Windows-10-10.0.14393
[debug] exe versions: none
[debug] Proxy map: {}
[Cloudy] 1b2368a59f8ff: Downloading webpage
[Cloudy] 1b2368a59f8ff: Downloading webpage
[debug] Invoking downloader on 'http://185.176.193.243/dl/bbb45536315c6d2115e8a27bc8a5107b/58dd7ce8/oo7152ba147c1bef7ac25bb871aaa5c6fa.mp4'
ERROR: unable to download video data: HTTP Error 403: Forbidden
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpje2_cfdl\build\youtube_dl\YoutubeDL.py", line 1791, in process_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpje2_cfdl\build\youtube_dl\YoutubeDL.py", line 1733, in dl
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpje2_cfdl\build\youtube_dl\downloader\common.py", line 356, in download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpje2_cfdl\build\youtube_dl\downloader\http.py", line 61, in real_download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpje2_cfdl\build\youtube_dl\YoutubeDL.py", line 2094, in urlopen
  File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
  File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
  File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
  File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
  File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default
urllib.error.HTTPError: HTTP Error 403: Forbidden
<end of log>
```

---
- Single video: http://www.cloudy.ec/v/1b2368a59f8ff
---
Repository: vscode
Issue: Several fonts at the same time for different elements of the code
Labels: feature-request,editor-core

Please create a way to give themes and/or users the possibility of using several fonts at the same time. Please check this article that describes how this is possible to achieve on the Atom editor.

https://medium.com/@peterpme/operator-mono-fira-code-the-best-of-both-worlds-191be512fd5e

In this example, this allows the user the define one font for certain elements in the code, while using another fonts as the main one for the rest of the code.

> If Operator Mono and Fira Code spent a lot of time together and had a baby, you’d get [something that looks like this](https://cdn-images-1.medium.com/max/800/1*hE_nLB776KUDXPERE_3cXw.png).