sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: PyTorch1.3.1 Can not using namespace torch::indexing
Labels: module: cpp,triaged

pytorch is installed with command
```sh
pip install pytorch==1.3.1
```

When using c++ api
```python
torch::Tensor cc = torch::randn({64, 432*496}, torch::requires_grad(false).dtype(at::kFloat)).cuda();
torch::Tensor indices = torch::randn({581}, torch::requires_grad(false).dtype(at::kLong)).cuda();
torch::Tensor voxels =  torch::randn({64, 581}, torch::requires_grad(false).dtype(at::kLong)).cuda();
at::index_put(cc, { torch::indexing::None, indices}, voxels, false);
```
but build failed:
```sh
main.cpp:178:31: error: 'torch::indexing' has not been declared
     at::index_put(cc, {torch::indexing::None, indices}, voxels, false);
                               ^
main.cpp:178:70: error: could not convert '{<expression error>, indices}' from '<brace-enclosed initializer list>' to 'at::TensorList {aka c10::ArrayRef<at::Tensor>}'
     at::index_put(cc, {torch::indexing::None, indices}, voxels, false);
```

cc @yf225 @glaringlee
Repository: neovim
Issue: how to let putty read directories in vim
Labels: bug-vim,netrw

<!-- Before reporting: search existing issues and check the FAQ. -->

- `nvim --version`:0.5.0-746
- `vim -u DEFAULTS` (version: ) behaves differently? no
- Operating system/version: Windows 10
- Terminal name/version: N/A
- `$TERM`: N/A

### Steps to reproduce using `nvim -u NORC`
init.vim
```
let g:netrw_cygwin= 0
let g:netrw_scp_cmd="\"D:\\PuTTY\\PSCP.EXE\" -l username -i C:\\id_rsa.ppk "
let g:netrw_sftp_cmd="\"D:\\PuTTY\\PSFTP.EXE\" -l username -i C:\\id_rsa.ppk "
```

```
nvim -u NORC
:e scp://username@ip//directory/
```

### Actual behaviour
This is a vim failure to use putty to read directores, either using plink or pscp.

plink needs remote addr before ls command, and pscp -ls generates a detailed list that vim does not recognize.

### Expected behaviour
As I posted as below, I can make it work. But it is not an ideal solution, since it does not cover situations for all usages. So maybe someone can make it better.
https://stackoverflow.com/questions/64747380/how-to-let-putty-read-directories-in-vim/64747381#64747381

Neovim\share\nvim\runtime\autoload\netrw.vim,
```
 elseif exists("g:netrw_ssh_cmd")
 "elseif executable(g:netrw_ssh_cmd)
```

init.vim
```
let g:netrw_ssh_cmd="\"D:\\PuTTY\\PLINK.EXE\" -l username -i C:\\id_rsa.ppk "
```
Repository: node
Issue: REPL: _ and _error variables are not available by default in a repl instance with a modified context
Labels: doc,repl

* **Version**: 15.1.0
* **Platform**: 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64
* **Subsystem**: repl

### What steps will reproduce the bug?

Start an application that imports `repl` and modifies the context. For example: [https://github.com/sjsyrek/malcjs](https://github.com/sjsyrek/malcjs)

Update: I applied a workaround to this repo (see below), but if the lines starting at [https://github.com/sjsyrek/malcjs/blob/master/src/index.js#L67](https://github.com/sjsyrek/malcjs/blob/master/src/index.js#L67) are commented out, the issue can still be reproduced.

Basically,
```js
const context = {
  // whatever
};

vm.createContext(context);

const replServer = repl.start();

replServer.context = context;
```

Try to use the `_` or `_error` variables for previously evaluated expressions. They do not work as expected.

### How often does it reproduce? Is there a required condition?

Every time.

### What is the expected behavior?

[https://nodejs.org/api/repl.html#repl_assignment_of_the_underscore_variable](https://nodejs.org/api/repl.html#repl_assignment_of_the_underscore_variable)

I expect that when I create my own context for a custom REPL, it won't affect any other initialization steps, including the availability of the (extremely useful) `_` and `_error` variables. I cannot say for sure that anything else is missed in this scenario, but it would be worth investigating (example, entering `util.inspect.replDefaults` in a custom REPL results in an error, whereas the standard REPL returns the inspection defaults).

### What do you see instead?

I have observed the strange behavior that when I enter `_` at the repl prompt, it gets duplicated, i.e. `__` is entered instead and I see this error:
```
Uncaught ReferenceError: __ is not defined
```

### Additional information

It seems that I was able to resolve this issue by adapting [code](https://github.com/nodejs/node/blob/14699846452e627f97dedb85991eea67d932a79d/lib/repl.js#L1013) directly from the `repl` package and defining these variables myself, e.g.:
```js

Object.defineProperty(replServer.context, "_", {
  configurable: true,
  get: () => replServer.last,
  set: (value) => {
    replServer.last = value;
    if (!replServer.underscoreAssigned) {
      replServer.underscoreAssigned = true;
      replServer.output.write("Expression assignment to _ now disabled.\n");
    }
  },
});

Object.defineProperty(replServer.context, "_error", {
  configurable: true,
  get: () => replServer.lastError,
  set: (value) => {
    replServer.lastError = value;
    if (!replServer.underscoreErrAssigned) {
      replServer.underscoreErrAssigned = true;
      replServer.output.write(
        "Expression assignment to _error now disabled.\n"
      );
    }
  },
});
```

But I assume this is not desirable.
Repository: vue
Issue: when use key in Object.prototype carelessly as prop, it will work wrong way
Labels: feature request,discussion

### Version
2.6.12

### Steps to reproduce
```html
<div></div>
<script>
new Vue({
  el: 'main',
  template: '<MyDatetime :value="datetime" />',
  data: {
    datetime: Date.now(),
  },
  components: {
    MyDatetime: {
      template: `
        <div>
          expect undefined: {{ toString + "" }}<br />
          expect default: {{ toLocalString + "" }}<br />
        </div>`,
      props: {
        value: {
          type: Number,
        },
        toString: {
          validator: mode => [ 'date-time', 'date', 'time' ].includes(mode),
        },
        toLocalString: {
          validator: mode => [ 'date-time', 'date', 'time', 'default' ].includes(mode),
          default: 'default',
        },
      },
    },
  },
});
</script>
```

### What is expected?

They are all keys match the uni simple rule: not start with `_` or `$`

### What is actually happening?

If parent component doesn't pass the prop, then the component will get neither `undefined` nor `default`, but the value in `Object.prototype`.

---

1. `{}` in these two lines need to be replaced to `Object.create(null)`, the first line is required for two cases, and the second line is required for `default` case,

https://github.com/vuejs/vue/blob/52719ccab8fccffbdf497b96d3731dc86f04c1ce/src/core/vdom/helpers/extract-props.js#L24

https://github.com/vuejs/vue/blob/33e669b22f69a1f9c9147528360fe0bba85534f0/src/core/instance/state.js#L66

2. there still leave `constructor` which can't be used, it need `delete Vue.prototype.constructor`, and give an alternative way to do what `vm.constructor` (`Sub.prototype.constructor = Sub`) do in current source code.

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: vscode
Issue: Make it possible to disable editors following the highlighted entry in the problems list
Labels: feature-request,accessibility,error-list

Currently, when I have problems shown in the problems view, navigating through the error list with just arrows immediately moves the cursor to their location, and opens new editors if needed.
However this poses some problems related to accessibility, so I would like to suggest a feature allowing this behavior to be disabled.
In case this setting is disabled, the cursor should move only when pressing enter on a specific problem.
The motivation for this request is the fact this behavior is bad for screenreader usage.
Normally (possibly except mac) blind people navigate using arrows, so in order to see any problem list item we have to actually select it first with arrows.
And in that case I would not expect being moved to location of each problem I select when I only wanted to review the list.
Repository: godot
Issue: Vector2 angle inconsistency due to negative zero
Labels: discussion,topic:core

**Godot version:**
3.2.3-stable

**OS/device including version:**
Windows 10

**Issue description:**
```GDscript
var zv = Vector2(0,0)
print("Zero vector angle: ", zv.angle())
print("Negated zero vector angle: ", (-zv).angle())
```
> Zero vector angle: 0
> Negated zero vector angle: -3.141593

I don't know why Vector2 (and Vector3) are in particular allowing this problematic negative zero value to get into the system when it doesn't happen in scalar arithmetic, as seen here:

```GDscript
var v = 0
var nv = -v
var nnv = (-Vector2(v, v)).x
print("v: ", v)
print("nv: ", nv)
print("nnv: ", nnv)
print("v == nnv: ", (v == nnv))	
```
> v: 0
> nv: 0
> nnv: -0
> nv == nnv: True



A different issue caused by Vector2 providing a gateway to negative zero pollution was patched over in a previous pull-request  here: https://github.com/godotengine/godot/pull/6698



**Steps to reproduce:**
See above

**Minimal reproduction project:**
N/A
Repository: vscode
Issue: Allow extensions to contribute dynamic submenus
Labels: feature-request,menus

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

Currently an extension's menu and submenu contributions can only be statically defined in its package.json. At runtime the extension can use context keys it creates via the `setContext` command together with `when` clauses to hide its contributed items dynamically. But there are use-cases where the actual items cannot be predefined, and we have to resort to a QuickPick. IMO this results in a poor UX and some accessibility issues because the list of choices does not appear alongside the context menu action which triggered it.

I see two ways of solving this.

A) Allow submenu contents to be computed when the parent menu entry is selected (or perhaps merely focused).

I outlined this in https://github.com/microsoft/vscode/issues/9827#issuecomment-619989638

B) Add a `setSubmenuContents` equivalent to the existing `setContext` command.

Using this approach an extension would run the new command, specifying the id of one of the submenus it had defined in its settings.json, plus a second command argument containing the new definition of the submenu.
Repository: react
Issue: Bug: eslint-plugin-react-hooks doesn't report conditional typescript "?." hooks
Labels: Type: Bug,Component: ESLint Rules

**React plugin version:** 
eslint-plugin-react: "^7.19.0"
typescript: 4.0+ (must include ?. operator)

## Steps To Reproduce

```tsx
// Just a demonstration example, obviously this is not ideal use of classes
class Dog {
	public useDogWoof() {
		useEffect(() => {
			console.log("woof")
		}])
	}
}

const DogWoof = ({dog}: {dog?: Dog) => {
	dog?.useDogWoof() // Should print conditional hook error
	return (
		//
	)
}
```

## The current behavior

Typescript has the new 4.0 operator `?.` in case an object is undefined. But, this doesn't quite work along with hooks, as when the object is undefined, the hook is not called, thus the React Renderer complains that the amount of hooks is not the same or even worse untraceable type errors that I had. `eslint-plugin-react-hooks` is expected to be able to guard against that as well to prevent nasty errors with this new typescript operator.

## The expected behavior

Currently, `eslint-plugin-react-hooks` doesn't take care of the typescript operator and thinks that nothing's wrong with using along one with a react hook.
Repository: excalidraw
Issue: Add regression tests for WS server 
Labels: test

We can start with:

- [ ] test we establish a connection (to the live server) and can exchange data.

Later we may wanna add tests for each event and payload schema
Repository: godot
Issue: VehicleWheel material not rendered correctly at runtime
Labels: bug,topic:rendering

**Godot version: 3.2.***

**OS/device: Linux Mint 19 cinnamon, GLES 3, Nvidia GeForce GTX 1060 6GB**

**Issue description:**
Materials on imported mesh that are children of VehicleWheel are not rendered correctly when the scene is lauchned. While they do render while editing the scene in the editor, they don't at runtime. I'm using materials that are _built in_ the _surfaces_ of the Mesh.
Interestingly, the same mesh renders perfectly if not parented inside a VehicleWheel (ie put directly as child of the VehicleBody). Even more interestingly, if a mesh is the target of a RemoteTransform, the problem occurs again (even if not inside a vehicle wheel).
Another interestig thing : the problem is not present in the 3.1.2 build

**Steps to reproduce:**
Maybe this has something to do with the model I imported, maybe not. To reproduce, just import a 3D model as a VehicleBody and 3D wheels as VehicleWheel. 


**Minimal reproduction project:**

[ImportVehicle.zip](https://github.com/godotengine/godot/files/5511266/ImportVehicle.zip)
Repository: rust
Issue: No error reported when a generic parameter doesn't meet the requirement of an associated type
Labels: A-trait-system,E-needs-test,A-associated-items,T-compiler,regression-from-stable-to-stable,C-bug,T-types

### Code

I tried this code:

```rust
trait A {
    type T: Iterator<Item = i32>;
}

trait B {
    fn x(_: impl A<T = impl Send>);
}
```

#### I expected to see this happen:

```
error[E0277]: `impl Send` is not an iterator
```

#### Instead, this happened: 

Code compiles

### Version it worked on

It most recently worked on: 1.48.0-beta.8

### Version with regression

rust nightly 2020-11-08 (likely not the earliest)
Repository: go
Issue: x/net/html: parsed HTML cannot be rendered
Labels: NeedsInvestigation

This bug was found by fuzzing. See master issue #27848

### What version of Go are you using (`go version`)?
1.15

### Does this issue reproduce with the latest release?
Yes

### What did you do?
[Playground](https://play.golang.org/p/DI9kx_Ifx-g)

Code:
```go
package main

import (
	"bytes"
	"fmt"
	"io/ioutil"

	"golang.org/x/net/html"
)

const crasher = "<svg><meta>\x00\x0a"

func main(){
	FuzzParse([]byte(crasher))
}

// FuzzParse is the Fuzz target to validate that html can be deserialized and re serialized.
func FuzzParse(b []byte) {
	nodes, err := html.ParseFragment(bytes.NewReader(b), nil)
	if err != nil {
		return
	}
	for _, n := range nodes {
		if err := html.Render(ioutil.Discard, n); err != nil {
			fmt.Println(err)
			panic("cannot render parsed HTML")
		}
	}
}
```

### What did you expect to see?
No panic

### What did you see instead?
```
html: void element <meta> has child nodes
panic: cannot render parsed HTML

goroutine 1 [running]:
main.FuzzParse(0xc00002c050, 0xd, 0xd)
	/tmp/sandbox363235051/prog.go:26 +0x1b7
main.main()
	/tmp/sandbox363235051/prog.go:14 +0x68
```
Repository: angular
Issue: fix(common): support consistent locale and ISO formatting
Labels: area: common,area: i18n,state: needs eng input,P4

Combining the following issues and PRs into this one for tracking: #38826, #31130, #25380, #25451.

Since the work to solve these issues is not trivial, I have created a [project proposal](https://docs.google.com/document/d/1hMRO_xTCcnXIZIbM58_2sHj7ON5Hz4jsDdIP14wcO0w), which will go through our prioritisation process and eventually be assigned a team to fix.  Please do comment on the proposal if you see anything that needs changing or clarifying.
Repository: PowerToys
Issue: [Run] "Open with" feature in PowerToys Run list
Labels: Idea-Enhancement,Product-PowerToys Run

To add an option to open with (choose the program) to open a file when you search for it with Power Toys Run.
Repository: node
Issue: Stream emitting same error twice under certain circomstances
Labels: stream

* **Version**: 12.18.1 and newer
* **Platform**: Darwin watson 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64
* **Subsystem**: stream

### What steps will reproduce the bug?

Run this code on Node.js 12.18.1 or newer and notice how the error is emitted on `b` twice. On any older Node.js version it's only emitted once.

```js
const { Readable, PassThrough, Writable, pipeline } = require('stream')

const a = new Readable({
  read () {
    this.destroy(new Error('foo'));
  }
})
const b = new PassThrough()
const c = new Writable()

a.once('error', (err) => {
  console.log('emitting error on b')
  b.emit('error', err) // Note: you're not supposed to emit error manually!
})

b.on('error', (err) => {
  console.log('b got error:', err.message)
})

pipeline(a.pipe(b), c, (err) => {
  console.log('end of pipeline, err:', err.message)
})
```

If I change `b.emit('error', err)` to `b.destroy(err)` the error goes away. Using `destroy` _is_ best practise and the user isn't supposed to emit `error` events manually on streams like in the above code. However, this was how we told users to do it previously, so a lot of code most likely exists in the wild expecting this to be possible and emitting the same error twice can have bad consequences.

Thoughts:
1. It would be cool if we could warn users if they manually emitted an `error` event on a stream.
1. It would be nice if we could make this odd behaviour go away even if the user emits `error` manually.

This regression was most likely introduced in #30869.
Repository: vscode
Issue: Allow `createWebviewPanel` to open tab in preview mode
Labels: feature-request,api,webview

It would be nice if webviews tabs could have an option to open in a preview mode, similar to how editor tabs do.

More context: https://github.com/microsoft/vscode-pull-request-github/issues/113
Repository: angular
Issue: refactor: implement a consist logging approach in the framework
Labels: area: common,area: router,area: core,P4,cross-cutting: tree-shaking

As a follow up to #34763 this issue is to provide a place to discuss and track the idea.

There are a number of logging approaches in the current codebase, including direct use of `console.log`, use of the injectable `Console` service; sometimes guarded by dev-mode and sometimes not.
Repository: ant-design
Issue: Disable submit button while submitting
Labels: 💡 Feature Request,Inactive

- [X] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### What problem does this feature solve?
I want to disable my form submit button without adding an additional state on every form.

### What does the proposed API look like?
Add `{isSubmitting: boolean}` property to `FormInstance` type which would toggled by ant form internal state on form submission.


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: Error while trying to load a pretrained ResNet34 VTN (Video Transformer Network) model in Android
Labels: triaged,oncall: mobile

Hi,

I have been trying run a pretrained ResNet34 VTN model in android. The pretrained model (ResNet34-VTN) can be downloaded here: https://download.01.org/opencv/openvino_training_extensions/models/action_recognition/resnet_34_vtn_rgb_ucf101_s1.pth

I have followed the following example: https://heartbeat.fritz.ai/pytorch-mobile-image-classification-on-android-5c0cfb774c5b#:~:text=Deploying%20A%20PyTorch%20model%20to,Mobile%20to%20perform%20predictions%20(Java)

But when I am trying to load the model I get the following error:

com.facebook.jni.CppException: false CHECK FAILED at ../caffe2/serialize/file_adapter.cc (FileAdapter at ../caffe2/serialize/file_adapter.cc:11)

Thank you in advance!
Repository: rust
Issue: Better account for invalid `async fn main() {}`
Labels: A-diagnostics,T-compiler,D-verbose

The following

```rust
async fn main() {
}
```

[produces a lot of output](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=d1fd5d05934ea779d55be47c00c2912f) that is not quite good:

```
error[E0277]: `main` has invalid return type `impl Future`
 --> src/main.rs:1:17
  |
1 | async fn main() {
  |                 ^ `main` can only return types that implement `Termination`
  |
  = help: consider using `()`, or a `Result`

error[E0752]: `main` function is not allowed to be `async`
 --> src/main.rs:1:1
  |
1 | async fn main() {
  | ^^^^^^^^^^^^^^^ `main` function is not allowed to be `async`

```

The two errors (E0277 and E0752) should be only a single error.

(Taken from a subset of https://users.rust-lang.org/t/how-can-we-return-a-anonymous-type-in-result-trait/51258)
Repository: pytorch
Issue: Input dimension check for `torch.gather`
Labels: module: error checking,triaged

## 🐛 Bug

The input dimension check was dropped somewhere between PyTorch 1.5.1 and 1.6.

## To Reproduce

The following code runs successfully. However, the `index` argument has incompatible dimensions and should raise an exception.

```python
import torch
torch.manual_seed(0)
input = torch.rand(4, 2)
index = torch.randint(2, size=(4,)).unsqueeze(0)  # intended to be unsqueeze(1)
dim = 1
output = torch.gather(input, dim, index)
print("input = ", input)
print("index = ", index)
print("output = ", output)
```

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

`torch.gather` should raise an exception on receiving and index with incompatible dimension.

## Environment

```
Collecting environment information...
PyTorch version: 1.5.1
Is debug build: False
CUDA used to build PyTorch: 10.2
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.5 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: Could not collect
CMake version: version 3.10.2

Python version: 3.8 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: 10.2.89
GPU models and configuration:
GPU 0: GeForce RTX 2080
GPU 1: GeForce RTX 2080

Nvidia driver version: 440.100
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5
/usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn.so.7.6.5
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.19.0
[pip3] pytorch-lightning==0.9.0rc5
[pip3] torch==1.5.1
[pip3] torchvision==0.6.0a0+35d732a
[conda] blas                      1.0                         mkl
[conda] cudatoolkit               10.2.89              hfd86e86_1
[conda] mkl                       2019.4                      243
[conda] mkl-service               2.3.0            py38h516909a_0    conda-forge
[conda] mkl_fft                   1.1.0            py38hc1659b7_1    conda-forge
[conda] mkl_random                1.1.0            py38hb3f55d8_0    conda-forge
[conda] numpy                     1.19.0                    <pip>
[conda] numpy                     1.18.5           py38ha1c710e_0
[conda] numpy-base                1.18.5           py38hde5b4d6_0
[conda] pytorch                   1.5.1           py3.8_cuda10.2.89_cudnn7.6.5_0    pytorch
[conda] pytorch-lightning         0.9.0rc5                  <pip>
[conda] torchvision               0.6.1                py38_cu102    pytorch
```
## Additional context

See the post on forum: https://discuss.pytorch.org/t/why-torch-gather-has-not-input-shape-check/102053