sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: Extension Development: ensure package.json contributions match the implementation
Labels: feature-request,under-discussion,extensions-development

<!-- ⚠️⚠️ 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. -->
When developing extensions for VS Code, a lot of string keys are used. These keys are usually defined in the contribution section of a `package.json` and must match the keys used in the code to register the implementation. It is very easy to rename one part and forgetting the other.

# Example
*package.json*
```json
...
"activationEvents": [
	"onCustomEditor:hediet.vscode-drawio"
],
"contributes": {
	"customEditors": [
		{
			"viewType": "hediet.vscode-drawio",
			...
		},
	],
}
```

*extension.ts*
```ts
vscode.window.registerCustomEditorProvider2(
	"hediet.vscode-drawio",
	new DrawioEditorProvider(server),
	{
		supportsMultipleEditorsPerDocument: false,
		webviewOptions: { retainContextWhenHidden: true },
	}
)
```

# Problem
All `hediet.vscode-drawio` strings have to match. This is also the case when declaring config properties. I managed multiple times now to rename one or two of them and forgetting about the others. This caused preventable bugs.

# Solution
It would be really great if this could be improved. I have two ideas for that:
1) Implementing lint rules that check that those keys align. This would include a check that all `viewType`s used in the code must be mentioned in the package.json.
2) Specifying all contributions with typescript and updating `package.json` automatically on each build.

The last idea could look like this:
*contributions.ts*
```ts
const myCustomEditorViewTypeId = new vscode.ViewTypeId("hediet.vscode-drawio");
const myConfigProperty = new vscode.ConfigProperty<string>("hediet.vscode-drawio.my-property", { type: "string" });
export const contributions = new vscode.Contributions({   
   customEditors: [{ viewTypeId: myCustomEditorViewTypeId }],
   configurations: [{ property: myConfigProperty }]
});
```

# Discussion
I really like 2) since it would also enable type safe config properties, go to definition and other features provided by the great tooling around TypeScript.
However, I don't see good ways to automatically update/generate a package.json on each build.

What do you think?
Repository: rust
Issue: trait and struct functions conflicts resolving inconsistence
Labels: C-enhancement,A-diagnostics,T-compiler,A-inference,A-suggestion-diagnostics

consider the first example:
```rust
pub struct Test;

impl Test {
    pub fn say_hi(&self) {
        println!("hi from struct");
    }
}

impl TTest for Test {}

pub trait TTest {
    fn say_hi(&mut self) {
        println!("hi from trait");
    }
}

fn main() {
    let t = Test;
    t.say_hi();
    // hi from struct 
}
```

This works fine, by default if we didn't use syntax like `TTest::say_hi(&t)` it uses struct's method.

consider the second example which didn't work as expected:

```rust
pub struct Test;

impl Test {
    pub fn say_hi(&mut self) {
        println!("hi from struct");
    }
}

impl TTest for Test {}

pub trait TTest {
    fn say_hi(&self) {
        println!("hi from trait");
    }
}

fn main() {
    let mut t = Test;
    t.say_hi();
    // hi from trai
}
```

This won't work, it called trait's method and gave a warning `warning: variable does not need to be mutable
` while it should call just struct's method
Repository: pytorch
Issue: Loops are very slow compared to tensorflow
Labels: triage review,oncall: jit

## 🐛 Bug
<!-- A clear and concise description of what the bug is. -->
Having loops in PyTorch are very expensive especially if the data of the last iteration is needed for the next one. TF is about 8 to 10 times as fast. This affects mainly CUDA execution but also the CPU performance is worse by a factor ~3.

## To Reproduce
PyTorch:
```python
import torch
print(torch.__version__)  # My output: 1.4.0
torch.set_default_tensor_type('torch.cuda.FloatTensor')

def torch_loop_test():
    x = torch.rand(50)
    eps = torch.finfo(x.dtype).eps
    for _ in range(100):
        x_new = torch.rand(50)
        alpha = x/(x_new + eps)
        mask = alpha > torch.rand(1)
        x = torch.where(mask, x_new, x)
    return x

s0 = torch.cuda.Event(enable_timing=True)
s1 = torch.cuda.Event(enable_timing=True)
s0.record()
for _ in range(100):
    torch_loop_test()
s1.record()
torch.cuda.synchronize()
print('Elapsed seconds:', s0.elapsed_time(s1)/1000)  # My output: Elapsed seconds: 2.923428466796875
```

Tensorflow:
```python
import tensorflow as tf
tf.__version__  # My output: 2.2.0

@tf.function
def tf_loop_test():
    x = tf.random.uniform((50,))
    eps = 1e-6
    for _ in range(100):
        x_new = tf.random.uniform((50,))
        alpha = x/(x_new + eps)
        mask = alpha > tf.random.uniform((1,))
        x = tf.where(mask, x_new, x)
    return x
_ = tf_loop_test() # Compile the function

start = tf.timestamp()
with tf.device('/GPU:0'):
    for _ in range(100):
        tf_loop_test()
end = tf.timestamp()
print('Elapsed seconds:', (end - start).numpy())  # My output: Elapsed seconds: 0.3535001277923584
```
## Expected behavior
Performance equivalent to tensorflow would be desired.

## Environment
 - PyTorch Version (e.g., 1.0): 1.4
 - OS (e.g., Linux): Windows 10 64bit
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Python version: 3.7.6
 - CUDA/cuDNN version: 10.1 update 2
 - GPU models and configuration: RTX 207ß
 - Any other relevant information:

## Additional context
<!-- Add any other context about the problem here. -->


cc @suo
Repository: tensorflow
Issue: Java Module support
Labels: stat:awaiting tensorflower,type:feature,type:build/install

**Describe the problem**
Applications using Java9+ benefit from libraries have Java Module (JPMS) support. This comes in two stages:

1. Ideally, add `module-info.java` to the library. Either publish a separate artifact for Java9+ or simply add `META-INF/versions/9/module-info.class` to support both versions simultaneously (multi-release jar)
2. If the library has split packages, you cannot add `module-info.java` yet in which case you can simply add `Automatic-Module-Name` to the manifest file and begin resolving the split package issue.

* Multi-release JARs
  * https://openjdk.java.net/jeps/238
  * https://blog.codefx.org/tools/multi-release-jars-multiple-java-versions/
Repository: godot
Issue: Controls in viewport showing I-beam cursor and usable under blocking control
Labels: topic:gui

**Godot version:**

3.2.1

**OS/device including version:**

Ubuntu 20.04

**Issue description:**

Normally, if i have an edit under a panel it will not show caret... but if edit in viewport caret shows through?
A button too is clickable while in viewport under panel?

**Steps to reproduce:**

1. New scene, edit under panel. Notice that when run the mouse cursor does not change to caret while over the edit
2. New scene, edit in viewport under panel. notice that mouse cursor changes to caret while over edit and can use edit and buttons that are blocked by the control?

**Minimal reproduction project:**

https://github.com/rakkarage/TestViewport

![image](https://user-images.githubusercontent.com/962340/81502305-2f5e6600-92ab-11ea-8c7b-8353dd8862e7.png)
Repository: rust
Issue: Make 'cargo bench' to output iteration counts and other statistics? 
Labels: T-libs-api,C-feature-request,A-libtest

<!-- Thanks for filing a 🙋 feature request 😄! -->

**Describe the problem you are trying to solve**
<!-- A clear and concise description of the problem this feature request is trying to solve. -->
Display results of `cargo bench` currently doesn't give the user any info on
* How many times the benchmark was executed
* standard deviation of execution time among multiple executions

```bash
$ cargo bench
   Compiling sandbox v0.1.0 (C:\Users\joe\rust\sandbox)
    Finished bench [optimized] target(s) in 0.46s
     Running target\release\deps\sandbox-6aee62f1bcca29c3.exe

running 1 test
test tests::bench_pow ... bench:          43 ns/iter (+/- 4)

test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured; 0 filtered out
```

**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->

I think `cargo bench` would be more helpful if it gave us info as below
* How many times the benchmark was executed
* standard deviation of execution time among multiple executions

**Notes**
<!-- Any additional context or information you feel may be relevant to the issue. -->
Is the time printed out from `cargo bench` the **mean** or the **median** ??

Thank you for taking a look 😃
Repository: flutter
Issue: Material DatePicker - contradicting dates should not throw an error
Labels: c: new feature,framework,f: material design,f: date/time picker,c: proposal,a: error message,P3,team-design,triaged-design

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill our the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->



I realized when using the Material DatePicker there is a error when the initialDate is set before the firstDate.
While this makes sence from a logical view, it should not result in a crash report in my opinion.

## Use case
Imagine a user books a reservation for 1 May. The firstTime should alsways be set to date now, because you cannot make a reservation in the past.
Let's assume the reservation is never confirmed, so the user comes back a week later and wants to update the date to 1. June. Opening the datepicker should allow to show the previous selected date (1.May) even though he cannot select it anymore as it is in the past.

## Proposal
Instead crashing when showing the datepicker dialog, maybe return the error as a callback if the dates contradict each other when closing the dialog.
Repository: ant-design
Issue: expose currentDataSource of Table, update when dataSource/filters/sorters are changed by application
Labels: 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?
It allows to perform operations on filtered&sorted data, e.g. export data to file, calculate number of items in table, etc.
The problem is that `currentDataSource `that I receive via `onChange `is not updated when dataSource/filters/sorters are changed by application.

### What does the proposed API look like?
Event prop **`onCurrentDataSourceChanged`**, which should be fired after each calculation of `currentDataSource`, on any related change and initial.
If it is possible, please add it to both 3.* and 4.* versions of Ant Design.


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: nn.Module Abstract Class attribute overrides Child.
Labels: triaged

## 🐛 Bug

I would like to define struts for a class of modules. I include attributes to make it clear that those should exist (purely syntactically). However, these attributes defined on the abstract class overrides the child's attribute with the same name. Is this what I should expect with a neural network module class? With vanilla python classes this does not happen.

## To Reproduce

this does not work with class attributes.

```python
import torch
from torch import nn as nn
from torch_utils import View, Λ


class Metric(nn.Module):
    latent_dim = None
    embed = None
    kernel = None

# child class
class Conv(Metric):
    def __init__(self, input_dim, latent_dim):
        super().__init__()
        self.latent_dim = latent_dim
        self.embed = nn.Sequential(
            nn.Conv2d(input_dim, 32, kernel_size=4, stride=2),
            nn.BatchNorm2d(32),
            nn.ReLU(),
            nn.Conv2d(32, 64, kernel_size=4, stride=2),
            nn.BatchNorm2d(64),
            nn.ReLU(),
            nn.Conv2d(64, 64, kernel_size=4, stride=2),
            nn.BatchNorm2d(64),
            nn.ReLU(),
            nn.Conv2d(64, 32, kernel_size=4, stride=2),
            nn.BatchNorm2d(32),
            nn.ReLU(),
            View(128),
            nn.Linear(128, latent_dim),
        )
        self.kernel = Λ(lambda a, b: (a - b).norm(2, dim=-1))

    def forward(self, x, x_prime):
        return 'blah'

main__:
   net = Conv(...)
   print(net.embed)
```

gives 'None'.
## Expected behavior

I expect it to give `<Sequential Conv.embed of <__main__.Conv object at 0x10fd799b0>>`
Repository: terminal
Issue: Make the Windows menu ("alt spacebar") accessible without a mouse in wsl
Labels: Product-Conhost,Help Wanted,Area-UserInterface,Issue-Task

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.

All good? Then proceed!
-->

# Description of the new feature/enhancement
Make alt+space or an alternative key combination access the Application context menu in a wsl console.
Edit:  This is a feature request for "...the original Windows console host, ...", (which I assume is where the shortcuts are implemented), not the new terminal.
Edit2: In the windows console, ctrl+m activates the select/copy feature and ctrl+f the find menu (danish and english versions). These are only accessible through the "alt+space"-menu (rodent menu) in a WSL session . Adding an alternative to these in Windows Console for WSL would be a super deluxe bonus value productivity enhancement.

*Pressing alt+spacebar opens this menu on common windows apps:*
![AppContextMenu](https://user-images.githubusercontent.com/9413242/81510888-9c0e4a80-9315-11ea-84a0-d07e21538704.png)

<!-- 
A clear and concise description of what the problem is that the new feature would solve.
Describe why and how a user would use this new functionality (if applicable).
-->
In the good old Windows Console/Terminal, as well as most windows app you have access to the (I think it's called?) application context menu, through alt+space without using the mouse. In WSL this does not work. We've got the ctrl+shift+c/v shortcut workarounds to paste/copy. A similar shortcut workaround for alt+space would be much appreciated for those with rodent allergy.

# Proposed technical implementation details (optional)
```
<!-- 
A clear and concise description of what you want to happen.
-->
```
I have no idea how to implement it but I really would like a relief for my carpal tunnel syndrome :-)
Repository: go
Issue: net/http: Client should scope cookie to Request.Host before Request.URL
Labels: NeedsInvestigation

<!--
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`)?

<pre>
$ go version
go version go1.14.2 linux/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes.

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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-build866802505=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?
Created a `httptest.Server` with a handler that sets a cookie, then issued a request from a `http.Client` with a custom `Host` field.

https://play.golang.org/p/78mh9ZwYI_t

### What did you expect to see?
I expected to see the cookie scoped to the Host field.

### What did you see instead?
The cookie was scoped to httptest.Server.URL

---

I was seeing unexpected cookie behavior while testing and I believe this is the root of it:
https://github.com/golang/go/blob/57e32c4fbd4f20d567d1767dfc2d94bec828a8dc/src/net/http/client.go#L170-L186

Instead of the client always using `req.URL` for the cookie jar, I believe it should first look at `req.Host`, then `req.Header.Get("Host")`, and then finally `req.URL`.

I think this would be consistent with the behavior of Request.Write described on the Request struct:
https://github.com/golang/go/blob/57e32c4fbd4f20d567d1767dfc2d94bec828a8dc/src/net/http/request.go#L231-L235
Repository: youtube-dl
Issue: Support for axess.se
Labels: site-support-request

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2020.05.08. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x ] I'm reporting a new site support request
- [x ] I've verified that I'm running youtube-dl version **2020.05.08**
- [x ] I've checked that all provided URLs are alive and playable in a browser
- [x ] I've checked that none of provided URLs violate any copyrights
- [x ] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

- Single video: https://www.axess.se/tv/vodplayer.aspx?vod=9033
- Single video: https://www.axess.se/tv/vodplayer.aspx?vod=10352


## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

The site is currently unsupported. I tried using "inspect element" to find movie link, but they split the videos into many small .ts files.
Repository: go
Issue: cmd/compile: Missed opportunity for post-inlining devirtualization
Labels: Performance,NeedsInvestigation,compiler/runtime

### What version of Go are you using (`go version`)?

<pre>
$ go version
1.14
</pre>

### Does this issue reproduce with the latest release?

Yes

### What operating system and processor architecture are you using (`go env`)?

amd64/linux

### What did you do?

When compiling the following code, there are missed opportunities for devirtualization: https://go.godbolt.org/z/7tPdJK

```go
package main

type funcTable interface {
    Cmp(a interface{}, b interface{}) bool
	MinMax(minVal interface{}, maxVal interface{}, val interface{}) (interface{}, interface{})
}

func Min(table funcTable, a interface{}, b interface{}) interface {} {
    if table.Cmp(a, b) {
        return a
    } else {
        return b
    }
}

func Max(table funcTable, a interface{}, b interface{}) interface {} {
    if table.Cmp(a, b) {
        return b
    } else {
        return a
    }
}

type int32FuncTable struct{}

func (_ int32FuncTable) Cmp(a interface{}, b interface{}) bool {
    return a.(int32) < b.(int32)
}

func (table int32FuncTable) MinMax(minVal interface{}, maxVal interface{}, val interface{}) (interface{}, interface{}) {
    return Min(table, minVal, val), Max(table, maxVal, val)
}
```


### What did you expect to see?

I expected that `in32FuncTable.MinMax` contains no indirect calls: `Min`/`Max` are inlined, and recursively `Cmp` is devirtualized and inlined.

### What did you see instead?

Virtual calls to `Cmp` are emitted in `int32FuncTable_MinMax_pc0`: 

```asm
        movq    go.itab."".int32FuncTable,"".funcTable+24(SB), AX
        // ....
        call    AX
```
Repository: flutter
Issue: [linux] Implement memoryPressure message
Labels: c: new feature,engine,platform-linux,a: desktop,P3,team-linux,triaged-linux

The [`flutter/system`](https://api.flutter.dev/flutter/services/SystemChannels/system-constant.html) has a `memoryPressure` message. Implement this in the Linux shell by connecting it to [GMemoryMonitor](https://developer.gnome.org/gio/unstable/GMemoryMonitor.html).
Repository: rust
Issue: Asymmetric "overflow evaluating the requirement" error with associated type constraint
Labels: A-type-system,P-medium,A-associated-items,T-compiler,regression-from-stable-to-stable,C-bug,T-types

This code gives an error:

```rust
trait Foo {
    type Bar;
}

trait Baz<T: ?Sized + Foo>: Foo<Bar = T::Bar> {}

trait Qux: Baz<Self> {}
```

```
error[E0275]: overflow evaluating the requirement `<Self as Foo>::Bar`
 --> foo.rs:7:1
  |
7 | trait Qux: Baz<Self> {}
  | ^^^^^^^^^^^^^^^^^^^^^^^
```

Yet, moving the constraint to `T` instead of `Self` works fine:

```rust
trait Baz<T: ?Sized + Foo<Bar = <Self as Foo>::Bar>>: Foo {}
```

Since `T = Self` in the context of `Qux`, it's surprising this makes a difference.

### Meta

`rustc --version --verbose`:
```
rustc 1.45.0-nightly (7ebd87a7a 2020-05-08)
```