sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Different behavior when declare property or method in a class about covariance
Labels: Docs

**TypeScript Version:**  4.1.2

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** In [ts doc - type compatibility](https://www.typescriptlang.org/docs/handbook/type-compatibility.html#function-parameter-bivariance), it seems like not mentioned about this.

**Code**

```ts
class M1 {
  c: number = 1;
}

export class M2 extends M1 {
  a: number = 1;
}

type Func<M extends M1> = (m: M) => number;

interface IFunc<M extends M1> {
  func1?: Func<M>,
  func2: Func<M>,
}

class R1<M extends M1 = M1> implements IFunc<M> {
  // when delete this property, it will be no error.
  public func1 = (m: M) => {
    return m.c
  }

  public func2(m: M) {
    return m.c
  };
}

type IRConstructor<M extends M1, R extends R1<M>> = new () => R;

export class R2 extends R1<M2> {
}

type A = IRConstructor<M1, R1>;

let a1: A = R2; // error: Type 'typeof R2' is not assignable to type 'IRConstructor<M1, R1<M1>>'.

console.log(a1);
```

**Expected behavior:**

Should declare a property or a method in class has same behavior? I'm not sure...

Actually I want to know how can I make these code without error when I have to use functional property.

**Actual behavior:**

When you just decalre a method which is compatible with `IFunc<M1>`, it will be fine. But when you declare a functional property which is compatible with `IFunc<M1>`, it will be an error.

**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->

Or, you can see [playground](https://www.typescriptlang.org/play?#code/MYGwhgzhAECyCM0DeAoa1gC5oDsCuAtgEYCmATtALzTwDcKAviiiQB4AOA9mQC4bhQ4AJmhseJHABMYCZGmhhs+YuSo16TFDwCe7EtABieHMAA8sUa3FSZ8AHxqAFAWywAlFQfLSZeigCWOOJkAGZgwPoAkkYm5pbW0nD2cughxsDwAPzYMWawdgA08mkmQjnp5oWMzKCQMABK8HFiEomy1AgO-gTsICQEEjww0RX5KdAA9BPQAO4AFhLQkiR94tA8c-4w7GScerzaBdD+fDP+ICDQpLicomS7ZAB08ux4RCD+wNAlGU4ucB5KA5UOh0GQSDw8GQcNACI9gPJNOhXu9Pt90kJnK4PCDQeDIdDYfDERpmDo9NBIvUAMKcHAQHhkPDAHjcZpWVq2I71eKc6CNSoOag4EgzaCOQEOep+NhcXj8Or8kQtGz8pqwITA6paXT6ACCaiptPpjOZrLI5ng3PsflWCng2AN1HqQj8wDpEE4fUeIE4AHNHGB4G5aEA)

**Related Issues:** <!-- Did you find other bugs that looked similar? -->
Repository: rust
Issue: Deprecation warning not easily avoidable when using elim form of enum with deprecated field
Labels: A-lints,T-compiler,C-bug,L-deprecated

The code below warns for the use of the deprecated field:

```rs
enum A {
    X{
        #[deprecated(
            since = "0.0.1",
            note = "Don't use this")]
        x: u32
      }
}

fn takeA(a: A) {
    match a {
        A::X{x} => (),
    }
}
```

```
warning: use of deprecated field `A::X::x`: Don't use this
  --> src/lib.rs:13:14
   |
13 |         A::X{x} => (),
   |              ^
   |
   = note: `#[warn(deprecated)]` on by default
```

But I don't see a good way to avoid the warning. I tried matching with `A::X{x: _}`, but that emits the same warning. If I omit the field entirely,  I get an error because the pattern fails to mention field 'x'. If I use `A::X{..}`, that works, but it applies to all remaining fields, not just x. I want to get an error if, in the future, a new field is added to the enum and I need to consider adding that field to my case.

My suggestion would be to make matching with `A::X{x: _}` suppress the warning.
Repository: electron
Issue: Feature: Text Field in MenuItem
Labels: enhancement :sparkles:

<!--  As an open source project with a dedicated but small maintainer team, it can sometimes take a long time for issues to be addressed so please be patient and we will get back to you as soon as we can.
-->

### Preflight Checklist
<!-- Please ensure you've completed the following steps by replacing [ ] with [x]-->

* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

### Problem Description

I'd like the ability to add a text field to a menu item.

### Proposed Solution

I unfortunately lack the knowledge to propose a solution. 

### Alternatives Considered

I did look into the documentation and searched for any alternative solutions, hacks, or workaround but came up empty.

### Additional Information

I've been investigating the limits of the Menu rendering ability of Electron recently, and stumbled across this project, written in Swift https://github.com/p0deje/Maccy. The project uses an `NSTextField` to render a textbox within a menu item. It's quite elegant for that kind of application. And so I did some due diligence on the webs to see if Electron supported anything of the sort. I couldn't find anything similar, so here we are.
Repository: godot
Issue: ScrollContainer follow focus not properly following focused control.
Labels: bug,topic:gui

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if using non-official build. -->
Godot 3.2.3
Godot 3.2.4 beta 4

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->
Windows 10 64-bit (GLES2)

**Issue description:**
<!-- What happened, and what was expected. -->
It follow scroll correctly if it scroll right but it fail when scroll to left.
Just look at this gif:
![FocusBug](https://user-images.githubusercontent.com/8875839/102460571-c5e0da00-4079-11eb-992f-0af190757327.gif)
Follow focus should be working for both left and right scroll.

**Steps to reproduce:**
Download project below.
Open Project.
Open and Run Scene ScrollFocusBug.tscn

**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
[BugsCollection.zip](https://github.com/godotengine/godot/files/5707866/BugsCollection.zip)
Repository: excalidraw
Issue: Separate Excalidraw canvas from application UI
Labels: enhancement,package:excalidraw

This would make embedding much more powerful, and let me incorporate my own UI if I wanted to.

For instance, I want to incorporate exaclidraw in my app, but limited to only certain tools, and would like to use my own UI for tool selection.

If this is something that excalidraw thinks would be a useful addition, I would be willing to work on this.

Possible APIs:

Controlled component.
```
<Excalidraw ui={ExcalidrawDefaultUi} defaultUiProps={{
  tool: "pencil",
  canvasBackgroundColor: "black",
  strokeColor: "white",
}}>
```
... or however you specify your tool config.

Other APIs might include:

render props:
```
<Excalidraw renderUi={(props) => <ExcalidrawDefaultUi {...props} />} />
```

hooks:
```
<ExcalidrawContextProvider>
  <ExcalidrawCanvas />
  <MyExcalidrawUi />
</ExcalidrawContextProvider>

function MyExcalidrawUi() {
  const uiControls = useExcalidrawUi()

  return <div>
    <button style={{fontWeight: uiControls.currentTool === "pencil" ? "bold" : "normal"}} onClick={() => uiControls.setTool("pencil")} >Pencil</button>
    <button style={{fontWeight: uiControls.currentTool === "rect" ? "bold" : "normal"}} onClick={() => uiControls.setTool("rect")} >Rectangle</button>
  </div>
}
```
Repository: ant-design
Issue: Carousel当slidesToShow数量与实际item数量相同时，部分item的点击事件丢失。
Labels: 🐛 Bug,Inactive

- [ ] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/jiben-antd494-forked-miq4k)

### Steps to reproduce
通过点击next（>>），触发激活第三个元素的时候，前两个item元素绑定的click事件丢失。当循环激活第一个元素的时候，click事件恢复。以此类推。
总结：当激活哪个元素，哪个元素之前的点击事件丢失。

### What is expected?
不可丢失点击事件

### What is actually happening?
激活元素之前的元素，点击事件丢失

| Environment | Info |
|---|---|
| antd | 4.9.3 |
| React | 16.14.0 |
| System | windows |
| Browser | chrome78.0.3904.108 |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: electron
Issue: geometry functions should be more consistent
Labels: enhancement :sparkles:

<!--  As an open source project with a dedicated but small maintainer team, it can sometimes take a long time for issues to be addressed so please be patient and we will get back to you as soon as we can.
-->

### Preflight Checklist
<!-- Please ensure you've completed the following steps by replacing [ ] with [x]-->

* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

## Problem Description
<!-- Is your feature request related to a problem? Please add a clear and concise description of what the problem is. -->
Several similar geometry functions used in the main process are inconsistent with each other

### Examples for size:
```
win.getSize()
```
returns an array with index 0 equal to width and index 1 equal to height
```
display.workAreaSize
```
returns a size object with a "width" and "height property
```
win.setSize()
```
uses 2 separate arguments for width and height instead of a single argument looking for an array (`win.getSize()`) or object (`display.workAreaSize`)

### Examples for points:
```
win.getPosition()
```
returns an array with index 0 equal to x and index 1 equal to y
```
display.bounds
```
returns a rectangle object with an "x" and "y" property along with a "width" and "height" property
```
win.setPosition()
```
uses 2 separate arguments for x and y instead of a single argument looking for an array (`win.getPosition()`) or object (`display.bounds`)
```
screen.getDisplayNearestPoint()
```
uses a single point object with properties "x" and "y" as the sole argument

## Proposed Solution
<!-- Describe the solution you'd like in a clear and concise manner -->
The `size` and `point` objects are "friendlier to the eye"

also

`win.getSize()` (_and several other geometry functions that return integer arrays_) lack documentation specifying the order that width and height/x and y are in

I'd recommend changing these functions to work with `size`, `point`, and `rectangle` objects instead
Repository: go
Issue: cmd/cgo: msvc created dll can be linked with cgo but executable fails with "The procedure entry point AddVectoredExceptionHandler could not be located"
Labels: OS-Windows,NeedsInvestigation

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.15.6 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=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/philipp/.cache/go-build"
GOENV="/home/philipp/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/philipp/go/pkg/mod"
GONOPROXY=""
GOOS="linux"
GOPATH="/home/philipp/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=""
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-build125405181=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

- I build a 64bit dll which exports C and C++ symbols using Visual Studio. Sources used: http://www.mingw.org/wiki/sampledll
- I linked it with cgo into a go executable `GOARCH=amd64 GOOS=windows CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc go build -o cgotest.exe main.go` with this trival main.go
``` go
package main

/*
#cgo LDFLAGS: -L. -lsample

#include "sample.h"
*/
import (
	"C"
)

func main() {
	world := C.CString("World")
	C.hello(world)
	C.Double(2)
}
```
- I put cgotest.exe together with the sample.dll on a Windows box and run it.

### What did you expect to see?

Hello World

### What did you see instead?

A messagebox containing this text:
```
---------------------------
cgotest.exe - Entry Point Not Found
---------------------------
The procedure entry point AddVectoredExceptionHandler could not be located in the dynamic link library D:\tmp\cgotest.exe. 
---------------------------
OK   
---------------------------
```
Repository: vscode
Issue: Offer to open a workspace from empty explorer
Labels: feature-request,file-explorer,workbench-multiroot

The empty explorer currently looks like this:

![image](https://user-images.githubusercontent.com/900690/102483321-d63a8a00-4064-11eb-9c80-5154207bec69.png)

I see how we want to save space and not show a "Open Workspace" button below the "Open Folder" button, but I think we could maybe leverage @sandy081 work and show a button with a dropdown?

The way this could work is:
* if you just click the button it is as today "Open Folder"
* if you click the dropdown next to it, you can also pick "Open Workspace"

If we go down this path I would think the wording should also be tweaked ("You have not yet opened a folder or workspace").

The UI component I am referring to is this:

![image](https://user-images.githubusercontent.com/900690/102483541-2fa2b900-4065-11eb-91b0-eac0b8773032.png)
Repository: godot
Issue: Shader uniforms has null as default value
Labels: bug,confirmed,topic:shaders

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if using non-official build. -->
3.2.4 beta4

**Steps to reproduce:**
1. Create a 2D node with shader material
2. Paste this code
```
shader_type canvas_item;

uniform mat4 test;
```
3. Save the scene
4. Open the tscn in a text editor
5.
```
[sub_resource type="ShaderMaterial" id=2]
shader = SubResource( 1 )
shader_param/test = null
```
Repository: rust
Issue: i686 GNU/Linux, seg-fault on executing rust tool-chain binaries
Labels: C-bug,O-x86_32,S-needs-repro

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

When I am running following, 
`$rustc`
I see **Segmentation fault.** The same happens with other binaries as well.

This is the output of `uname -a` from this linux box:
`Linux suse-13-2-rajput 3.9.2-51 #1 SMP PREEMPT Mon Jan 1 00:00:00 UTC 2007 i686 i686 i386 GNU/Linux`

I have added output of /proc/cpuinfo as cpuinfo.txt
[cpuinfo.txt](https://github.com/rust-lang/rust/files/5709331/cpuinfo.txt)

The binaries execute fine, if I run with `strace` or `valgrind`.
This is how, I was able to install `rustup` on this system, as `rustup-init` was also seg-faulting.

Please let me know, what I can do more to investigate.
Repository: electron
Issue: No preflight requests when intercepting stream protocol for HTTP.  
Labels: platform/windows,platform/macOS,component/protocol,bug :beetle:,status/confirmed,11-x-y

### Preflight Checklist
* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

### Issue Details

* **Electron Version:**
  * 11.03
* **Operating System:**
  * Windows/MacOS
* **Last Known Working Electron version:**
  * 7.3.2

### Problem description
When using version 7.3.2 and intercepting stream protocol for HTTP scheme the interception handler received CORS preflight 
request (with method `OPTIONS`) to execute and then acted accordingly to provided response - either blocked the request or interception handler received the actual request to execute. After upgrade to newer version of Electron: 11.0.3, there is no CORS validation and the interception handler receives only the actual request to perform. 

I tried to debug what causes this different behaviour and it appears that this is caused by this change in Chromium: https://github.com/chromium/chromium/commit/70bddadf50a14254072cf7ca0bcf83e4331a7d4f#diff-6607a09d15d15cb718b5dd22500f8e0942a899fdca552202438c7d86e4fc3a82R212
The field `out_of_blink_cors_` is now always set to `true` and then in: https://github.com/chromium/chromium/blob/87.0.4280.88/third_party/blink/renderer/core/loader/threadable_loader.cc#L331
the code falls into `LoadRequest` branch instead of `MakeCrossOriginAccessRequest` as it did on version 7.3.2 with older Chromium.
Repository: opencv
Issue: opencv can still read Orientation of my image, The EXIF of this image has been deleted!
Labels: question (invalid tracker)

##### System information (version)
- OpenCV => 4.2.0.32
- Operating System / Platform => macos
- Compiler => python3.7

##### Detailed description

opencv can still read Orientation of my image,
The EXIF of this image has been deleted!
![iTJ147xqO5QhoYf](https://i.loli.net/2020/12/17/iTJ147xqO5QhoYf.png)
##### Steps to reproduce

```python
from io import BytesIO

import cv2
import numpy as np
from PIL import Image

with open('test.jpg', 'rb') as f:
    image_binary = f.read()

with Image.open(BytesIO(image_binary)) as image:
    w, h = image.size
print(w, h)

img = np.frombuffer(image_binary, dtype='uint8')
# image_np = cv2.imdecode(img, cv2.IMREAD_COLOR | cv2.IMREAD_IGNORE_ORIENTATION)
image_np = cv2.imdecode(img, cv2.IMREAD_COLOR)

h, w = image_np.shape[0], image_np.shape[1]
print(w, h)

```
```
640 480
480 640
```

how could opencv read this orientation?

##### Issue submission checklist

 - [ ] I report the issue, it's not a question
   <!--
   OpenCV team works with answers.opencv.org, Stack Overflow and other communities
   to discuss problems. Tickets with question without real issue statement will be
   closed.
   -->
 - [x] I checked the problem with documentation, FAQ, open issues,
       answers.opencv.org, Stack Overflow, etc and have not found solution
   <!--
   Places to check:
   * OpenCV documentation: https://docs.opencv.org
   * FAQ page: https://github.com/opencv/opencv/wiki/FAQ
   * OpenCV forum: https://answers.opencv.org
   * OpenCV issue tracker: https://github.com/opencv/opencv/issues?q=is%3Aissue
   * Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
   -->
 - [ ] I updated to latest OpenCV version and the issue is still there
   <!--
   master branch for OpenCV 4.x and 3.4 branch for OpenCV 3.x releases.
   OpenCV team supports only latest release for each branch.
   The ticket is closed, if the problem is not reproduced with modern version.
   -->
 - [ ] There is reproducer code and related data files: videos, images, onnx, etc
   <!--
   The best reproducer -- test case for OpenCV that we can add to the library.
   Recommendations for media files and binary files:
   * Try to reproduce the issue with images and videos in opencv_extra repository
     to reduce attachment size
   * Use PNG for images, if you report some CV related bug, but not image reader
     issue
   * Attach the image as archive to the ticket, if you report some reader issue.
     Image hosting services compress images and it breaks the repro code.
   * Provide ONNX file for some public model or ONNX file with with random weights,
     if you report ONNX parsing or handling issue. Architecture details diagram
     from netron tool can be very useful too. See https://lutzroeder.github.io/netron/
   -->
Repository: next.js
Issue: Module not found: Can't resolve 'react' when importing local library with React as peerDependency
Labels: bug

<!-- NOTE: This template is not optional. If you remove it or leave out sections there is a high likelihood it will be moved to the GitHub Discussions "Help" section -->

# Bug report

## Describe the bug

So I often develop libraries locally with React as a peer dependency. This, however, apparently doesn't work with next.js out of the box or I guess I am supposed to do some additional plumbing to get it to work?

I assume because this works with normal React apps that this isn't a standard behavior or it should at least be well-documented. It is not nice to spend hours fixing these types of bugs. Part of the reason could be my rollup configuration for the local-module yet it baffles what I should do to fix it.

There has been some similar previous discussion #1244 #3841 yet none seem to provide a satisfying answer what is happening.

## To Reproduce

https://github.com/TeemuKoivisto/nextjs-react-not-found

## Expected behavior

I expect next.js to find the local-module as it can apparently do it quite well if the library is inside the nextjs-app folder.

## Screenshots

![React not found](https://github.com/TeemuKoivisto/nextjs-react-not-found/blob/master/nextjs-react-not-found.png?raw=true "React not found")

## System information

- OS: [macOS catalina]
- Version of Next.js: [10.0.3]
- Version of Node.js: [v10.16.0]
- Deployment: [local]

## Additional context
Repository: neovim
Issue: Spellsuggest=fast is still slow when using more than 1 language
Labels: bug,spell,needs:vim-patch

<!-- Before reporting: search existing issues and check the FAQ. -->

- `nvim --version`: NVIM v0.4.4
- `vim -u DEFAULTS` (version: 8.2.2050) works as it should, i.e. it is noticeably faster when using spellsuggest=fast, even with multiple spelllang configured. 
- Operating system/version: macOS 10.15.7 Catalina
- Terminal name/version: iTerm2 3.4.3
- `$TERM`: tmux-256color or xterm-256color (happens in both)

### Steps to reproduce using `nvim -u NORC`
1. In terminal make an example file
   ```terminal
   nvim -u NORC foo.txt
   ```
2. Run the following commands for my spell settings
   ```vim
   set spell spelllang=en,it
   set spellsuggest=fast
   ```
3. Write something that should be corrected by spell, like "eachother" (should be "each other")
4. Move cursor to the incorrect word, it should be highlighted. Type `z=` to trigger spellsuggest.
5. Notice the slowness

### Actual behaviour

Running `z=` on a misspelled word when `spellsuggest=fast` is slow, just as slow as `spellsuggest=best`

### Expected behaviour

Running `z=` on a misspelled word when `spellsuggest=fast` should be fast, faster than `spellsuggest=best`