sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: node
Issue: http2 API documentation issues
Labels: help wanted,doc,http2

## Compatibility API example

Here's the example code from the API docs in the [compatibility API section](https://nodejs.org/api/http2.html#http2_compatibility_api):

```js
const http2 = require('http2');
const server = http2.createServer((req, res) => {
  res.setHeader('Content-Type', 'text/html');
  res.setHeader('X-Foo', 'bar');
  res.writeHead(200, { 'Content-Type': 'text/plain' });
  res.end('ok');
});
```

The `Content-Type` header is overwritten here in `writeHead()`, but unless the reader knows that `writeHead()` *merges* its headers with the headers set in `setHeader()`, the reader may think there's something special going on here.

Suggestion: remove first call to `setHeader()`; ensure example is straightforward

## No documentation of `HTTP2_HEADER_*` constants

There are many references to e.g., `http2.constants.HTTP2_HEADER_STATUS`.  These are not listed in the [constants section](https://nodejs.org/api/http2.html#http2_http2_constants).  Is `HTTP2_HEADER_CONTENT_TYPE` different than `'Content-Type'`?  Can these be used interchangeably?  If I use the compatibility API, should I use these constants?

Suggestion: document the constants and when to use them.
Repository: TypeScript
Issue: Error messages should place most relevant information first.
Labels: Suggestion,Needs Proposal

Here's an actual example of an error message that can go wrong in our library when mispelling a property when creating an object literal:

```
[ts]
Type '{ containers: { nginx: { image: string; memory: number; portMappings: NetworkListener[]; enviroment: number; }; }; }' is not assignable to type 'FargateTaskDefinitionArgs'.
  Types of property 'containers' are incompatible.
    Type '{ nginx: { image: string; memory: number; portMappings: NetworkListener[]; enviroment: number; }; }' is not assignable to type 'Record<string, Container>'.
      Property 'nginx' is incompatible with index signature.
        Type '{ image: string; memory: number; portMappings: NetworkListener[]; enviroment: number; }' is not assignable to type 'Container'.
          Object literal may only specify known properties, but 'enviroment' does not exist in
          type 'Container'. Did you mean to write 'environment'? [2322]

- fargateService.d.ts(169, 5): The expected type comes from property 'taskDefinitionArgs'
  which is declared here on type 'FargateServiceArgs'
```

The funny thing here is that the final parts of the error message are superb. Namely:

```
- Object literal may only specify known properties, but 'enviroment' does not exist in
  type 'Container'. Did you mean to write 'environment'? [2322]

- fargateService.d.ts(169, 5): The expected type comes from property 'taskDefinitionArgs'
  which is declared here on type 'FargateServiceArgs'
```

However, the actual output is quite cluttered and hard to glean the information from.  This is esp. true in an ide setting where one sees something like this:

![image](https://user-images.githubusercontent.com/4564579/52309247-629da100-2954-11e9-9f85-06a86d04a108.png)

This view is particularly problematic due to the wrapping and wall-of-goop nature of this type of error.


My suggestion would be to invert the information being provided by errors.  Give the most specific and directly impactful information first (i.e. `Object literal may only specify known properties, but 'enviroment' does not exist in type 'Container'. Did you mean to write 'environment'?`), and then follow that up with all the extra details that can be used to dive deeper into things when that isn't clear enough.
Repository: go
Issue: x/tools/refactor/rename: move-to strictly respects build tags
Labels: NeedsInvestigation,Tools,Refactoring

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.11.5 darwin/amd64
</pre>

### Does this issue reproduce with the latest release?

Yeah.

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GOARCH="amd64"
GOBIN="/Users/elagergren/gopath/bin"
GOCACHE="/Users/elagergren/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/elagergren/gopath"
GOPROXY=""
GORACE="history_size=7"
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="/Users/elagergren/gopath/src/treehouse.spideroak.com/flow/openssl/lib/darwin/fips2.0/bin/fipsld_clang"
CXX="clang++"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/2b/74fz3jhd4wz4vnbf4z7ywzww0000gp/T/go-build009059339=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>

### What did you do?

```
$ tree
.
├── package.go
├── package_windows.go (imports windows1)
└── windows1
    ├── windows2
    │   └── windows2.go
    └── windows1.go (imports windows2)
```

`gomvpkg -from repo/package -to repo/elsewhere/package -vcs_mv_cmd 'git mv {{ .Src }} {{ .Dst }}`

### What did you expect to see?

Files that would otherwise be excluded from compilation via build tags have their imports changed.

### What did you see instead?

They didn't.

---

To be specific: on macOS I moved a package containing `package_windows.go`. That file imported a sub-package. While the macOS/Unix/etc. code (e.g., `package.go`) had its imports updated, the code in `package_windows.go` did not.

I assume the `XXX_windows.go` files were excluded because of build constraints.
Repository: kubernetes
Issue: Volume may be resized online if multiple pods share the same volume
Labels: kind/bug,sig/storage,lifecycle/frozen

<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!-->


**What happened**:
Inside [MountVolume](https://sourcegraph.com/github.com/kubernetes/kubernetes@0dfbbc290cce9da8aebd669890dbd3e117e20cc6/-/blob/pkg/volume/util/operationexecutor/operation_generator.go#L446), [resizeFilesystem](https://sourcegraph.com/github.com/kubernetes/kubernetes@0dfbbc290cce9da8aebd669890dbd3e117e20cc6/-/blob/pkg/volume/util/operationexecutor/operation_generator.go#L550) is always called per pod, without checking if other pods sharing the same volume have restarted.

So you can have a sequence like this:
1. Two pods on the same node sharing the volume
2. Resize is started
3. One pod is restarted
4. When that pod goes through MountVolume, it will trigger the filesystem resize, even though the 2nd pod is still running on the node and has not restarted.  So the 2nd pod sees an online resize.

**What you expected to happen**:
Both pods should have to restart before the filesystem is resized

@kubernetes/sig-storage-bugs 
/assign @gnufied
Repository: vscode
Issue: List references: transition from history to results is not smooth
Labels: bug,tree-views,references-viewlet

Steps to Reproduce:

1. have a history of references
2. find references again

=> 🐛 the transition from history to results is not very smooth, in the video you can see how the history partially still shows after running "Find References"

![before](https://user-images.githubusercontent.com/900690/52327474-92988300-29ec-11e9-89b6-afa4dca37368.gif)
Repository: flutter
Issue: BottomAppBar elevation doesn't seem to do anything
Labels: framework,f: material design,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-design,triaged-design
Repository: pytorch
Issue: Should be a way to unpickle an object with a torch cuda tensor on a CPU-only machine when using plain "pickle"
Labels: todo,feature,module: serialization,triaged

## 🚀 Feature
The ability to pickle.load a Python object containing a torch cuda tensor on a CPU only machine.

## Motivation

Currently, trying to do this gives `RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location='cpu' to map your storages to the CPU.`  Even though you are loading with `pickle.load`, not `torch.load`.  

When the "loading" code is pytorch agnostic (exists in a repo that does not use pytorch), you can't just change a `pickle.load(f)` into a `torch.load(f, map_location='cpu')`.  This may be the case when the saved data takes a particular structure and loading/unloading is handled by some code that does not depend on pytorch.

## Pitch

A context manager could take care of this:

```
with torch.loading_context(map_location='cpu'):
    obj = pickle.load(f)  # In my case this call is buried deeper in torch-agnostic code
```
Repository: electron
Issue: Support the forward option of BrowserWindow.setIgnoreMouseEvents in Linux
Labels: enhancement :sparkles:

A click-through functionality is very useful for floating-widget type apps with non-rectagular shapes. A solution using the forward option of setIgnoreMouseEvents was proposed in this issue comment: https://github.com/electron/electron/issues/1335#issuecomment-433478053

However, Linux is currently not supported. I'd like to be able to have a cross-platform solution.

Thanks!
Repository: flutter
Issue: reverse playback of the video.
Labels: c: new feature,p: video_player,package,team-ecosystem,P3,triaged-ecosystem

It will be very helpful to have effects for slower video playback or reversing it as the need be.

Take a look at this: https://stackoverflow.com/questions/54495037/flutter-more-video-player-controller-options
Repository: vue
Issue: Ability to cancel rendering
Labels: feature request,feat:ssr

### What problem does this feature solve?
Under high-load, some pages are rendered to slow. The connection is aborted by the remote side. It would be nice to be able to cancel pages rendering in this case.

### What does the proposed API look like?
const rendererId = renderer.renderToString(...);

rendererId.cancel();

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: rust
Issue: [rustdoc search] Add search into struct fields/enum variants
Labels: T-rustdoc,C-feature-request,A-rustdoc-search

Add a fourth tab.
Repository: pytorch
Issue: Wrong description of positive class weight in BCEWithLogitsLoss
Labels: module: docs,triaged

## 📚 Documentation

The explanation of `pos_weight` for [BCEWithLogitsLoss](https://pytorch.org/docs/stable/nn.html#torch.nn.BCEWithLogitsLoss) mentions:
`where :math:`p_n` is the positive weight of class :math:`n`.`

We don't have `n` classes (this is a binary loss). The correct description would be something like this:
 `:math:p_n is the weight of the positive class for sample n in the batch`

(I also don't understand the utility of having a different positive-class-weight per sample in a batch, because you usually apply the same class weight for the whole training data. But that's a different issue.)
Repository: flutter
Issue: onClosing event of the BottomSheet widget never runs
Labels: framework,f: material design,has reproducible steps,P2,workaround available,found in release: 3.7,found in release: 3.10,team-design,triaged-design

```dart
final  _scaffoldKey = GlobalKey<ScaffoldState>();

void _showBottomSheet() async {
  final bottomSheet = BottomSheet(
    builder: (BuildContext context) {
      return Container(
        color: Colors.white,
        height: 100.0,
        child: Row(
          children: <Widget>[
            Text('Tittle')
          ],
        )
      );
    },
   onClosing: () {
      print('on closing');
    }
  );

  _scaffoldKey.currentState.showBottomSheet(bottomSheet.builder);
}

@override
Widget build(BuildContext context) {
  return Scaffold(
      key: _scaffoldKey,
      appBar: AppBar(
        title: Text("TITLE SCAFFOLD"),
      ),
      body: Container(
        ...
      ),
  );
}
```
Repository: kubernetes
Issue: Cloud Provider E2E Tests
Labels: area/test,area/cloudprovider,kind/feature,sig/testing,lifecycle/frozen,sig/cloud-provider

**What would you like to be added**:
In https://github.com/kubernetes/kubernetes/pull/72902 we introduce the first set of "cloud provider" tests. There are still a lot of tests to be added here such as:
- [ ] load balancers (some tests already exist in `test/e2e/network/service.go`)
- [ ] routes
- [ ] node registration (validate labels, addresses, tagging?, etc)
- [ ] PV labelling 

Note that some tests will overlap with other SIGs, might be worthwhile to validate first that a similar test doesn't already exist.  Each test should be marked with `[Feature:CloudProvider]` and `[Disruptive]` where appropriate. 

**Why is this needed**:
The primary justification is that we want to be able to test a set of behaviours for a Kubernetes cluster on any cloud provider especially as we transition providers from in-tree to out-of-tree.
Repository: vue
Issue: Ability to access context from serverPrefetch
Labels: intend to implement,feature request,feat:ssr

### What problem does this feature solve?
After vue 2.6 was released and serverPrefetch hook was introduces I lost a possibility to update `httpCode` during SSR if there was a data fetching failure.

### What does the proposed API look like?
Provide access to `context` from the `serverPrefetch` hook.

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: rust
Issue: rustdoc doesn't show implementations of traits when receiver is behind a #[fundamental] type
Labels: T-rustdoc,A-trait-system,C-bug,A-rustdoc-ui

For this block of code

```rust
use core::ops::Not;

pub struct F;

impl Not for F {
    type Output = F;

    fn not(self) -> Self::Output { F }
}

impl Not for &mut F {
    type Output = F;

    fn not(self) -> Self::Output { F }
}

impl Not for Box<F> {
    type Output = F;

    fn not(self) -> Self::Output { F }
}
```

`rustdoc` shows the first two implementations in the documentation for `F`, but the third implementation doesn't appear anywhere.

With the stabilization of `Pin` (another `#[fundamental]` wrapper type) this may be much more of an issue, implementing a trait for `Pin<&mut ...>` is going to be common for traits that interact with pinning (generic/concrete implementations defined in the same crate as the trait appear in the docs fine, it's only when you define an implementation of a foreign trait for `Pin<&mut LocalType>` that they seem to be missing).
Repository: node
Issue: `readable` event not emitted after `net.Socket` reconnects
Labels: confirmed-bug,net,stream

* **Version**: v10.15.1
* **Platform**: Windows 10 Pro 64-bit
* **Subsystem**: net

If `net.Socket` loses connection (`close` is emitted) and the same socket instance is used to reconnect to the same server, no more `readable` events are emitted (`data` events are still emitted).

Doesn't work in v10.14/v10.15.1. Works in v8.15.0.

Repro: https://gist.github.com/morkai/fa175bd0104443e6142f3d0e22805653
1. Run `server.js`
2. Run `client.js`
3. Client prints `client#readable`
4. Kill the server
5. Run the server again
6. Client reconnects
7. **Client doesn't print any `client#readable` lines**
8. Kill the client
9. Uncomment the `data` event handler and comment the `readable` handler in `client.js`
10. Run the client
11. Client prints `client#data`
12. Kill the server
13. Run the server again
14. Client reconnects
15. Client resumes printing `client#data` lines
Repository: TypeScript
Issue: `.call` selects the wrong overload for `String.prototype.replace`
Labels: Bug,Help Wanted,Domain: lib.d.ts

**TypeScript Version:**  v3.3.1 and v3.4.0-dev.20190206

**Search Terms:** call replace overload

**Code**

```ts
String.prototype.replace.call(
    'one string',
    /a/g,
    'two string', // this line errors
);
```

It's worth noting that this is in a JS file, not a TS file, but I'm using `allowJs` and `checkJs`.

**Expected behavior:**
No error.

**Actual behavior:**
errors with `error TS2345: Argument of type '"two string"' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'`

**Playground Link:** http://www.typescriptlang.org/play/#src=String.prototype.replace.call(%0D%0A%20%20%20%20'one%20string'%2C%0D%0A%20%20%20%20%2Fa%2Fg%2C%0D%0A%20%20%20%20'two%20string'%2C%0D%0A)%3B but the error doesn't seem to show up there.

**Related Issues:** no
Repository: opencv
Issue: _InputArray::getMat_ handling empty std::vector<T>
Labels: RFC

This line in `_InputArray::getMat_`
https://github.com/opencv/opencv/blob/master/modules/core/src/matrix_wrap.cpp#L54

    if( k == STD_VECTOR )
    {
        CV_Assert( i < 0 );
        int t = CV_MAT_TYPE(flags);
        const std::vector<uchar>& v = *(const std::vector<uchar>*)obj;

        return !v.empty() ? Mat(size(), t, (void*)&v[0]) : Mat();
    }

Should the last line be changed like this?

        return !v.empty() ? Mat(size(), t, (void*)&v[0]) : Mat(0, 0, t);

Otherwise the return Mat ships no type info.
Repository: vscode
Issue: Git - Support git worktrees in workspace
Labels: help wanted,feature-request,git

```
$ mkdir repro
$ cd repro
$ mkdir example1
$ cd example1
$ git init; echo "hello" > world.txt; git add world.txt; git commit -m "init";
$ git worktree add ../example1branchA
$ git worktree add ../example1branchB
$ cd ..

$ mkdir example2
$ cd example2
$ git init; echo "hello" > world.txt; git add world.txt; git commit -m "init";
$ cd ..
```
Scenario:
1. Open `repro` directory in VS Code
2. Go to Git tab.

**Expected:** "Source Control Providers" lists Git repos.
  * `example1`
  * `example1branchA`
  * `example1branchB`
  * `example2`

**Actual:** "Source Control Providers" lists Git repos.
 * `example1`
 * `example2`

I sometimes will have lots of branches checked out in parallel on huge repos that I can't afford to clone multiple times. I would also like to be able to use VS Code's source control functionality with these checkouts all the same.

Thanks! and thanks for Code!
Repository: create-react-app
Issue: Feature request: Launch browser into a unique origin
Labels: issue: proposal

## Problem

`npm start` launches `http://localhost:3000`. If I've ever worked on a different app, its `localStorage` is now polluting my new app as they share an origin.

## Solution

If `HOST === 'localhost'` then call `opn` with `target` set to `http://{folder-name}.localhost:{port}`

This way every app has a unique origin and this its own `localStorage`. I know that I can do this manually, but having CRA do it for me would be nice.

## Thoughts?

This is related to #2578, but writing a script to get this to work seems like a lot of duplicated effort for each project

I also can't just [set HOST](https://facebook.github.io/create-react-app/docs/advanced-configuration) as it won't bind to `{folder-name}.localhost`
Repository: go
Issue: proposal: cmd/go: enable mutual TLS authentication with client certificates in the go tool
Labels: Proposal,NeedsInvestigation,Proposal-Hold

It would be useful to be able to pass to the `go` tool a client TLS certificate + key + CAcert (in environment variables or otherwise) - especially, in environments that take Zero Trust Network (ZTN) seriously and where `go` tool needs to talk to the other side (the `replace` targets) that lives in a public cloud using mutual TLS for authN/Z. The "other side" can be either a GOPROXY server or a redirector (like `golang.org`) serving the meta tags.  Since one of the ZTN principles is "every network connection must be authenticated and authorized", the question is how to implement it with the go tool and the requests it initiates.

Technically, it possibly comes down to how to pass desired TLS options (key/certificate/cacert filenames or such) to `tls.Config` that `go` would use when initiating connections.
Repository: deno
Issue: Add support for IndexedDB
Labels: feat,web

It'll be useful to have IndexedDB in Deno.
Related to #1657.
Repository: react
Issue: defaultValue does not work with input when type is set to submit
Labels: Type: Discussion

<!--
  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?**

When you use uncontrolled `<input type="submit" />` and set `defaultValue` attribute, it would be ignored in versions 1.5.0 or higher (there would be no `value` attribute in the HTML result). It was working correctly in older versions. Looks like only `type="submit"` is affected, for other input types `defaultValue` behaves correctly.

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**

Correct behaviour with react 16.4.2: https://codepen.io/anon/pen/zePmrZ
Incorrect behaviour with react 16.8.1: https://codepen.io/anon/pen/PVOyqV

**What is the expected behavior?**

When `defaultValue="foo"` is set on `<input type="submit"/>` it should result in `<input type="submit" value="foo" />` in the HTML result.

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**

All versions starting from 16.5.0
Repository: TypeScript
Issue: Mapped types shouldn't transform unknown type
Labels: Suggestion,Awaiting More Feedback

@ahejlsberg Probably #29740 made this regression.

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.4.0-dev.20190207

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**

**Code**

```ts
type DeepReadonly<T> =
  T extends void ? T :
  { readonly [P in keyof T]: DeepReadonly<T[P]>; };
type m = { a: unknown }; // Also unknown[].
type i = DeepReadonly<m>;
```

**Expected behavior:**

`i` is `{ readonly a: unknown; }`.

**Actual behavior:**

`i` is `{ readonly a: {}; }`.

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->

**Related Issues:** <!-- Did you find other bugs that looked similar? -->