sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Property does not exist on `globalThis` immediately after declaring it
Labels: Suggestion

**Code**

```ts
declare module "buf" {
    global {
        class Buffer {}
    }

    import Buf = globalThis.Buffer;
    export { Buf as Buffer };
}
```

**Expected behavior:**
No errors.

**Actual behavior:**
`Property 'Buffer' does not exist on type 'typeof globalThis'.`

**[Playground Link](https://www.typescriptlang.org/play/?ssl=1&ssc=1&pln=5&pc=18#code/CYUwxgNghgTiAEBbA9sArhBAiARmgZlvAN4CwAUPFfAOYTI5QQkXVvyRQDOX8AQgXwgYJAL6tq48hKoBLRAAdkMAC78C8ALy16jCABUAFrK4A6AfiEwA3DPggAHktUl1+eNzdX4o2+VFAA)**
Repository: flutter
Issue: Can't test navigation between Flutter Web pages using Flutter Driver
Labels: framework,t: flutter driver,f: routes,customer: webeap,P3,team-framework,triaged-framework

Flutter Driver has only very basic documentation for simple tests like finding a button and pressing the button. Anyone know if I can do other operations like navigate to a specific page from driver (e.g. using a # url fragment), test a link which leads to an external site, check visual setup of the page against an image, and other such tests which would be standard in Silenium and the like?  
Or alterantively a strategy for using Silenium/Ghost Inspector with Flutter Web

Thanks!
Repository: pytorch
Issue: Memory bug for backward on torch.sparse.mm? 
Labels: module: sparse,module: autograd,triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

## To Reproduce

Steps to reproduce the behavior:

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

> import torch
import numpy as np
print(f'GPU memory usage: {torch.cuda.memory_allocated(device=None)/10\**9}')
n = 110000
nnz = 860000
rows = np.random.randint(0, n, nnz)
cols = np.random.randint(0, n, nnz)
values = torch.randn(nnz)
X_sparse = torch.sparse_coo_tensor([rows,cols], values, size=(n,n)).cuda().requires_grad_(True)
Y_dense = torch.randn((n,200)).cuda().requires_grad_(True)
print(f'GPU memory usage: {torch.cuda.memory_allocated(device=None)/10\**9}')
input("Press")
t = torch.sparse.mm(X_sparse, Y_dense).sum()
t.backward()
print(f'SPMM, x.grad: {X_sparse.grad}, y.grad: {Y_dense.grad}')
print(f'GPU memory usage: {torch.cuda.memory_allocated(device=None)/10\**9}')

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->
I got an error about OOM only in the backward step. `RuntimeError: CUDA out of memory. Tried to allocate 45.08 GiB (GPU 0; 10.73 GiB total capacity; 202.00 MiB already allocated; 9.68 GiB free; 204.00 MiB reserved in total by PyTorch)`.
I think the memory usage of backward should be similar to that of forward. Before backward, there is still ~9GB free. I expect it would not try to allocate 45GB. I don't know whether there is a bug in backward support for torch.sparse.mm? Feel free to correct me if I am wrong. 

## Environment

Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

 - PyTorch Version (e.g., 1.0): 1.4.0
 - OS (e.g., Linux): Ubuntu 18.04.2 LTS
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Build command you used (if compiling from source):
 - Python version: 3.7
 - CUDA/cuDNN version: 10.1
 - GPU models and configuration: GPU 0: GeForce RTX 2080 Ti
 - Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->
I am not sure if it is a bug. But if so and anyone can point out the problem, I am willing to help and dig further to see how to fix it. 

cc @ezyang @SsnL @albanD @zou3519 @gqchen @vincentqb @aocsa
Repository: pytorch
Issue: libtorch cmake should PUBLIC ally advertise it as requiring C++14
Labels: module: build,triaged

In a bunch of our sample CMakeLists.txt, for example https://pytorch.org/tutorials/advanced/torch_script_custom_ops.html#building-with-cmake we explicitly force our end users to specify that the extension is C++14. Modern cmake lets us define a target that will automatically enforce c++14 on downstream users: https://stackoverflow.com/a/46809634/23845 We should use this, and remove those lines.

cc @ezyang @seemethere @malfet
Repository: pytorch
Issue: Sum of two tuples becomes a list in torchscript
Labels: oncall: jit

## 🐛 Bug

Sum of two tuples becomes a list in torchscript

## To Reproduce

```python

import torch
from torch import Tensor
from torch.jit.annotations import Tuple


def foo4() -> Tuple[Tensor, Tensor, Tensor, Tensor]:    
    out1 = (torch.tensor(0), torch.tensor(0),)
    out2 = (torch.tensor(0), torch.tensor(0),)    
    return out1 + out2

scripted_fn = torch.jit.script(foo4)
scripted_fn()

>
RuntimeError: 
Return value was annotated as having type Tuple[Tensor, Tensor, Tensor, Tensor] but is actually of type List[Tensor]:
  File "<ipython-input-34-1cd92d739981>", line 11
    out2 = (torch.tensor(0), torch.tensor(0),)    
    return out1 + out2
    ~~~~~~~~~~~~~~~~~~ <--- HERE
```

## Expected behavior

Output type should be a tuple 

## Environment

 - PyTorch Version (e.g., 1.0): '1.7.0.dev20200701'
 - OS (e.g., Linux): linux
 - How you installed PyTorch (`conda`, `pip`, source): conda
 - Build command you used (if compiling from source):
 - Python version: 3.7
 - CUDA/cuDNN version:
 - GPU models and configuration:
 - Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->


cc @suo @gmagogsfm
Repository: flutter
Issue: Show a warning when building APK/AAB with unsupported architecture
Labels: c: new feature,c: crash,platform-android,tool,t: gradle,P3,team-android,triaged-android

See https://github.com/flutter/flutter/issues/37566 and https://github.com/flutter/flutter/issues/59501. 

It's possible for users to end up adding their own native libraries in their Flutter Android project's gradle. If the user ends up adding an x86 .so to their project, the APK will be installable on x86 physical devices, cause it to skip the ARM emulation and crash when trying to load Flutter since there are no flutter .so. 

In flutter.gradle, we should look for the presence of native libraries in the APK with unsupported architectures and show a warning to prevent this subtle crasher. 

cc @jmagman @blasten @chinmaygarde
Repository: three.js
Issue: PropertyBinding: Unit test for custom interpolants
Labels: Suggestion

In https://github.com/mrdoob/three.js/issues/19239 we discussed wanting to have a test covering use of custom interpolants with the animation system, which GLTFLoader relies on. I haven't had the chance yet to do so, but don't want to lose track of that thread, so filing a new issue here.
Repository: pytorch
Issue: Support for More Loss Functions
Labels: feature,module: loss,triaged

## 🚀 Feature
Supporting more loss functions like `FocalLoss` or `DICE` natively will be a nice addition, especially as their already implementations to them out there.

## Motivation

Native support for more loss functions will reduce boilerplate code.

## Pitch

Review and addition of loss functions found [Here](https://github.com/JunMa11/SegLoss)

## Alternatives

There is implementations on PyTorch Forums for some of the loss functions mentioned above but because they are not reviewed they sometimes have big flaws.
Repository: go
Issue: x/pkgsite: in cmd/frontend's --proxy_url argument,  exclude localhost from https requirement
Labels: NeedsInvestigation,pkgsite

### What did you do?
 
I tried to start `pkgsite/cmd/frontend` using this command line:
```
./frontend --direct_proxy --proxy_url http://localhost:3000
```
I want to use `http://localhost:3000` with the `--proxy_url` argument,  because I'm trying to create a small kubernetes deployment with the athens module proxy and pkgsite in the same pod.
 
### What did you expect to see?
 
 pkgsite/cmd/frontend starts without errors using `http://localhost:3000` as the proxy url.
 
### What did you see instead?

The below fatal error:
```
Error: proxy.New("http://localhost:3000"): scheme must be https (got http)
```

---
In https://github.com/golang/pkgsite/blob/master/internal/proxy/client.go#L53 if we exclude localhost from the https requirement,  that would solve my immediate problem.

But later on,  if we want to move athens and pkgsite into their own separate deployments,  I'll have to point pkgsite to `http://athens.develop:3000`,  and that won't work (we don't have https for communication within the cluster)

If we want to allow all such internal communications,  another option would be to resolve the hostname,  and if it is in a private IP address range,  then don't expect https.  But I'm not sure if that would have implications in other private IP situations.
Repository: PowerToys
Issue: [KBM] Add a hotkey key to turn it on/off
Labels: Idea-Enhancement,Help Wanted,Product-Keyboard Shortcut Manager,Product-Settings

A way in which to easily toggle on and off the keyboard manager feature without having to leave fullscreen apps, specifically games.

A shortcut keybind that is resignable that would allow for the keyboard manager to be toggled on and off without the need to alt+tab out of games.

A resign-able shortcut key to toggle keyboard manager. This is for those of us out there who game, having an easy to access way to toggle the keyboard from alt setups to default qwerty for WASD would be great. At the moment I need to alt+tab and manually click the feature off and on and it is very cumbersome. I had a previous setup with a custom keyboard and portable keyboard layout, but there was always the odd app that would choose the wrong keyboard, so powertoys is better, but the toggle would be a huge help.
Repository: pytorch
Issue: Source code for some /_modules/.../.../ not displaying on https://pytorch.org/docs/master/_modules/
Labels: module: docs,triaged

## 📚 Documentation

From the module code overview page: https://pytorch.org/docs/master/_modules/ there are some modules whose source code documentation page isn't properly displaying and instead displays the "*Oops! You've reached a dead end*" page. 

e.g. 

* https://pytorch.org/docs/master/_modules/torch/__config__.html
* https://pytorch.org/docs/master/_modules/torch/_jit_internal.html
* https://pytorch.org/docs/master/_modules/torch/_lobpcg.html
* https://pytorch.org/docs/master/_modules/torch/_lowrank.html
* https://pytorch.org/docs/master/_modules/torch/jit/_script.html
* https://pytorch.org/docs/master/_modules/torch/jit/_trace.html

When I build the docs using a local copy of PyTorch however, the HTML files properly build for these pages. 

e.g. for `torch/__config__`

**Locally built:**

<img width="960" alt="locally-built-pytorch-docs" src="https://user-images.githubusercontent.com/54918401/86973415-85804600-c142-11ea-9358-2ebf95152bf8.png">

**Public page on PyTorch website:**

<img width="1044" alt="public-pytorch-docs" src="https://user-images.githubusercontent.com/54918401/86973452-9335cb80-c142-11ea-8c88-0d39b1ba636c.png">


<!-- A clear and concise description of what content in https://pytorch.org/docs is an issue. If this has to do with the general https://pytorch.org website, please file an issue at https://github.com/pytorch/pytorch.github.io/issues/new/choose instead. If this has to do with https://pytorch.org/tutorials, please file an issue at https://github.com/pytorch/tutorials/issues/new -->


cc @jlin27
Repository: pytorch
Issue: eager mode quantization should remove qconfig in the (non-leaf module of) quantized model
Labels: oncall: quantization,low priority,triaged

After eager mode quantization, we find that qconfig are not removed for non-leaf modules, this will affect future function calls to numeric suite etc.

cc @jianyuh @raghuramank100 @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel @jerryzh168 @dzhulgakov
Repository: go
Issue: x/tools/cmd/goyacc: Please add "version" command or flag
Labels: help wanted,NeedsFix,FeatureRequest,Tools

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

```
bash-4.2$ go version
go version go1.12.15 linux/amd64
```

### Does this issue reproduce with the latest release?

Can't tell, see below for details.

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
bash-4.2$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/prow/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/prow/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/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-build991634038=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

Ran `goyacc -version`:

```
bash-4.2$ goyacc -version
flag provided but not defined: -version
```

### What did you expect to see?

I expected a version to be output.

### What did you see instead?

I received an error message.

I'm working on a project that uses `goyacc` to generate files. There are differences in the generated files between versions. Experentially, I can tell that I am using a different version of `goyacc` in my local environment than is being used in my CI container because the output is different, but I have no way to tell what version is being used where because this flag is not defined.

I spent hours today trying to pin down the source of the differences, and which version of `goyacc` I needed to be using in order to get a clean build that matched CI. I ended up needing to use `git bisect` on the `goyacc` tool to determine a known good version. I even tried using `readelf -x` and `strings` on the `goyacc` binary to determine version information, but I could not find anything there.

Please consider adding a `-version` flag to the `goyacc` tool so it is clear and easy to determine differences in output between different versions of the tool. Thank you!
Repository: rust
Issue: `unused_lifetimes` warning misses unused lifetime
Labels: A-lints,A-lifetimes,T-compiler,C-bug

I discovered an unused lifetime in my code that the compiler didn't tell me about. I was able to reduce the problem to the following snippet.
```rust
#![warn(unused_lifetimes)]

struct Foo<'a>(for<'r> fn(&'r mut Foo<'a>));

impl<'a> Foo<'a> {
    pub fn new() -> Self {
        Self(Self::a)
    }
    
    pub fn a(&mut self) {}
}

fn main() {
    let f = Foo::new();
    drop(f);
}
```

The lifetime 'a is unused, but the compiler doesn't complain at all. I confirmed that it still exists on stable 1.44.1 and on nightly 1.46.0.
Repository: node
Issue: Add a `stream` event for client-side HTTP2 sessions
Labels: http2

**Is your feature request related to a problem? Please describe.**

```js
const http2 = require('http2');
const session = http2.connect('https://google.com');

// Unfortunately there is no API for this.
// It would be very useful for example to catch how many streams are pending in this session.
session.once('stream', stream => {
    console.log('Got stream!');
});

const request = session.request();

session.destroy();
```

**Describe the solution you'd like** Introduce a new `stream` event to HTTP2 client-side sessions, which is emitted on **new requests**. Push streams could be emitted e.g. via `pushStream`.

**Describe alternatives you've considered** None.
Repository: node
Issue: Graceful close for HTTP2 sessions
Labels: help wanted,http2

**Is your feature request related to a problem? Please describe.**

IMO it would be very nice to have `session.gracefullyClose()` so pending streams can be finished but no more streams can be created on this session ~(or closing is canceled when `session.request()` is called)~. I'm developing some sort of a pool (agent?) for `http2`, and I need to gracefully close a session when it becomes a subset of another session.

I do **NOT** want to notify the server because they can reject current streams with `REFUSED_STREAM` which means it hasn't processed the request yet and it is safe to retry. But the request body could have been uploaded in that case.

**Describe the solution you'd like**

See the paragraph above.

**Describe alternatives you've considered** I can implement this on my own, eg. `gracefullyClose(session)`.
Repository: pytorch
Issue: Pytorch.js would be nice!
Labels: feature,triaged

## 🚀 Feature
Tensorflow.js allows tensorflow users to run models in a browser.  They can share models with their friends, and run realtime inference easily.  While ONNX.js exists, I'm finding it doesn't really have a community or any learning resources really except for one youtube video.  The official recommendation is to convert pytorch to onnx to tensorflow to tensorflow.js

It would be nice if we could have just a pytorch.js to convert to.

## Motivation
I would love to create ML applications that people can use just by navigating to a URL, instead of having to install dependencies.

## Pitch

I want to be able to use Pytorch models in the browser

## Alternatives

ONNX.js, I found it to be too confusing, and I couldn't figure out how to make it work with object detection.
Repository: TypeScript
Issue: IntelliSense for generic Promise function shows truncated return type
Labels: Suggestion,Awaiting More Feedback


*TS Template added by @mjbvz*

**TypeScript Version**: 4.0.0-dev.20200702

**Search Terms**
- hover / quick info
- truncation 

---

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 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.46.1 (user setup)
- OS Version: Windows_NT x64 10.0.18363

Steps to Reproduce:

**App.ts:**

```typescript
import { Repro} from "./Repro";

function test()
{
    Repro.repro<number>("test");
}
```

**Repro.ts:**

```typescript
export namespace Repro
{
    export interface Arg { argName: string, argValue: any }

 // export async function repro<T>(AbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyzAbcdefghijkl: string, ...methodArgs: Arg[]): Promise<T> // Working
    export async function repro<T>(AbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyzAbcdefghijklmnopqrstuvwxyzAbcdefghijklX: string, ...methodArgs: Arg[]): Promise<T> // Broken
    {
        return (new Promise<T>(null));
    }
}
```
**Problem:**

In App.ts, hover over the `.repro` function. The IntelliSense shows `repro` as having a return type of `Promise<...>`.  This is incorrect: it should be `Promise<number>`.

Now, in Repro.ts edit the `repro` function by remove the trailing `X` in the first parameter name. Return to App.ts and note that the IntelliSense for `repro` is now correct (the function return type is shown as `Promise<number>`).

While at first glance this may appear to be an edge case due to the long identifier name, it is not.  I ran into this problem with "normal length" parameters, but the example above was the simplest repro I could find. Here's the signature of the function where I originally saw the problem:

```typescript
export async function postForkAsync<T>(destinationInstance: string, methodName: string, methodVersion: number, errorTemplate: string = null, resultTimeoutInMs: number = -1, ...methodArgs: PostMethodArg[]): Promise<T>
```

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes
Repository: excalidraw
Issue: Add ability to add a point on either side of a linear element
Labels: enhancement

I thought this was already in place, but I can't make it work:

I expect that if I select a "starting" point, then press "alt", I should be able to "prepend" points to the line. But it seems that I can only add points to the end.

<img width="401" alt="Screen Shot 2020-07-08 at 21 19 07" src="https://user-images.githubusercontent.com/1473433/86996547-d0a95180-c160-11ea-9342-365defb3c57f.png">
Repository: excalidraw
Issue: Double click should pass through selected forefront objects for editing
Labels: bug

Not 100% sure but it feels like this should be changed.

Steps to repro:

1. Create a text
2. Create a rectangle over it
3. Deselect all
4. Double click on the text
5. You will enter edit mode for the text (good)
6. Now select the rectangle
7. Again double click on the text
8. This time you will create a new text element

Step 4 and what I would expect at step 7:

<img width="337" alt="Screen Shot 2020-07-08 at 21 30 28" src="https://user-images.githubusercontent.com/1473433/86997149-419d3900-c162-11ea-9a1d-c3bb3033737c.png">

Current step 8:

<img width="362" alt="Screen Shot 2020-07-08 at 21 31 57" src="https://user-images.githubusercontent.com/1473433/86997234-76a98b80-c162-11ea-9d4c-75d4e520fc76.png">

A different solution that would also work "for me" (in the situation I was running into) is to consider "transparent" shapes as really only occupying their border (and therefore their z index wouldn't matter).