sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: 3.5 regression: return type forced more restrictive than needed
Labels: Suggestion,Needs Proposal,Domain: Indexed Access Types,Domain: Control Flow

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.5.0-dev.20190508

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** restrictive return type

**Code**

```ts
class Box<A> {
    constructor(public val: A) {}
}

interface ContainerFor<A> {
    array: Array<A>;
    box: Box<A>;
}

function single<T extends keyof ContainerFor<number>>(t: T, x: number): ContainerFor<number>[T] {
    switch (t) {
        case "array":
            return new Array<number>(x);
        case "box":
            return new Box<number>(x);
    }
    return new Box<number>(0); // this should not be needed
}

function test() {
    let t1 = single("array", 42);
    let t2 = single("box", 42);
    //let t3 = single("boo", 42);
}
```

**Expected behavior:**
This code worked with 3.4, but had an unsoundness bug in that `single` was allowed to return the wrong type (swap array and box). It was clear that switching over `t` did not increase knowledge about the expected output type and I was forced to have a fallback return which is of course unreachable. But the code itself worked.

The `test` function also shows things work as expected. The types for `t1` and `t2` are inferred correctly and asking for an unknown thing ("boo") is reported as an error.

I would expect this to still work in 3.5, perhaps fixing one of the issues I'm having in the internals of `single`.

**Actual behavior:**
Typescript 3.5 no longer accepts this code. returning `new Array` or `new Box` are flagged as wrong return types. The newly expected return type is now mandated to be the intersection type: `number[] & Box<number>`, which is too restrictive as the correct output type can be statically determined from `T` in the input. The fact that `test` correctly infers the output type is proof of this.
Repository: flutter
Issue: [web]: Scrolling is very slow when displaying large Text
Labels: engine,c: performance,platform-web,customer: webeap,e: web_html,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-web,triaged-web

## Versions:

Dart VM version: 2.3.0 (Fri May 3 10:32:31 2019 +0200) on "macos_x64"

Flutter 1.5.4-hotfix.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 7a4c33425d (9 days ago) • 2019-04-29 11:05:24 -0700
Engine • revision 52c7a1e849
Tools • Dart 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

## Issue

I was playing with Flutter Web and decided to put a HTTP response body (78KB) into a `Text` element. It causes the app to scroll very, very slowly.

Here's simplified code you can use to reproduce:

```dart
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Padding(
          child: Text("Pull Requests"),
          padding: EdgeInsets.all(5),
        ),
      ),
      body: Center(
        child: ListView(
          children: <Widget>[
            Text(Iterable.generate(10000, (i) => "Hello Flutter $i").join('\n'))
          ],
        ),
      ),
    );
  }
```
Repository: youtube-dl
Issue: Add Support for MQube.net
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 2019.04.30. 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 **2019.04.30**
- [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 audio: https://mqube.net/play/20181228624995
- User: https://mqube.net/user/tsukunesoba


## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

MQube is a Japanese audio-sharing website. Signing in is not required.
Repository: PowerToys
Issue: Manage right-click - Customize context menu
Labels: Idea-New PowerToy,Product-Tweak UI Design,Product-File Explorer

Easily manage the right click actions to edit, open at. Right now this is all over the place, different applications add right-click extensions and it is a mess. You can somehow change the default open application. But it would be great to be able to manage other actions to for example edit e.g Tiff file, HTML file, compile, etc.
Repository: neovim
Issue: MSVC builds of same source are not identical
Labels: platform:windows,distribution,complexity:low,has:plan

I've downloaded the `nvim-win64.zip` file of version 0.3.5 last week (2019-04-29).
I've downloaded the same file today (2019-05-08).

When I check the sha256 sums of the two files, they are different.
When I check the content of the files inside the zips (using FreeFileSync and WinMerge),
it appears that the following files have different contents.
`lua51.dll`, `msgpackc.dll`, `nvim.exe` and `uv.dll`

I have discussed this problem with people on IRC (#nvim).
After several tests, @justinmk advised me to make a diff on the two nvim.exe files.
He also advised me to read this link on StackOverflow : [Deterministic builds unde winwos](https://stackoverflow.com/questions/1180852/deterministic-builds-under-windows/10605862#10605862)

I used the tool advised on the SO post : [peparser](https://github.com/smarttechnologies/peparser).
After running the comparison on the two `nvim.exe` files, it appears that **the two files are "functionally" identical.**
The only differences are due to timestamps and other things produced by the compilation of files.

Here is an extract from `peparser`
```
Ignored offsets:
        offset: 128        size: 4        PE timestamp
        offset: 178        size: 4        PE checksum
        offset: 1c8        size: 8        Digital signature directory entry
        offset: 318334     size: 4        Debugger timestamp
        offset: 318350     size: 4        Debugger timestamp
        offset: 31836c     size: 4        Debugger timestamp
        offset: 318388     size: 4        Debugger timestamp
        offset: 3184a0     size: 3e       PDB section
        offset: 3184a4     size: 10       PDB 7.00 guid
        offset: 3184b4     size: 4        PDB 7.00 age
        offset: 3184b8     size: 25       PDB 7.00 file path

...

Functionally equivalent.

Difference: 0.00% (0 bytes)
```

- `nvim --version`:
```
NVIM v0.3.5
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe /DWIN32 /D_WINDOWS /W3 /MD /Zi /O2 /Ob1 /DNDEBUG -DMIN_LOG_LEVEL=3 /W3 -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -D_WIN32_WINNT=0x0600 -DINCLUDE_GENERATED_DECLARATIONS -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -IC:/projects/neovim/build/config -IC:/projects/neovim/src -IC:/projects/neovim/.deps/usr/include -IC:/projects/neovim/build/src/nvim/auto -IC:/projects/neovim/build/include
Compiled by appveyor@APPVYR-WIN

Features: -acl +iconv -jemalloc +tui 
See ":help feature-compile"

   system vimrc file: "$VIM\sysinit.vim"
  fall-back for $VIM: "C:/Program Files/nvim/share/nvim"

Run :checkhealth for more info
```
- Operating system/version: Windows 10
- Terminal name/version: ConEmu v190331
Repository: PowerToys
Issue: Change size of task bar and alt tab thumbnail previews
Labels: Idea-New PowerToy,Product-Tweak UI Design

My greatest motivation for this is because I'd like the previews of the app windows that you get when you hover over the taskbar or hit alt+tab to be big enough for me to see what's going on in that window without actually clicking on it (for example, to have task manager open behind a maximized window, and let the thumbnail be big enough for me to read what's taking up all my CPU time without bringing task manager in front of that maximized window).  

In Windows 7, there were a lot of "desktop tweaker" programs that altered a reg key that did this for the task bar thumbnails (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband!MinThumbSizePx), but it doesn't work on all machines, and does nothing for max size, and does nothing for alt+tab.
Repository: youtube-dl
Issue: www.myfreecams.com
Labels: site-support-request

## Checklist

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2019.04.30**
- [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

- Single video: https://www.myfreecams.com/#Miss_Marilin
- Single video: https://www.myfreecams.com/#SashaSwan
- Site: https://www.myfreecams.com/

## Description

This site is much like chaturbate
Repository: youtube-dl
Issue: Add support for gounlimited.to
Labels: site-support-request

## Checklist

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2019.04.30**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [ ] 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

- Single video: https://gounlimited.to/embed-tgvof09mkt72.html

## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

Gounlimited is a video hosting platform. Siginin not required
Repository: flutter
Issue: Would be nice to let archives in flutter.cn pre-set the env vars for mirrors
Labels: tool,a: china,c: proposal,customer: countless,P3,team-tool,triaged-tool
Repository: go
Issue: net/http: log ServeContent errors reading from the content during Copy?
Labels: NeedsInvestigation

https://github.com/golang/go/blob/f766b68023c7fa4076d61824d631b3fe2cc697d2/src/net/http/fs.go#L298


func serveContent was used by docker distribution project,I get 'unexpect eof error 'when I pull image for registry server may be related the bad network(just 20mb bandwidth).I can'not find any error in registry server log,it alwayls return response complete and 200 http status code.so i found error in io.CopyN after debug,it just copy only part of entire content due to ceph( the regitry storage backend ) rst the connection(mayby slow network). 

I found same issue in [9709](https://github.com/golang/go/issues/9709 ) ,however ,If it's not worth the cost of adding return error,can add error in ResponseWriter.like this

```
	if r.Method != "HEAD" {
		length, err := io.CopyN(w, sendContent, sendSize)
		if err != nil {
			errDetail := fmt.Sprintf("copy error,Just copy %d of %d", length, sendSize)
			Error(w, errDetail, StatusInternalServerError)
			return
		}
	}
```
Repository: rust
Issue: Wrong Send constraint when using a trait with lifetime + associated type in async
Labels: C-enhancement,A-diagnostics,T-compiler,A-async-await,AsyncAwait-Triaged

**Update: See https://github.com/rust-lang/rust/issues/60658#issuecomment-1509321859 for the latest reproducer**

Minimal:

```rust
#![feature(async_await, await_macro)]

use std::future::Future;

pub trait Foo<'a> {
    type Future: Future<Output = ()>;
    
    fn foo() -> Self::Future;
}

struct MyType<T>;

impl<'a, T> Foo<'a> for MyType<T>
where
    T: Foo<'a>,
    T::Future: Send,
{
    type Future = Box<Future<Output = ()> + Send>;
    
    fn foo() -> Self::Future {
        Box::new(async move {
            await!(T::foo())
        })
    }
}

fn main() {
}
```

Out:

```
   Compiling playground v0.0.1 (/playground)
error[E0308]: mismatched types
  --> src/main.rs:21:9
   |
21 | /         Box::new(async move {
22 | |             await!(T::foo())
23 | |         })
   | |__________^ one type is more general than the other
   |
   = note: expected type `std::marker::Send`
              found type `std::marker::Send`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
error: Could not compile `playground`.

To learn more, run the command again with --verbose.
```

Compiler version: `rustc 1.36.0-nightly (2019-05-07)`
Repository: PowerToys
Issue: Profiles for Network Cards
Labels: Idea-New PowerToy

Could we get Profiles for Network Cards?
Would be great to change from Manual Assigned IP to DHCP with Keyboard Shortcuts or Shortcuts in the Taskbar.
Repository: TypeScript
Issue: Convert to discriminated union
Labels: Suggestion,Awaiting More Feedback,Domain: Refactorings

A refactoring to convert from enums or plain unions to discriminated unions.

<!-- ![convertToTaggedUnionConcept](https://user-images.githubusercontent.com/972891/57433841-542e8200-71ee-11e9-8c27-3609ed51b88a.gif) -->
![convertToTaggedUnionConcept2](https://user-images.githubusercontent.com/972891/57434065-e8004e00-71ee-11e9-93e6-949580de2b6f.gif)
Repository: flutter
Issue: Docset for objective-c/java APIs
Labels: team,framework,engine,d: api docs,a: existing-apps,P3,team-engine,triaged-engine

Like https://github.com/flutter/flutter/issues/9955 but for https://api.flutter.dev/javadoc/ and https://api.flutter.dev/objcdoc
Repository: rust
Issue: HIR printing of `async fn` is broken
Labels: A-pretty,T-compiler,A-HIR,C-bug,A-async-await,AsyncAwait-Triaged

```rust
async fn foo(_: &u8) {}
```

expanded with `rustc --edition 2018 -Z unpretty=hir` yields

```rust
async fn foo<'_>(__arg0: &'_ u8)
 ->
      ::std::future::from_generator(move ||
                                        {
                                            let __arg0 = __arg0;
                                            let _ = __arg0;
                                        })
```

which is not correct. We should drop the `async`, give a return type and print some `{}` around the function body.

cc @cramertj
Repository: PowerToys
Issue: Minimize to tray
Labels: Idea-New PowerToy,Product-Window Manager

Minimize to tray by right clicking the minimize button
Repository: vscode
Issue: Stabilize FileSearchProvider API
Labels: feature-request,api,search,on-testplan,api-proposal,search-api

@roblourens I created this issue in the hope `FileSearchProvider` is going to get finalized at some point. If yes, maybe add the api-finalization label here.

If I'm out of order creating this, or if I've overlooked another issue dealing with its finalization, please close.
Repository: PowerToys
Issue: Apps launch on screen where they were invoked
Labels: Idea-Enhancement,Product-Window Manager

When clicking on a shortcut or Start Menu item in Monitor 1 I'd like it to launch in Monitor 2. Vice-versa for Monitor 2. If we could teach Windows which apps we like in which monitor over time, and any snap-to preferences while in each monitor that would be awesome!
Repository: pytorch
Issue: libtorch+opencv Mat result error: different from the python ones
Labels: module: cpp,triaged

```
#include <torch/script.h> // One-stop header.
#include <iostream>
#include <memory>
#include <string>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace cv;

int main(int argc, const char* argv[]) {
	//加载模型
	string model = "model.pt";
	// Deserialize the ScriptModule from a file using torch::jit::load().
	shared_ptr<torch::jit::script::Module> module = torch::jit::load(model);
	assert(module != nullptr);
	cout << "ok";
	//load 图像
	Mat img=imread("2.jpg");
	resize(img, img, Size(224, 224), (0, 0), (0, 0), INTER_LINEAR);

	img.convertTo(img, CV_32F, 1.0 / 255.0);
	
	torch::TensorOptions option(torch::kFloat32);
	//Mat to Torch
	at::Tensor img_tensor = torch::from_blob(img.data, { 1,img.channels(),img.rows,img.cols }, option);
	//prediction
	at::Tensor result = module->forward({ img_tensor }).toTensor();//result different from python 
	//Torch to Mat
	Mat prediction(Size(img.cols, img.rows), CV_32FC3, result.data_ptr());
	//cout << result;
	//result = result.unsqueeze(0);
	//result.accessor<float, 3>();
	//cout << result;
	
	waitKey(3000);
	return 0;
}
```
![image](https://user-images.githubusercontent.com/34785633/57451266-631b4000-7293-11e9-9766-07e76c330ee4.png)

why there are lines in my results?It's so strange.
 I tested the model.pt in python and it  didnt have such problem.
Could you help me?
thanks very much !
Repository: rust
Issue: Tracking issue for existential lifetimes
Labels: A-type-system,A-lifetimes,T-lang,A-impl-trait,T-types

This is a tracking issue for existential lifetimes.

**Description:**

Allow hiding a type (via `impl Trait`) that is invariant over some lifetime without explicitly mentioning the invariant lifetime.

Consider the following:
```rust
impl Trait<'b> for Cell<&'a u32> { }

fn foo(x: Cell<&'x u32>) -> impl Trait<'y> where 'x: 'y { x }
```

There is no reason this cannot be legal, although it is not permitted at present. We would want to translate the function signature internally into something like:
```rust
fn foo(x: Cell<&'x u32>) -> impl exists<'x: 'y> Trait<'y> where 'x: 'y { x }
```
Although it be noted there is no need for user-facing `exists<...>` syntax; only HIR and `ty` representations probably. The concrete type corresponding to `impl exists<'x: 'y> Trait<'y>` can this be soundly checked by the compiler at use site.

Note, we still need to be careful to ban situations like those mentioned by @matthewjasper in https://github.com/rust-lang/rust/pull/59402. By actually embedding the existential lifetime in the type rather than simply doing a check when resolving the opaque type, we should be able to resolve these issues, however. One can view this solution as a "compiler-internalised" version of [the `Captures` marker trait solution](https://github.com/rust-lang/rust/pull/56047), in some sense.

**Steps:**

- [ ] Decide on exact semantics of existential lifetimes. Perhaps @nikomatsakis can briefly write up his thoughts here.
- [ ] Implement the RFC (cc previous attempts https://github.com/rust-lang/rust/pull/57870 and https://github.com/rust-lang/rust/pull/59402, @nikomatsakis for mentoring instructions?)
- [ ] Stabilization PR ([see instructions on rustc-guide][stabilization-guide])

[stabilization-guide]: https://rust-lang.github.io/rustc-guide/stabilization_guide.html#stabilization-pr
[doc-guide]: https://rust-lang.github.io/rustc-guide/stabilization_guide.html#documentation-prs

CC @Centril @nikomatsakis @matthewjasper @cramertj
Repository: vue-element-admin
Issue: 执行npm install 安装依赖有很多告警
Labels: feature,in plan


## 执行npm install
安装依赖有很多告警

#### Steps to reproduce（问题复现步骤）
```
$ npm install
npm WARN deprecated runjs@4.4.2: This project has been renamed to 'tasksfile'. Install using 'npm install tasksfile' instead.
npm WARN deprecated microcli@1.3.3: This project has been renamed to @pawelgalazka/cli . Install using @pawelgalazka/cli instead
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN deprecated joi@14.3.1: This module has moved and is now available at @hapi/joi. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated microargs@1.1.2: This project has been renamed to @pawelgalazka/cli-args. Install using @pawelgalazka/cli-args instead
npm WARN deprecated hoek@6.1.3: This module has moved and is now available at @hapi/hoek. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated topo@3.0.3: This module has moved and is now available at @hapi/topo. Please update your dependencies as this version is no longer maintained an may contain bugs and security issues.
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated kleur@2.0.2: Please upgrade to kleur@3 or migrate to 'ansi-colors' if you prefer the old syntax. Visit <https://github.com/lukeed/kleur/releases/tag/v3.0.0\> for migration path(s).
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
```

您的项目是否需要更新依赖的版本号？
Repository: PowerToys
Issue: Generate/Verify checksums from file
Labels: Idea-New PowerToy,Status-In progress

Without a additional tool you can´t fastly verfiy files with a checksum. You can only use the cmd:

eg. CMD: 
certutil -hashfile <filename> SHA256

Possible algorithm:
 MD2 MD4 MD5 SHA1 SHA256 SHA384 SHA512

It would be great to have these settings in a new tab "Checksum" by right clicking on a file, where all checksums listed (which can be calculated by certutil) .
 
There should be a field where you can copy in an existing checksum and compare it with the calculated ones. If it matches, the matching hash could be marked.
Repository: pytorch
Issue: Support size to `torch.normal`
Labels: triaged,module: numpy,function request

This would be more consistent with numpy.

```python
torch.normal(0.0, 4.0, size=5)
```

cc @mruberry @rgommers @heitorschueroff
Repository: PowerToys
Issue: Independent virtual desktops per monitor
Labels: Idea-New PowerToy,Product-Virtual Desktop

Yet another virtual desktop request. Currently switching virtual desktops switches windows on all monitors. It would be great to make this independent per monitor.

Eg. I always have Outlook on monitor 1, but want to switch between multiple sets of apps on monitor 2 and 3 without losing whats on monitor 1.

Bonus points if the virtual desktops are all shared so I can cycle through them on each monitor eg 5 virtual desktops, 3 monitors.
Start with:
1=1, 2=2, 3=3
Cycle 3 (to virtual 4):
1=1, 2=2, 3=4
Cycle 2 (to virtual 5):
1=1, 2=5, 3=3
Cycle 3 "down" (to virtual 2):
1=1, 2=5, 3=2