sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: neovim
Issue: swap file actions can't be typed with the current keymap
Labels: localization,ux,bug-vim


- `nvim --version`:
```
NVIM v0.2.1
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -I/tmp/neovim-20171109-46118-9kky38/neovim-0.2.1/build/config -I/tmp/neovim-20171109-46118-9kky38/neovim-0.2.1/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-20171109-46118-9kky38/neovim-0.2.1/build/src/nvim/auto -I/tmp/neovim-20171109-46118-9kky38/neovim-0.2.1/build/include
Kompilerad av brew@Sierra.local
```
- Vim (version: ) behaves differently? N/A
- Operating system/version: OSX
- Terminal name/version: fish/bash/zsh
- `$TERM`: screen-256color

### Steps to reproduce using `nvim -u NORC`

Open a file which is already open/has crashed and left the swap file.

### Actual behaviour
Neovim complains about a swap file already existing and gives some actions which can resolve it. Unfortunately, some of those keys can't be typed with my current keymap. I guess that vim detects that I use a Swedish keyboard and thus gives me options and instructions in Swedish (which is fine!) but I actually use a US keymap when writing code which means that `Å`/`å` on the physical keyboard is mapped to `[`. Thus I am not able to select this option without changing the keymap (which I have a shortcut for but it still rather inconvenient).

```
Växlingsfil "~/.local/share/nvim/swap/FILE_PATH" existerar redan!
                                                                                                                                                                                                                                                                              Växlingsfil "~/.local/share/nvim/swap//FILE_PATH" existerar redan!
[Ö]ppna skrivskyddad, (R)edigera ändå, (Å)terskapa, (A)vsluta, A(v)bryt:
```

### Expected behaviour

I'd like to not need to switch keymap to select options. Though wheter that is solved by only using ascii characters for options or by selecting the language for options from the keymaps I can't say.
Repository: rust
Issue: Negative impls of Auto Traits (OIBIT) don't take into account Trait Bounds
Labels: C-enhancement,A-specialization

The following code fails to compile:
```rust
trait Foo {}
auto trait FooAuto {}

impl<T> !FooAuto for T where T: Foo {}
fn test<T>(t: T) where T: FooAuto {}

fn main() {
    test(1i32);
}
```
It produces the following error.
```rust
error[E0277]: the trait bound `i32: FooAuto` is not satisfied
  --> src/main.rs:11:5
   |
10 |     test(1i32);
   |     ^^^^ the trait `FooAuto` is not implemented for `i32`
   |
   = note: required by `test`
```
([Playpen](https://play.rust-lang.org/?gist=e9beeee97ab1c4f561e6359d2541523f&version=nightly))

Even though I restrict the `!FooAuto` implementation to types implementing `Foo` (which there is none of), the rust compiler does not seem to take that restriction into account. Instead, it removes the `FooAuto` auto-implementation from every type.

If I remove the `!FooAuto` line, the code compiles just fine.

The same problems happens when I use `impl<T: Foo>` instead of `where T: Foo` ([Playpen](https://play.rust-lang.org/?gist=dce37d3ab4b77579bde848e9809105b5&version=nightly)).
Also using `impl FooAuto for .. {}` instead of  `auto trait FooAuto` results in the same problem ([Playpen](https://play.rust-lang.org/?gist=403fce7680cb1119bcb11ea4c1a7e209&version=nightly)).
Repository: TypeScript
Issue: "Variable is used before being assigned" even though it is assigned
Labels: Bug

<!-- BUGS: Please use this template. -->
<!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->
<!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  2.6.1

**Code**

```ts
type Patch<T> = {
  [P in keyof T]?: Patch<T[P]> | ((value: T[P]) => T[P])
}

function applyPatch<T extends object, K extends keyof T>(target: T, patch: Patch<T>): T {
  (Object.keys(patch) as K[]).forEach(key => {
    const patchValue = patch[key];
    target[key] = typeof patchValue == "object" && !Array.isArray(patchValue)
      ? applyPatch(target[key] || {}, patchValue)
      : typeof patchValue == "function" // Error: Variable 'patchValue' is used before being assigned.
        ? patchValue(target[key])
        : patchValue; // Error: Variable 'patchValue' is used before being assigned.
  });
  return target;
}
```

**Expected behavior:**
No error

**Actual behavior:**
> Error: Variable 'patchValue' is used before being assigned.

It goes away if I assert `patchValue` as non-null: 
```ts
const patchValue = patch[key]!
```
Repository: react
Issue: backspace fails to clear values on input type='email'
Labels: Type: Bug,Component: DOM

<!--
  Note: if the issue is about documentation or the website, please file it at:
  https://github.com/reactjs/reactjs.org/issues/new
-->

**Do you want to request a *feature* or report a *bug*?**
bug 

**What is the current behavior?**
email input doesn't control for whitespace // possible variation on [Issue 6368](https://github.com/facebook/react/issues/6368); however, 6368 shows up at 15.0.0 this bug shows up at 15.2

**If the current behavior is a bug, demo**

no bug in React 15.0.0
no bug in React 15.1.0
bug on React 15.2
[React~15 fiddle](https://jsfiddle.net/cburnett/79z43qxn/9/)

bug on React 16 
[React~16 fiddle](https://jsfiddle.net/cburnett/q1297t5w/2/)

**What is the expected behavior?**

When a user presses down the backspace key and holds it, all values in the input are removed, including the whitespaces  

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**

Works on 15.1.0
bug at >= 15.2.0 
testing on Chrome 63
MacOs Sierra 10.12
Repository: flutter
Issue: Incorrect handling of Unicode on Windows is causing failures in test_test.dart
Labels: tool,platform-windows,P3,team-tool,triaged-tool

Unicode that is solely used for formatting is not being handled correctly when read out of `stderr` or `stdout` from the `ProcessResult`, likely due to how the VM decides whether or not to worry about fixing Unicode issues on Windows.

Related dart-sdk issue [here](https://github.com/dart-lang/sdk/issues/28871).
Repository: go
Issue: doc: mention "purego" build tag convention somewhere
Labels: Documentation,Proposal,Proposal-Accepted

As the number of Go implementations continues to increase, the number of cases where the `unsafe` package is unlikely to work properly also rises. Currently, there is `appengine`, `gopherjs`, and possibly `wasm` where pointer arithmetic is not allowed. 

Currently, protobuf and other packages special cases [build tags for `appengine` and `js`](https://github.com/golang/protobuf/blob/e51d002/proto/pointer_unsafe.go#L32) and may need to add others in the near future. It does not scale very well to blacklist specific known Go implementations where unsafe does not work.

My proposal is to document `safe` as a community agreed upon tag meaning that `unsafe` should not be used. It is conceivable that this concept be extended to the compiler rejecting programs that use `unsafe` when the `safe` tag is set, but I'm currently more interested as a library owner in knowing whether to avoid `unsafe` in my own packages.

\cc @zombiezen @dneil @neelance @shurcooL
Repository: pytorch
Issue: single-gpu works but multi-gpu hangs
Labels: module: cudnn,triaged,module: data parallel

My machine has 4 titanXP, CUDA9.0, CuDNN 7.5, Ubuntu 16.04

When I run an image classification task with single GPU, it runs just fine. But it hangs at the line
model = nn.DataParallel(model) when I try to run with 2 or more GPUs. 

I ran p2pBandwidthLatencyTest and got the following report:
P2P (Peer-to-Peer) GPU Bandwidth Latency Test]
Device: 0, TITAN Xp, pciBusID: 3b, pciDeviceID: 0, pciDomainID:0
Device: 1, TITAN Xp, pciBusID: 5e, pciDeviceID: 0, pciDomainID:0
Device: 2, TITAN Xp, pciBusID: af, pciDeviceID: 0, pciDomainID:0
Device: 3, TITAN Xp, pciBusID: d8, pciDeviceID: 0, pciDomainID:0
Device=0 CAN Access Peer Device=1
Device=0 CAN Access Peer Device=2
Device=0 CAN Access Peer Device=3
Device=1 CAN Access Peer Device=0
Device=1 CAN Access Peer Device=2
Device=1 CAN Access Peer Device=3
Device=2 CAN Access Peer Device=0
Device=2 CAN Access Peer Device=1
Device=2 CAN Access Peer Device=3
Device=3 CAN Access Peer Device=0
Device=3 CAN Access Peer Device=1
Device=3 CAN Access Peer Device=2

***NOTE: In case a device doesn't have P2P access to other one, it falls back to normal memcopy procedure.
So you can see lesser Bandwidth (GB/s) in those cases.

P2P Connectivity Matrix
     D\D     0     1     2     3
     0	     1     1     1     1
     1	     1     1     1     1
     2	     1     1     1     1
     3	     1     1     1     1
Unidirectional P2P=Disabled Bandwidth Matrix (GB/s)
   D\D     0      1      2      3 
     0 423.18  11.44  11.37  11.36 
     1  11.42 426.77  11.41  11.36 
     2  11.38  11.38 425.52  11.34 
     3  11.36  11.40  11.31 427.77 
Unidirectional P2P=Enabled Bandwidth Matrix (GB/s)
   D\D     0      1      2      3 
     0 426.11   7.59   8.38   6.35 
     1  10.19 426.39   8.36   9.08 
     2   8.39   9.08 426.03  10.16 
     3   8.39   9.09  10.14 427.85 
Bidirectional P2P=Disabled Bandwidth Matrix (GB/s)
   D\D     0      1      2      3 
     0 426.50  19.49  18.98  19.07 
     1  19.87 430.72  20.02  19.93 
     2  17.91  19.95 429.49  18.79 
     3  19.98  19.92  18.81 429.73 
Bidirectional P2P=Enabled Bandwidth Matrix (GB/s)
   D\D     0      1      2      3 
     0 423.94  15.74  14.40  16.00 
     1  20.26 429.07  16.00  17.32 
     2  16.07  16.02 429.69  20.23 
     3  16.01  17.32  20.26 428.26 
P2P=Disabled Latency Matrix (us)
   D\D     0      1      2      3 
     0   9.90  17.02  14.31  14.31 
     1  14.02   5.55  14.59  14.53 
     2  14.50  14.48   5.82  14.31 
     3  14.85  14.40  14.57   5.80 
P2P=Enabled Latency Matrix (us)
   D\D     0      1      2      3 
     0  11.51  11.45   8.36   8.82 
     1   8.86   5.54   9.07   8.38 
     2   8.76   9.11   5.76   9.12 
     3   8.80   8.80   9.08   5.78 

which seemed fine to me. 

Can anyone please help me out? Thanks!

cc @csarofeen @ptrblck
Repository: pytorch
Issue: Feature request: sparse matrix max(axis)
Labels: module: sparse,triaged,enhancement

The current sparse support is pretty nice!  However, there are some important of collation operations that can not be efficiently be composed out of matmul or operations on _values().  One that is in the way of my current work is axis-wise max.  Ideally:

```
vec = sparsemat.max(axis=None, zero=0)
```

Where an optional zero argument could be used to specify the interpretation of unstored matrix entries.  (E.g., could pass -Infinity if that is the intent.)  In my application, I am using a sparse matrix to store only the significant log probabilities in a grid, and max() with a -Infinity default is the key operation needed to implement a stable row-wise logsumexp().)

For reference: scipy.sparse's inclusion of max is here, although they miss the need for a zero override.
https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.coo_matrix.max.html#scipy.sparse.csr_matrix.max

cc @vincentqb
Repository: vscode
Issue: Tasks with target = TaskScope.Global as the scope do not show up in task picker UI
Labels: bug,tasks

- VSCode Version: Code 1.18.1 (929bacba01ef658b873545e26034d1a8067445e9, 2017-11-16T18:23:26.125Z)
- OS Version: Darwin x64 17.3.0
- Extensions: 

Extension|Author (truncated)|Version
---|---|---
code-runner|for|0.8.4
cpptools|ms-|0.14.2
Ruby|reb|0.15.0



---

Steps to Reproduce:

1. Create a vscode.Task using the new API passing vscode.TaskScope.Global as the target

Reproduces without extensions: Yes

I am developing an extension that provides tasks for each folder in a multiroot project and a few tasks that are applicable to all folders. Maybe I am missing something but the tasks that have TaskScope.Global as the target do not show up in the task picker UI. Is this behavior intentional?
Repository: TypeScript
Issue: Handle JSDoc @param with hyphen
Labels: Suggestion,VS Code Tracked,Domain: JSDoc,Experience Enhancement

**TypeScript Version:**  2.7.0-dev.20171214

**Code**

```ts
/**
 * @param x - Bla
 */
function foo(x) { }
```

Hover over `x`

**Expected behavior:**
Hyphen is ignored in any documentation returned. See JSDoc @param spec: http://usejsdoc.org/tags-param.html

**Actual behavior:**
Hyphen is returned as part of documentation:

```
[Trace  - 2:58:07 PM] Response received: quickinfo (144). Request took 3 ms. Success: true 
Result: {
    "kind": "parameter",
    "kindModifiers": "",
    "start": {
        "line": 4,
        "offset": 14
    },
    "end": {
        "line": 4,
        "offset": 15
    },
    "displayString": "(parameter) x: any",
    "documentation": "- Bla",
    "tags": []
}
```
Repository: angular
Issue: updateValueAndValidity in valueChanges breaks model under certain circumstances
Labels: type: bug/fix,freq1: low,area: forms,state: confirmed,forms: Controls API,P4

<!--
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. -->
When disabling a FormGroup where a valueChanges subscriber of one control calls updateValueAndValidity on another control the aggregate value of the FormGroup breaks.

## Expected behavior
<!-- Describe what the desired behavior would be. -->
The value should stay the same as it is not changed by disabling the FormGroup.


## 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://plnkr.co/edit/hC0YcE

The two input fields are correctly represented by the model {"a": "", "b": ""}. Click Disable. The model erroneously gets set to {}. Clicking Disable again recovers the model.

Using formGroup.disable({emitEvent: false}) circumvents the issue if #12366 is circumvented/fixed.

## What is the motivation / use case for changing the behavior?

I want to update validators of field b based on the value of field a. After that updateValueAndValidaty() needs to be called. For styling and other reasons using a FormGroup validator instead is not a feasible solution.


## Environment

<pre><code>
Angular version: 5.1.1 (plunkr)
<!-- Check whether this is still an issue in the most recent Angular version -->

Browser:
- [X] Chromium (desktop) version 63.0.3239.108
</code></pre>
Repository: nvm
Issue: Custom node installation location in .nvmrc
Labels: feature requests

Feature request:
Could nvmrc point to a local path where a custom node version is installed? When nvm would be run it would simply witch the path to that location.

This would be useful when using https://github.com/eirslett/frontend-maven-plugin which downloads and installs a version of node as specified in maven's pom.xml.
Repository: react
Issue: Stop syncing value attribute for controlled inputs
Labels: Component: DOM,Type: Discussion,Type: Breaking Change

Opening this as a follow up to some quick discussions in https://github.com/facebook/react/issues/11881. Syncing the `value` attribute has been a consistent source of bugs for us, and the benefits of doing so seem minimal. There's some previous discussion on the topic in https://github.com/facebook/react/pull/7359 and in other issues, I can't remember right now 😄 

This would be a breaking change, so it would have to be done in a major release. 

## Reasons to keep syncing

* It prevents `form.reset()` from putting controlled form inputs into a weird state
* Some browser extensions (not sure which) read from the `value` attribute in some cases (not sure which)
* It can be useful for querying inputs with a specific value using an attribute selector

## Reasons to stop syncing

* It will reduce the complexity of `react-dom` in a non-trivial way
* In turn, it will likely reduce bundle size as well
* We remove a whole class of bugs (fighting with browsers that want to be helpful about input values)
* Syncing the input value to the attribute potentially exposes sensitive data to third party tools ([1](https://www.reddit.com/r/analytics/comments/7ukw4n/mixpanel_js_library_has_been_harvesting_passwords/))

______

What do we think? Are these reasons good enough to keep syncing the `value` attribute? Are there other more critical reasons we should keep doing so?


cc @nhunzaker @jquense @gaearon
Repository: go
Issue: proposal: x/crypto/acme/autocert: Manager should support DNS-01 verification
Labels: Proposal,Proposal-Crypto


### What did you do?
I've tried to setup autocert behind a firewall.


### What did you expect to see?
https working flawlessly (using letsencrypt infrastructure)

### What did you see instead?
Verification failed due the firewall. 

I believe dns-01 should be built into [Manager](https://godoc.org/golang.org/x/crypto/acme/autocert#Manager). It could have a function (i.e. SetTXT) field which if mutated is used by the Manager to set the TXT records required for the DNS verification.
Repository: go
Issue: sync: Pool example suggests incorrect usage
Labels: Documentation,help wanted,NeedsFix,compiler/runtime

The operation of `sync.Pool` assumes that the memory cost of each element is approximately the same in order to be efficient. This property can be seen by the fact that `Pool.Get` returns you a random element, and not the one that has "the greatest capacity" or what not. In other words, from the perspective of the `Pool`, all elements are more or less the same.

However, [the `Pool` example](https://go-review.googlesource.com/24371) stores `bytes.Buffer` objects, which have an underlying `[]byte` of varying capacity depending on how much of the buffer is actually used.

Dynamically growing an unbounded buffers can cause a large amount of memory to be pinned and never be freed in a live-lock situation. Consider the following:
```go
pool := sync.Pool{New: func() interface{} { return new(bytes.Buffer) }}

processRequest := func(size int) {
	b := pool.Get().(*bytes.Buffer)
	time.Sleep(500 * time.Millisecond) // Simulate processing time
	b.Grow(size)
	pool.Put(b)
	time.Sleep(1 * time.Millisecond) // Simulate idle time
}

// Simulate a set of initial large writes.
for i := 0; i < 10; i++ {
	go func() {
		processRequest(1 << 28) // 256MiB
	}()
}

time.Sleep(time.Second) // Let the initial set finish

// Simulate an un-ending series of small writes.
for i := 0; i < 10; i++ {
	go func() {
		for {
			processRequest(1 << 10) // 1KiB
		}
	}()
}

// Continually run a GC and track the allocated bytes.
var stats runtime.MemStats
for i := 0; ; i++ {
	runtime.ReadMemStats(&stats)
	fmt.Printf("Cycle %d: %dB\n", i, stats.Alloc)
	time.Sleep(time.Second)
	runtime.GC()
}
```
Depending on timing, the above snippet takes around 35 GC cycles for the initial set of large requests (2.5GiB) to finally be freed, even though each of the subsequent writes only use around 1KiB. This can happen in a real server handling lots of small requests, where large buffers allocated by some prior request end up being pinned for a long time since they are not in `Pool` long enough to be collected.

The example claims to be based on `fmt` usage, but I'm not convinced that `fmt`'s usage is correct. It is susceptible to the live-lock problem described above. I suspect this hasn't been an issue in most real programs since `fmt.PrintX` is typically not used to write very large strings. However, other applications of `sync.Pool` may certainly have this issue.

I suggest we fix the example to store elements of fixed size and document this.

\cc @kevinburke @LMMilewski @bcmills
Repository: rust
Issue: Can't specialize `Drop`
Labels: C-enhancement,T-compiler,A-specialization,F-specialization

The `Drop` trait has checks to ensure that the `impl` can't add new restrictions on generic parameters.

```rust
struct S<T> { ... }
impl<T: Foo> Drop for S<T> { ... }
```

The above won't compile (as intended?), as the `S` would have a Drop that's conditional based on the type parameter.

However with specialization we could have something like:

```rust
struct S<T> { ... }
default impl<T> Drop for S<T> { ... }
impl <T: Foo> Drop S<T> { ... }
```

Both of these examples yield the same error

```
error[E0367]: The requirement `T: Foo` is added only by the Drop impl.
```

My first instinct was that this had something to do with the type information getting lost on destructors, but that doesn't seem to be the case as the issue can be worked around by specializing a different trait, to which `drop` delegates to:

```rust
struct S<T> { ... }

// Specialized Drop implementation.
trait SpecialDrop { fn drop( &mut self ); }
default impl<T> SpecialDrop for S<T> { ... }
impl<T: Foo> SpecialDrop for S<T> { ... }

// Drop delegates to SpecialDrop.
impl<T> Drop S<T> { fn drop(&mut self) {
    (self as &mut SpecialDrop).drop()
}
```

Linking to #31844
Repository: vscode
Issue: [json] suggest used values when property name has already been used
Labels: feature-request,json

<!-- Do you have a question? Please ask it on http://stackoverflow.com/questions/tagged/vscode. -->

<!-- Use Help > Report Issues to prefill these. -->
- VSCode Version: 1.19.0 and 1.19.1
- OS Version: Windows 10 Home 64 bit

Steps to Reproduce:

vscode used to show autocomplete option for words that existed int the file. I use vscode for keep track of my notes. I keep my plain texts (*.txt) with language mode html. Same thing is happening in JSON files.
I write a property (e.g. BusNumber) and when I try to retype the property it doesn't show up in autocomplte dropdown when I am typing in JSON and I have to retype the whole property again. It used to show up as soon as I started typing two letters. In plain text if an word existed in the file it used to come as an option for autocomplete now it is not. 

I use vscodevim and Prettify JSON. Even after disabling those I am having the issue.

<!-- Launch with `code --disable-extensions` to check. -->
Reproduces without extensions: Yes
Repository: go
Issue: cmd/compile: validity of program depends on method declaration order
Labels: compiler/runtime

https://play.golang.org/p/WCktUidLyc_3 is accepted while the equivalent program https://play.golang.org/p/Z-B9rBhYILd fails with an error. The only difference is the order of the method declarations.

Esoteric case; recording this so we're aware of it.