sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: neovim
Issue: pty: add options to control input buffering and echo
Labels: enhancement,terminal,channels-rpc,system

```vim
function! F(...) dict
  echom string(a:000).', '.string(self)
  echom string(s:opts)
endfunction

let opts = {}
let opts.stdout_buffered = 1
let opts.stderr_buffered = 1
let opts.on_exit = function('F')
" let opts.on_stdout = function('F')
" let opts.on_stderr = function('F')
let opts.pty = 1

let s:opts = opts

let job = jobstart(['cat', '/dev/stdin'], opts)
" let job = jobstart(['echo', '/dev/stdin'], s:opts)
call jobsend(job, ['foo'])
call jobclose(job, 'stdin')
```

Running this with `nvim -u t-dev-stdin-buffered.vim` will cause the job to not being closed/stopped.

The log says:

> INFO  2018-10-11T15:56:16.756 28066 channel_create_event:208: new channel 3 (…/t-dev-stdin-buffered.vim:16) : {"id": 3, "mode": "bytes", "stream": "job", "pty": "/dev/pts/25"}
> INFO  2018-10-11T15:56:16.824 28066 main:590: starting main loop

Calling `jobstop(job)` then says:
> INFO  2018-10-11T15:56:57.007 28066 on_process_exit:385: exited: pid=28067 status=1 stoptime=0

NVIM v0.3.2-671-g384770556
Repository: godot
Issue: ScrollContainer scroll_started and scroll_ended signals aren't emitted
Labels: bug,confirmed,topic:gui

Bug?

**Godot version:**
3.0.6 stable

**OS/device including version:**
Windows 7 pro / Linux Mint 19

**Issue description:**
Signals "scroll_started()" and "scroll_ended()" never fired

**Steps to reproduce:**
Create Scene with ScrollContainer
Create Panel inside ScrollContainer (min_size > ScrollContainer)
Link Signals (printing out to console)
-> When scrolling with mouse or touch signals are never received
Repository: go
Issue: cmd/go: list prints leading underscore when given testdata directories
Labels: NeedsInvestigation,GoCommand

### What version of Go are you using (`go version`)?

    go version devel +c96c2a39bb Thu Oct 11 04:45:18 2018 +0000 linux/amd64

### Does this issue reproduce with the latest release?

Yes - checked on 1.11.1.

### What operating system and processor architecture are you using (`go env`)?

```
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/mvdan/go/cache"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/mvdan/go/land:/home/mvdan/go"
GOPROXY=""
GORACE=""
GOROOT="/home/mvdan/tip"
GOTMPDIR=""
GOTOOLDIR="/home/mvdan/tip/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build430264220=/tmp/go-build -gno-record-gcc-switches"
```

### What did you do?

Run `go list ./testdata` both in GOPATH and module mode.

Copy and paste this into a shell:

```
GOPATH=$(mktemp -d)
mkdir -p $GOPATH/src/foo.com/bar
cd $GOPATH/src/foo.com/bar
mkdir testdata
echo 'package foo' >testdata/foo.go
go list ./testdata
export GO111MODULE=on
go mod init foo.com/bar
go list ./testdata
```

### What did you expect to see?

The same result in both cases.

### What did you see instead?

```
$ GOPATH=$(mktemp -d)
$ mkdir -p $GOPATH/src/foo.com/bar
$ cd $GOPATH/src/foo.com/bar
$ mkdir testdata
$ echo 'package foo' >testdata/foo.go
$ go list ./testdata
_/tmp/tmp.rr2RmmLENC/src/foo.com/bar/testdata
$ export GO111MODULE=on
$ go mod init foo.com/bar
go: creating new go.mod: module foo.com/bar
$ go list ./testdata
foo.com/bar/testdata
```

Note that this only happens with testdata directories containing Go files. It doesn't happen with other directories that shouldn't be importable packages, like `_foo`.

First, I'm confused by the weird `_/$GOPATH/src/$IMPORT_PATH` string, when I was expecting just the import path. I couldn't find any piece of documentation about this format.

Second, I'm even more confused as to why this behaves differently depending on whether we're in GOPATH or module-aware mode.

This bug report is the result of digging a bit after the tests on a linter of mine were failing on 1.10. This was because `go/types.Type.String()` was returning `mvdan.cc/unparam/check/testdata.FooType` on Go 1.11 with `GO111MODULE=on`, but `_/home/travis/gopath/src/mvdan.cc/unparam/check/testdata.FooType` on Go 1.10 with `GO111MODULE=on` (since the env var is ignored there).

/cc @bcmills (and thanks to @rogpeppe and @myitcv, who helped me investigate)
Repository: flutter
Issue: Is the logical pixel size 150 ppi instead of 96 ppi?
Labels: framework,engine,d: api docs,P2,team-engine,triaged-engine

On https://docs.flutter.io/flutter/dart-ui/Window/devicePixelRatio.html it is mentioned that there are typically 96 logical pixels per inch.  But in practice I see about 150 logical pixels per inch.  For example, a Galaxy Tab A `MediaQuery` returns 1280x800 (physically it is 1920x1200, the `devicePixelRatio` is reported correctly at 1.5).  Its longest side is about 8.5" with 1280 logical pixels.  Also, drawing fixed size boxes show the same pixel ratios.  The Nexus 10 tablet has similar logical figures (`devicePixelRatio` is there 2.0, which is correct).

Is the above referred documentation wrong?
Repository: vscode
Issue: `extensions/extension-editing/src/extensionLinter.ts` does not respect `repository` shorthand in package.json
Labels: bug,extensions-development

VS Code warns about non-https relative image links in markdown files, with this message:

> Relative image URLs require a repository with HTTPS protocol to be specified in the package.json.

If I update package.json to include a repository with an HTTPS URL, this warning goes away:

```json
"repository": {
    "type": "git",
    "url": "https://github.com/user/repo"
}
```

However, there are [other ways](https://docs.npmjs.com/files/package.json#repository) to specify a repository url. For example:

    "repository": "github:user/repo"

In this case, the "repository" link will point to https://github.com/user/repo. But the extension-linter does not detect this case, and still shows the warning.




<!-- Please search existing issues to avoid creating duplicates. --> 
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: 1.28.0 (user setup)
- OS Version: Windows 10

Steps to Reproduce:

1. Create a new GitHub project, and add a new VS Code extension to the repository.
2. In `package.json`, specify the `repository` as `"repository": "github:user/repo"`.
3. In `README.md`, reference an image by its relative path.
4. Open out the "problems" tab in VS Code.

Expected: No problems are reported.
Actual: `extension-linter` reports the warning `Relative image URLs require a repository with HTTPS protocol to be specified in the package.json.`

5. Change the `repository` property's value to:

```json
"repository": {
    "type": "git",
    "url": "https://github.com/user/repo"
}
```

Expected: No problems are reported.
Actual: Behaves as expected (no problems are reported).


<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: **Yes**/No
Repository: vscode
Issue: [folding] show folding actions at the end of folding range as well
Labels: feature-request,editor-folding

This is for C# but may affect others I'm not sure:
Having a large complex code block and wanting to fold it requires always scrolling to the top of the region to collapse it.  There should be an identical folding icon that allows to fold from the bottom of the region.
Repository: go
Issue: x/crypto/acme/autocert: Expose Subject Alternative Names in manager.GetCertificate
Labels: NeedsInvestigation,FeatureRequest

Please answer these questions before submitting your issue. Thanks!

### What version of Go are you using (`go version`)?
1.11.1

### Does this issue reproduce with the latest release?
Yes

### What operating system and processor architecture are you using (`go env`)?
darwin,amd64

autocert has a `certRequest` method which can take Subject Alternative Names as input [here](https://github.com/golang/crypto/blob/master/acme/autocert/autocert.go#L1027), but the Manager does not expose a way to pass these values through `GetCertificate` or otherwise. In theory, `manager.ExtraExtensions` could enable this but it would require creating a new manager instance for every request which doesn't seem right. Is there another way to use autocert to generate certificates with SANs?
Repository: pytorch
Issue: [feature request] `ignore_label` argument in Caffe2 `SoftmaxWithLoss`
Labels: caffe2

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->
Similar to the Pytorch implementation of [crossentropyloss](https://pytorch.org/docs/stable/nn.html#crossentropyloss), it'd be nice to have an `ignore_index` or `ignore_label` argument in the Caffe2 [SoftmaxWithLoss](https://github.com/pytorch/pytorch/blob/a4120fa132849028d2c84dee684b3dda1ef4e8b2/caffe2/operators/softmax_with_loss_op.cc#L134) or [softmax_ops.cu](https://github.com/pytorch/pytorch/blob/7035975508ed053b5f1ac08b96ac6d6b2bbb954e/caffe2/operators/softmax_ops.cu#L13).

## Motivation
In practice, I often experience the need to include additional loss terms (e.g. additional classification losses) that are applicable to some classes but not others. For example, say that I would like to predict gender for only the `person` class, but would like to ignore the `gender` classification for other classes. I could simply set the gender `ignore_label = -1` for classes that don't apply. I'm currently finding it difficult to do this in Caffe2. 

<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->

## Pitch

<!-- A clear and concise description of what you want to happen. -->

## Alternatives

<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->

## Additional context

<!-- Add any other context or screenshots about the feature request here. -->
I suppose the cuda implementation in [softmax_ops.cu](https://github.com/pytorch/pytorch/blob/7035975508ed053b5f1ac08b96ac6d6b2bbb954e/caffe2/operators/softmax_ops.cu#L13) would look something like this:
```
#define DONTCARE (-1)
__global__ void LabelCrossEntropyKernel(
    const int N,
    const int D,
    const float* logPdata,
    const int* labeldata,
    const float* weights,
    float* Ydata) {
  CUDA_1D_KERNEL_LOOP(i, N) {
    const int label = static_cast<int>(labeldata[i]);
    if (label != DONTCARE) {
      CUDA_KERNEL_ASSERT(label >= 0 && label < D);
      float weight = weights ? weights[i] : 1.0;
      Ydata[i] = -logPdata[i * D + label] * weight;
    }
    else {
      Ydata[i] = 0;
    }
  }
}

__global__ void LabelCrossEntropyGradientKernel(
    const int N,
    const int D,
    const float* Pdata,
    const int* labeldata,
    float* dXdata) {
  CUDA_1D_KERNEL_LOOP(i, N) {
    const int label = static_cast<int>(labeldata[i]);
    if (label != DONTCARE) {
      int idx = i * D + label;
      dXdata[idx] = Pdata[idx] - 1.;
    }
    else {
      for (int j=0; j<D; j++){
        int idx = i * D + j;
        dXdata[idx] = 0.0;
      }
    }
  }
}

```
Repository: angular
Issue: data- prefix gets stripped from bindings such as <div data-id="{{1}}">
Labels: type: bug/fix,breaking changes,freq1: low,area: core,state: confirmed,core: basic template syntax,core: binding & interpolation,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 -->
[ ] Performance issue
[ ] 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
[x] Other... Please describe: embarrassment
</code></pre>

## Current behavior

```html
<button [attr.data-id]="'btn-' + type">action 1</button>

<button data-id="btn-{{type}}">action 2</button>
```

![image](https://user-images.githubusercontent.com/12021443/46830994-d070fc00-cdaa-11e8-9260-d59c6b138b42.png)


## Expected behavior
<!-- Describe what the desired behavior would be. -->

There must be the same behavior


## Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/angular-w2nsvr?file=src/app/app.component.html

## Environment

<pre><code>
Angular version: 6
Repository: rust
Issue: Can't cast `self as &Trait` in trait default method
Labels: C-enhancement,A-trait-system,T-compiler

```rust
trait Blah {
    fn test(&self) {
        self as &Blah;
    }
}
```
```
error[E0277]: the size for values of type `Self` cannot be known at compilation time
 --> src/lib.rs:3:9
  |
3 |         self as &Blah;
  |         ^^^^ doesn't have a size known at compile-time
  |
  = help: the trait `std::marker::Sized` is not implemented for `Self`
  = note: to learn more, visit <https://doc.rust-lang.org/book/second-edition/ch19-04-advanced-types.html#dynamically-sized-types-and-sized>
  = help: consider adding a `where Self: std::marker::Sized` bound
  = note: required for the cast to the object type `dyn Blah`
```
[(playground)](https://play.rust-lang.org/?gist=68b51b8defb6bddf8d1c0b6ec1eafa2d&version=stable&mode=debug&edition=2015)

Well, `self` is usually a thin pointer, tho it may be a fat pointer if eg it's a slice. However `Self` is concrete. `Self` may not be sized, but `&Self` certainly is. `mem::size_of` is a const fn, so [this code](https://play.rust-lang.org/?gist=ba7372f0d844c49ea3f4b338180f67d3&version=stable&mode=debug&edition=2015) proves that the size is known at compile time! Well, it maybe a matter of precisely when in the compile time. Anyways, that code should totally compile.

## Workaround 1
```rust
trait Blah {
    fn as_blah(&self) -> &Blah;
    …
}
```

## Workaround 2
```rust
trait Blah {
    fn test(&self, this: &Blah) {
        …
    }
}
```

## Workaround 3
Manually construct the reference, somehow.
Repository: rust
Issue: Add filtering to `rustc_on_unimplemented` to avoid misleading suggestion
Labels: C-enhancement,A-diagnostics,T-compiler,F-on_unimplemented

After #54946, the code `let x = [0..10]; for _ in x {}` will cause the following output:

```
error[E0277]: `[std::ops::Range<{integer}>; 1]` is not an iterator
  --> $DIR/array-of-ranges.rs:11:14
   |
LL |     for _ in array_of_range {}
   |              ^^^^^^^^^^^^^^ if you meant to iterate between two values, remove the square brackets
   |
   = help: the trait `std::iter::Iterator` is not implemented for `[std::ops::Range<{integer}>; 1]`
   = note: `[start..end]` is an array of one `Range`; you might have meant to have a `Range` without the brackets: `start..end`
   = note: required by `std::iter::IntoIterator::into_iter`
```

Add a way to identify this case to `rustc_on_unimplemented`, in order to avoid giving this misleading/incorrect diagnostic.
Repository: terminal
Issue: WINDOW_BUFFER_SIZE_EVENT generated during window scrolling
Labels: Work-Item,Issue-Feature,Product-Conhost,Area-Server

Windows Version 10.0.17763.1

> [SetConsoleWindowInfo](https://docs.microsoft.com/en-us/windows/console/setconsolewindowinfo) can be used to scroll the contents of the console screen buffer by shifting the position of the window rectangle without changing its size.

Starting from Windows 10 1709 (FCU) such scrolling generates a WINDOW_BUFFER_SIZE_EVENT **even though the console buffer size remains unchanged**.

This breaks our application behaviour and does not make sense for the following reasons:
- The [documentation](https://docs.microsoft.com/en-us/windows/console/window-buffer-size-record-str) explicitly says that WINDOW_BUFFER_SIZE_RECORD "describes *a change in the size* of the console screen buffer", but there's no change in this case.
- The event is generated only if the contents of the console screen buffer is scrolled via SetConsoleWindowInfo API, but it's useless - the application already knows that the console is being scrolled because the scrolling is initiated by the application itself.
- event is **not** generated when the user moves the scrollbar manually, so the application does not know that the console it being scrolled in that case.
- It does not happen in Legacy mode and never happened before for 20+ years.

A minimal project to reproduce the issue attached.
[BufferSizeEventBug.zip](https://github.com/Microsoft/console/files/2470845/BufferSizeEventBug.zip)
Repository: vscode
Issue: Can't Install local user update due to `\\bin` folder being used by another process
Labels: bug,install-update,windows

![image](https://user-images.githubusercontent.com/5226627/46836711-84509800-cd67-11e8-9095-2c3201c094db.png)

> There was an error while deleting a directory: `%LOCALAPPDATA%\Programs\Microsoft VS Code\bin`: the process cannot access the file because it is being used by another process…

- VSCode Version: 1.2.7.2 (user setup)
- OS Version: Windows 10

## Steps to Reproduce:

1. when an update is available, click **Install Update**

**Does this issue occur when all extensions are disabled?:** cannot try this because installation is disabled/destroyed due to incomplete setup

**Workaround:** will go back to system installs instead of [local user installs](https://code.visualstudio.com/updates/v1_26#_user-setup-for-windows).
Repository: TypeScript
Issue: Suggestion diagnostics show in untyped JS code when regular diagnostics don't
Labels: Suggestion,In Discussion,Domain: Error Messages,Domain: TSServer

**TypeScript Version:** 3.2.0-dev.20181011

**Code**

```ts
"".toUperKase();
const b = require("./b");
```

**Expected behavior:**

If we're not showing regular diagnostics, we should probably not show any suggestions either.

**Actual behavior:**

`"".toUperKase()` is fine. `require` is a real problem that we need to let the user know about right away!

![uperkase](https://user-images.githubusercontent.com/19274678/46839228-b6ff8e00-cd71-11e8-914b-ca0165d713a7.jpg)
Repository: opencv
Issue: Poor precision on RGB to L*a*b* color conversion
Labels: category: imgproc,priority: low

The precision and numerical stability of RGB to L\*a\*b\* color space conversions (and back) is poor when the pixel luminance values are low. For example:

    import cv2
    import numpy as np

    rgbimg = np.array([[[0.001, 0.001, 0.001]]], np.float32)
    print rgbimg                                       # Outputs [[[0.001 0.001 0.001]]]
    labimg = cv2.cvtColor(rgbimg, cv2.COLOR_RGB2LAB)
    print labimg                                       # Outputs [[[0. 0. 0.]]]
    rgbimg = cv2.cvtColor(labimg, cv2.COLOR_LAB2RGB)
    print rgbimg                                       # Outputs [[[0. 0. 0.]]]

    rgbimg = np.array([[[1, 1, 1]]], np.uint8)
    print rgbimg                                       # Outputs [[[1 1 1]]]
    labimg = cv2.cvtColor(rgbimg, cv2.COLOR_RGB2LAB)
    print labimg                                       # Outputs [[[  1 128 128]]]
    rgbimg = cv2.cvtColor(labimg, cv2.COLOR_LAB2RGB)
    print rgbimg                                       # Outputs [[[2 2 2]]]

Other image processing libraries maintain much better precision in these conversions.
Repository: tensorflow
Issue: Feature Request: GPUOptions for Go binding
Labels: stat:contribution welcome,type:feature,good first issue

Current implementation of Go binding can not specify options.

GPUOptions struct is in internal package. And `go generate` doesn't work for protobuf directory. So we can't specify GPUOptions for `NewSession`.
Repository: node
Issue: Warn on potentially insecure inspector options (--inspect=0.0.0.0)
Labels: help wanted,doc,security,inspector

Extracted from #21774.

Inspector by default is bound to 127.0.0.1, but suggestion to launch it with `--inspect=0.0.0.0` is highly copy-pasted without proper understanding what it does.  I've observed that personally in chats, also see [google](https://www.google.ca/search?q="--inspect%3D0.0.0.0").

Binding inspector to 0.0.0.0 (in fact, to anything but the loopback interface ip) allows RCE, which could be catastrophic in cases where the IP is public. The users should be informed of that.

A warning printed to the console (with corresponding documentation change) should at least somewhat mitigate this.

Note: the doc change and the c++ change can come separately.
Repository: puppeteer
Issue: When I try to print `msg.text` in 'console' event with type 'error', I got `JSHandle@error`
Labels: feature,chromium,confirmed

<!--
STEP 1: Are you in the right place?

- For general technical questions or "how to" guidance, please search StackOverflow for questions tagged "puppeteer" or create a new post.

https://stackoverflow.com/questions/tagged/puppeteer

- For issues or feature requests related to the DevTools Protocol (https://chromedevtools.github.io/devtools-protocol/), file an issue there:

https://github.com/ChromeDevTools/devtools-protocol/issues/new.

- Problem in Headless Chrome? File an issue against Chromium's issue tracker:

https://bugs.chromium.org/p/chromium/issues/entry?components=Internals%3EHeadless&blocking=705916

For issues, feature requests, or setup troubles with Puppeteer, file an issue right here!
-->

### Steps to reproduce

**Tell us about your environment:**

* Puppeteer version: 1.9.0
* Platform / OS version: macos
* URLs (if applicable):
* Node.js version: 8.11.3

**What steps will reproduce the problem?**

_Please include code that reproduces the issue._

1. Simply add these code in your page
```javascript
try {
    // try to print a value doesn't exist
    // and it will throw an error
    console.log(a)
} catch (e) {
    // catch the error and print this with `console.error`
    console.error(e)
}
```
2. puppeteer script:
```javascript
...
page.on('console', msg => {
    console.log(msg.text())
})
...
```

**What is the expected result?**
It prints `JSHandle@error`

**What happens instead?**
The exact error object like `ReferenceError: a is not defined...`