sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: proposal: spec: add const literals for reference types like structs, maps, and arrays
Labels: LanguageChange,Proposal,LanguageChangeReview

**Summary:**
I propose adding const literals for reference types. E.g.

```go
const c = []string{"1", "2", "3"}
```

**Background:**
Having const structs and arrays and maps is very useful to make sure the value is not changed. This is specially for tests where you want to make sure the value you are passing to functions, the only way right now is to make a copy of the object explicitly. When passing a const to a function or over a chan or assigning it to a variable Go would make a copy.

**Proposal:**
Allow definition of constants of reference types like structs, maps, and arrays.

Impact:
No impact on existing code.

**Discussion:**
This can simplifies code.

**Alternatives:**

**Alternative 1:** use var definitions, do explicitly copy
Without a built-in DeepCopy standard function the developer has to write their own copy functions for each type. It is also likely to break if the language adds new basic types in future. 
But even if we had a DeepCopy standard function one cannot be sure that some other part of code is not changing the value of the variable. This gets worse when the const has to be exported or when the packages consists of multiple files.

```go
var c = []string{"1", "2", "3"}
.
.
.
v := cCopy(c)
```

**Alternative 2:** generator function
We can write functions that create the struct and return it. E.g.
```go
func genC() []string { return []string{"1", "2", "3"} }
.
.
.
v := genC(c)
```
This leads to code with lots of functions just for creating values.
Repository: rust
Issue: Improve error message for one named, one anonymous lifetime parameters
Labels: C-enhancement,A-diagnostics,A-lifetimes,T-compiler

For the following example
```
fn foo<'a>(x: &'a i32, y: Vec<&i32>) {
                       - consider changing the type of `y` to `std::vec::Vec<&'a i32>`
    y.push(x);
           ^ this reference must have lifetime 'a
}
```
can be refined to

```

fn foo<'a>(x: &'a i32, y: Vec<&i32>) {
                              ---- consider changing this type to `&'a i32`
    y.push(x);
           ^ this reference must have lifetime 'a
}
```
Underline `&i32` instead of the whole type.

cc @nikomatsakis
Repository: angular
Issue: Animations - stagger not working in route outlet
Labels: type: bug/fix,area: animations,freq2: medium,P3

<!--
PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.

ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.
-->

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre>

## Current behavior
<!-- Describe how the issue manifests. -->
My parent component has router-outlet where Home or About component is rendered. Router animation is working fine, all components have the same list and animations - `@expand` and `@listXXX`.

Issue: When refreshed the page, both `@expand` and `@listParent` work fine, but when navigated between Home and About, `@listChild` never seems to work at `ngFor` initialization. If I try to push / pop a single item, animation works though.

When router animation done, I am querying `@expand`, `@listChild` and calling animateChild().

## Expected behavior
<!-- Describe what the desired behavior would be. -->
When refreshed or navigated, `@listChild` stagger animation should work just like `@expand` animation.

## Minimal reproduction of the problem with instructions
<!--
For bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via
https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
-->
https://embed.plnkr.co/Ft0I5iPpvbMra5ZrV7wc/

## What is the motivation / use case for changing the behavior?
<!-- Describe the motivation or the concrete use case. -->


## Environment

<pre><code>
Angular version: 4.3.1
<!-- Check whether this is still an issue in the most recent Angular version -->

Browser:
- [x] Chrome (desktop) version 59
- [ ] Chrome (Android) version XX
- [x] Chrome (iOS) version 59
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: 6.10.0  <!-- run `node --version` -->
- Platform:  Windows<!-- Mac, Linux, Windows -->

Others:
<!-- Anything else relevant?  Operating system version, IDE, package manager, HTTP server, ... -->
</code></pre>
Repository: go
Issue: x/build/cmd/coordinator, x/build/cmd/gomoteserver: ssh proxy should support scp
Labels: help wanted,Builders,FeatureRequest

As of https://golang.org/cl/50750 the build coordinator has an ssh server to proxy to buildlets. (That was bug #19956)

But there's no scp support yet.

This is a tracking bug to figure that out.
Repository: vscode
Issue: Support workspace projects / folders under different colors in sidebar and tabs
Labels: feature-request,ux,themes,workbench-tabs,workbench-multiroot


- VSCode Version: Nightly
- OS Version: Any

Workspace feature is really useful as it is today, but could themes API be extended so to display different projects with different colors/nuances? 

See:

![projects_with_colors_in_vsc_workspace](https://user-images.githubusercontent.com/11835025/28514861-dd1a39b0-705b-11e7-9ed3-fca12a8cefe3.png)


It would be even better if tabs could have different colors, to resemble the project they belong to:

![projects_and_tabs_with_colors_in_vsc_workspace](https://user-images.githubusercontent.com/11835025/28514909-062f4fca-705c-11e7-8376-17fbcd1a4130.png)

Thanks for all the beautiful code and the effort you put in this superb project.

Roberto.
Repository: kubernetes
Issue: testing.StartTestServer doesn't tear down cleanly
Labels: kind/bug,priority/backlog,area/apiserver,sig/api-machinery,lifecycle/frozen

**What happened**:

The new `k8s.io/kubernetes/cmd/kube-apiserver/app/testing.StartTestServerOrDie` function (introduced in https://github.com/kubernetes/kubernetes/pull/46865) returns a teardown function which doesn't cleanly shut down the test server. This results in the accumulation of goroutines and log spam which prevents effective use of the test server across multiple test functions within the same process.

**What you expected to happen**:

Calling the teardown function should gracefully terminate everything that started up when `StartTestServerOrDie` was called.

**How to reproduce it (as minimally and precisely as possible)**:

Using the following sample integration test code:

```go
import (
	"fmt"
	"runtime"
	"testing"

	apitesting "k8s.io/kubernetes/cmd/kube-apiserver/app/testing"
)

func TestTeardown(t *testing.T) {
	_, tearDown := apitesting.StartTestServerOrDie(t)
	tearDown()
	stack := make([]byte, 8196)
	size := 0
	for {
		size = runtime.Stack(stack, true)
		if size < len(stack) {
			break
		}
		stack = make([]byte, len(stack)*2)
	}
	fmt.Printf("%s\n", string(stack[0:size]))
}
```

After `tearDown()` returns, there are several lingering goroutines which forever attempt to maintain etcd connections to the terminated etcd instance. Here's an example stack dump:

https://gist.github.com/ironcladlou/52b3e3306948db3943b426c70ce7f85b

Among all the etcd connection threads, some things you'll notice are lingering `Cacher` instances (which are created due to the default `EnableWatchCache` storage setting) which seem to try and hold watches, and configuration_manager (which may or may not hold connections; I'm not sure yet). This seems to indicate various components started during apiserver setup aren't actually shutting down.

**Anything else we need to know?**:

This is important for enabling integration testing of custom resource garbage collection (https://github.com/kubernetes/kubernetes/pull/47665).

**Environment**:
- Kubernetes version (use `kubectl version`): master (as of 088141ca3a193feab943375bcc564db1a66ef58a)
- Cloud provider or hardware configuration**:
- OS (e.g. from /etc/os-release): darwin/amd64
- Kernel (e.g. `uname -a`):
- Install tools:
- Others:

/cc @sttts @caesarxuchao @deads2k @liggitt @kubernetes/sig-api-machinery-bugs 
/kind bug
Repository: opencv
Issue: derivAperture, histogramNormType not used in HOGDescriptor
Labels: RFC

OpenCV => 3.2 & master

If I am right <code>derivAperture</code> and <code>histogramNormType</code> parameters are not used in the <code>HOGDescriptor</code> class.
There are references of them in [hog.cpp](https://github.com/opencv/opencv/blob/master/modules/objdetect/src/hog.cpp) and [objdetect.hpp](https://github.com/opencv/opencv/blob/master/modules/objdetect/include/opencv2/objdetect.hpp).
Are they here for future development or should they be removed ?
In the first case I think something should be added to the documentation to explain their future role and that they are not currently used.
Repository: TypeScript
Issue: `const enum` inside a namespace makes it treated as a value
Labels: Bug

**TypeScript Version:**  nightly (2.5.0-dev.20170719)

**Code**

```ts
declare const N: number;
declare namespace N {
    const enum E {}
}
```

**Expected behavior:**

No error. `N` does not contain any values, so it should be OK to merge it with a value.

**Actual behavior:**

```
src/foo.d.ts(1,15): error TS2451: Cannot redeclare block-scoped variable 'N'.
src/foo.d.ts(2,19): error TS2451: Cannot redeclare block-scoped variable 'N'.
```
Repository: rust
Issue: Tracking issue for RFC 2044: dual-MIT/Apache2 licensing
Labels: B-RFC-approved,T-core,C-tracking-issue

This is a tracking issue for RFC 2044 ([thread](https://github.com/rust-lang/rfcs/pull/2044), [rendered](https://github.com/rust-lang/rfcs/blob/master/text/2044-license-rfcs.md)), to put the `rust-lang/rfcs` repo under dual MIT/Apache-2 licensing terms.

Necessary steps for execution:

Asking past contributors to agree with the licensing terms (with <=40 contributors each to bypass the github mention limit of 50):
- [ ] https://github.com/rust-lang/rfcs/issues/2076
- [x] https://github.com/rust-lang/rfcs/issues/2077
- [x] https://github.com/rust-lang/rfcs/issues/2078
- [ ] https://github.com/rust-lang/rfcs/issues/2079

And further:

- [x] PR to `rust-lang/rfcs` to add LICENSE-MIT and LICENSE-APACHE files, talk about the licensing situation in the README, and edit the template to include the header: https://github.com/rust-lang/rfcs/pull/2075
- [x] Asking first time contributors who opened PRs before the PR above got merged to agree with the terms: https://github.com/rust-lang/rfcs/issues/2096
- [ ] PR to `rust-lang/rfcs` to signify the licensing change is complete. Doable once every (or almost every) contributor has signified consent with the licensing terms. Also, figure out what to do about the contributions by people who didn't give their consent: ~https://github.com/rust-lang/rfcs/pull/2193~
Repository: flutter
Issue: GestureRecognizers should bid when they win
Labels: c: new feature,framework,f: gestures,P2,team-framework,triaged-framework

Suppose you have two gesture detectors, A and B.
A accepts when you move X pixels.
B accepts when you move 2X pixels.
They are in the arena in the order B then A.
If you move 2X pixels, B accepts.
If you move 0.9X pixels then 1.1X pixels, B accepts.
If you move 1.9X pixels, A accepts.
If you move 0.9X pixels then 0.9X pixels, A accepts.
This means which one accepts depends on the device's touch event rate.

Unfortunately, another name for A would be HorizontalDragGestureRecognizer and another name for B would be ScaleGestureRecognizer.

We could address this by having the recognizers report how the number of pixels beyond the point where they would have won, when they accept. Then, after all the recognizers have had a chance, the lowest one actually wins.
Repository: flutter
Issue: Tap recognizer shouldn't give up when it goes beyond its slop if there's a defined rect for it
Labels: c: new feature,framework,f: gestures,P2,team-framework,triaged-framework

You should be able to slop around a big button without rejecting the tap recognizer.
Repository: rust
Issue: Tracking issue for RFC 1861: Extern types
Labels: A-FFI,T-lang,B-unstable,B-RFC-implemented,C-tracking-issue,F-extern_types,S-tracking-needs-summary

This is a tracking issue for [RFC 1861 "Extern types"](https://github.com/rust-lang/rfcs/blob/master/text/1861-extern-types.md).

**Steps:**

- [x] Implement the RFC (#44295)
- [ ] Adjust documentation ([see instructions on forge][doc-guide])
- [ ] Stabilization PR ([see instructions on forge][stabilization-guide])

[stabilization-guide]: https://forge.rust-lang.org/stabilization-guide.html
[doc-guide]: https://forge.rust-lang.org/stabilization-guide.html#updating-documentation

**Unresolved questions:**

- [ ] Rust does not support types that don't have dynamically computed alignment -- we need the alignment to compute the field offset in structs. `extern type` violates this basic assumption, causing pain, suffering, and ICEs all over the compiler. What is the principled fix for this?

- [ ] Should we allow generic lifetime and type parameters on extern types?
  If so, how do they effect the type in terms of variance?

- [x] [In std's source](https://github.com/rust-lang/rust/blob/164619a8cfe6d376d25bd3a6a9a5f2856c8de64d/src/libstd/os/raw.rs#L59-L64), it is mentioned that LLVM expects `i8*` for C's `void*`.
  We'd need to continue to hack this for the two `c_void`s in std and libc.
  But perhaps this should be done across-the-board for all extern types?
  Somebody should check what Clang does. Also see https://github.com/rust-lang/rust/issues/59095.
  RESOLVED because all pointer types are `ptr` now.

- [ ] How should this interact with unsized arguments? Currently it ICEs: https://github.com/rust-lang/rust/issues/115709
Repository: opencv
Issue: C++11: use _MSVC_LANG define for C++ features detection on MSVC
Labels: feature,priority: low,category: build/install

https://msdn.microsoft.com/en-us/library/b0084kay.aspx
Repository: three.js
Issue: Fade out shadows as one approaches the left/right/top/bottom/near/far clip planes
Labels: Enhancement

##### Description of the problem 

Right now when one has a shadow casting light there is a far plane and a near plane and shadows start and end abruptly at these planes.  I think it would be much nicer if we faded in the shadow and faded out the shadow when one approaches the clip plane.s  This way limited frustum shadows can be used in larger regions without nasty clip artifacts.  Fading out shadows often looks very natural.

I noticed this when playing the game Kingdoms and Castles ( http://store.steampowered.com/app/569480/Kingdoms_and_Castles/ ).  See how the shadow fades out at the top.  It allows this game to have high quality shadows in the regions right in front of the camera, but they fade out as you scroll the clouds away from the center.  This is very effective and also not jarring.  Should be relatively easy to implement:

![image](https://user-images.githubusercontent.com/588541/28588499-c4b104e2-7148-11e7-8f7d-bbd18106c4ec.png)


##### Three.js version

- [x] Dev
- [x] r85

##### Browser

- [x] All of them

##### OS

- [x] All of them
Repository: go
Issue: x/review/git-codereview: use rebase branch during rebase
Labels: Suggested

Currently git-codereview doesn't add the appropriate "[branch]" prefix to commit messages created or amended during a rebase because all it sees is the detached HEAD state. As a fall back, it could look for .git/rebase-merge/head-name, which contains the full ref name of the branch being rebased and find that branch's upstream.

For example, this happened in https://golang.org/cl/50875.

/cc @josharian
Repository: neovim
Issue: persistent undo: handle very long paths, avoid E828
Labels: enhancement,filesystem

So recently when going through my plugins and cleaning stuff up I found that I still have https://github.com/pixelastic/vim-undodir-tree installed. I thought neovim might have solved that problem and tested it out. But neovim still has this problem with deep directory structures (or just a really long filename).

I feel like this is something Neovim could add by default because I do not see a drawback to it right now. If there is a drawback which I am not aware of, please let me know.
Repository: flutter
Issue: Add isGoodDiagnosticsNode matcher to flutter_test
Labels: a: tests,c: new feature,framework,c: proposal,P2,team-framework,triaged-framework

Similar to existing hasAGoodToStringDeep but smarter now that there is structured DiagnosticsNode information.
For example, error if string or int properties are added without using IntProperty or StringProperty
Error on DiagnosticTreeStyle transitions that are not currently supported. E.g. no switching from sparse to dense without an intermediate DiagnosticsTreeStyle.transition node.
Repository: flutter
Issue: Flutter needs a way to collect device info (e.g. chrome's about:gpu)
Labels: c: new feature,tool,a: triage improvements,P2,team-tool,triaged-tool

Particularly about the graphics functionality of the device in question.  This would help us not only diagnose when graphics issues are going wrong, but also collect info from users in the field.

Chrome has something along this vein called "about:gpu".

Examples of things we should dump:
- Information about how the GrContext initialized (8888? sRGB, etc)
- Make and model of the GPU
- probably lots more i'm forgetting.

We would only do this if it were useful to folks like @chinmaygarde @jason-simmons and @brianosman
Repository: angular
Issue: routerLinkActive applies active class to null routerLink
Labels: type: bug/fix,effort1: hours,freq2: medium,area: router,state: confirmed,router: directives,P3

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre>

## Current behavior
When using routerLinkActive and the routerLink is null the active class is applied.  Even if using routerLinkActiveOptions to set exact to true.  

## Expected behavior
Null roots should not have the active class applied as there is no route to actually be active for

## Minimal reproduction of the problem with instructions
Set routerLink to null and add routerLinkActive with options exact to set to true.

See Plunker:  http://plnkr.co/edit/ZXycO0ld2uQRqwALYdDT?p=preview

## What is the motivation / use case for changing the behavior?
There was an issue reported that null routeLink should do nothing when clicked and this was fixed.  This is related to this issue - the two go hand in hand.  As currently the only way round this is to have two *ngIf to cater for null routes

## Environment

<pre><code>
Angular version: v4.3.1
@angular/cli: 1.2.1

Browser:
- [ X] Chrome (desktop) version XX
 
For Tooling issues:
- Node version: v8.1.4
- Platform:  Windows
Repository: neovim
Issue: Error with Python Provider: Invalid argument: Channel id must be a positive integer
Labels: provider,job-control,has:plan

I've found similar issues but not quite the same I have (and also no solution) so I decided to post it.

 - `nvim --version`
```
NVIM v0.2.0
Build type: Release
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -DNDEBUG -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -I/tmp/neovim-20170707-80027-1bg0wcx/neovim-0.2.0/build/config -I/tmp/neovim-20170707-80027-1bg0wcx/neovim-0.2.0/src -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/opt/gettext/include -I/usr/include -I/tmp/neovim-20170707-80027-1bg0wcx/neovim-0.2.0/build/src/nvim/auto -I/tmp/neovim-20170707-80027-1bg0wcx/neovim-0.2.0/build/include
Compiled by brew@Sierra-2.local

Optional features included (+) or not (-): +acl   +iconv    +jemalloc +tui      
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.2.0_1/share/nvim"

```
- Operating system/version: **macOS Sierra 10.12.5**
- Terminal name/version: **iTerm Build 3.1.20170619-nightly**
- `$TERM`: **xterm-256color**
- `pip2 show neovim`: 
```
Name: neovim
Version: 0.1.13
Summary: Python client to neovim
Home-page: http://github.com/neovim/python-client
Author: Thiago de Arruda
Author-email: tpadilha84@gmail.com
License: Apache
Location: /usr/local/lib/python2.7/site-packages
Requires: msgpack-python, trollius, greenlet
```
- `pip3 show neovim`:
```
Name: neovim
Version: 0.1.13
Summary: Python client to neovim
Home-page: http://github.com/neovim/python-client
Author: Thiago de Arruda
Author-email: tpadilha84@gmail.com
License: Apache
Location: /usr/local/lib/python3.6/site-packages
Requires: msgpack-python, greenlet
```

`:CheckHealth` reports nothing out of the ordinary

### Actual behaviour

Every time I open Neovim it outputs the following message. After that, everything works just fine.

```
function <SNR>54_InitializePythonBuiltin[23]..provider#python#Call[9]..remote#host#Require[10]..provider#pythonx#Require, line 15
Vim(if):E475: Invalid argument: Channel id must be a positive integer
Failed to load python host. You can try to see what happened by starting nvim with $NVIM_PYTHON_LOG_FILE set and opening the generated log file. Also, the host stderr is available in messages.
Press ENTER or type command to continue
```

### Expected behaviour

I expect Neovim to open without showing me something is wrong.

### Things I've tried

Removed and reinstalled `python`, `python3`, `neovim`. Installed either `neovim` stable and `neovim --HEAD` on homebrew. The error persists.

The error does not occur when I run `nvim -u NONE`
Repository: TypeScript
Issue: Eliminate non-generic functions
Labels: Suggestion,Needs Proposal

Every non-generic function can be expressed as generic function with a single type parameter corresponding to each argument. Explicit parameter type annotations simply correspond to `extends` constraints on the type parameters of the generic equivalent.

While the title of the issue is "eliminate non-generic functions", in practice this simply gets rid of all the syntax ceremony involved in declaring generic functions. A function declaration as follows:

```
function repeat(item, n: number) => Array(n).fill(item)
```

will be inferred as: `type F = <T1 extends any, T2 extends number>(item: T1, number: T2) => T1[]`, and the result of invoking it with `repeat("foo", 10)` is inferred as `string[]`, not `any[]`.