sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Unconstrained generics are incorrectly assignable to _any_ "Partial" type
Labels: Bug

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.4.0-dev.201xxxxx

**Code**

```ts
declare let x: Partial<HTMLElement>;

function f<T>(y: T) {
    x = y;
}

f({ innerHtml: Symbol() }); // this is blatantly incompatible with `HTMLElement`

if (x.innerHTML) {
    x.innerHTML.toLowerCase(); // We just set it to a `symbol` and not a `string`, this will error at runtime
}

```

**Expected behavior:**
An error on `x = y`.

**Actual behavior:**
No error.

[**Playground Link**](http://www.typescriptlang.org/play/#src=declare%20let%20x%3A%20Partial%3CHTMLElement%3E%3B%0D%0A%0D%0Afunction%20f%3CT%3E(y%3A%20T)%20%7B%0D%0A%20%20%20%20x%20%3D%20y%3B%0D%0A%7D%0D%0A%0D%0Af(%7B%20innerHtml%3A%20Symbol()%20%7D)%3B%0D%0A%0D%0Aif%20(x.innerHTML)%20%7B%0D%0A%20%20%20%20x.innerHTML.toLowerCase()%3B%0D%0A%7D%0D%0A)

The root cause is this relationship in `structuredTypeRelatedTo` added way back in [this](https://github.com/Microsoft/TypeScript/pull/26517):

```ts
if (relation !== subtypeRelation && isPartialMappedType(target) && isEmptyObjectType(source)) {
    return Ternary.True;
}
```

This is unsound when `source` is the empty type resulting from the constraint of an unconstrained generic type (which, if changed to `unknown`, catches this issue!). It's unsound when it comes from a constraint at all, actually. Fixing this will break `react-redux`, whose recursive `Shared` type (which we have in our test suite) actually only checks because of this unsoundness.
Repository: scrcpy
Issue: Register as unlock agent
Labels: feature request

Android allows you to disable locking with SmartLock:
- when connected to a WIFI network
- when connect to a bluetooth device
- when phone is at position

So, should be cool to disable locking when scrcpy is running.
Repository: opencv
Issue: Draw lines with transparency x( serveral lines with difference transparency on a color image (not using addWeighted that is slow I have 500 lines) on Color image
Labels: category: imgproc,priority: low

I know there is a addWeighted method. But what I need is draw many lines, every line with different transparency.

Which means, can not using N mask to draw then addWeighted, that too slow speed.

To draw a line on BGR format image:

```
line(img_a, p1, p2, c, 2, CV_AA);
```

It does not add alpha even c is Scalar with alphas.

I convert image from BGR to BGRA with 4 channels, but the line still full with color rather than with transparency.

Any body could help me out with simply what I need?
> serveral lines with difference transparency on a color image (not using addWeighted that is slow I have 500 lines).
Repository: go
Issue: x/tools/analysis/passes/httpresponse: check whether http.Response Body is closed.
Labels: NeedsInvestigation,Tools,Analysis

[httpresponse](https://github.com/golang/tools/tree/master/go/analysis/passes/httpresponse) really helps you to avoid a mistake when using net/http package.
But it only whether your function call of `Body.Close()` is in correct line or not.

So I recently created own linter to check "whether you call `Body.Close()` or not" like the below case.

```
func f() {
	_, err := http.Get("http://example.com/") // want "response body must be closed"
	if err != nil {
		// handle error
	}
    return 
}
```

https://github.com/timakin/bodyclose

After I released, I realized it might be better if an official `httpresponse` supported this workflow.
So, can I contribute to add this feature?
Repository: go
Issue: runtime: stop single goroutine
Labels: NeedsInvestigation,Debugging,compiler/runtime

During debugging it would be useful to resume all goroutines except a single one, as it's the case in other programming languages.

In #25578 we have the request to resume a single goroutine while all others are stopped so this would be the similar/opposite request.

I'm sorry I don't know what else I could put in this request to make it more useful. Feel free to edit it with more details. Thank you.
Repository: go
Issue: cmd/compile: keep variable declaration order in debug_info
Labels: NeedsInvestigation,Debugging,compiler/runtime

Rather than adding `DeclColumn` info to `debug_info`, it would be great to write the variables in the declaration order. This would make it easier to display the variables in a predictable and consistent order while debugging and thus better align with the source code presentation.
Repository: rust
Issue: unreachability warning inconsistently provided with thread spawn
Labels: A-lints

Hi,

`charmander` on `#rust` discussed an interesting issue where unreachability of code was inconsistently reported when threads return `!`.  We reduced it to the following example:

```rust
#![feature(never_type)]

fn run() -> ! {
    loop {}
}
#[allow(dead_code)]
fn spawny<F>(closure: F) -> std::thread::JoinHandle<!>
where
    F: Send + 'static + FnOnce() -> !,
{
    std::thread::spawn(closure)
}

fn main() {
    // This one results in the println!() being marked unreachable
    let handle = spawny(move || run()); 
    // This one does not
    // let handle = std::thread::spawn(move || run());
    let _res = handle.join().unwrap();
    println!("hello, world");
}
```

If the thread is spawned via the `spawny()` function, then `println!()` is marked unreachable, otherwise if spawned via an in-line `std::thread::spawn()` call, it is not.  In both cases `_res` has the type `!`.
Repository: material-ui
Issue: Implement DrawerMenuItem
Labels: new feature,design: material

<!--- Provide a general summary of the feature in the Title above -->
Drawer MenuItem: https://material-components.github.io/material-components-web-catalog/#/component/drawer
Demo: 
https://material-components.github.io/material-components-web-catalog/#/component/drawer
1. The Drawer MenuItem could capture the keyboard event.
2. The Drawer MenuItem show the primary color when selected.
3. The Drawer MenuItem have the rounded shape.
4. The Drawer MenuItem Text is highlighted with darker primary color.


Shape: https://material.io/design/shape/about-shape.html#shape-customization-tool
1. Shape could apply to small, medium and large components.
2. This could be easily done by providing HOC or something else to change the root classes radius, but this is not easy for TextField, especially Outlined TextField and Filled TextFIeld.

<!--
    Thank you very much for contributing to Material-UI by creating an issue! ❤️
    To avoid duplicate issues we ask you to check off the following list.
-->

<!-- Checked checkbox should look like this: [x] -->
- [x] This is not a v0.x issue. <!-- (v0.x is no longer maintained) -->
- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Benchmark

- https://vuetifyjs.com/en/components/lists/
- https://ant.design/components/menu/#header
Repository: godot
Issue: AnimationPlayer not emiting animation_finished for queued animations
Labels: discussion,topic:core

**Godot version:**
3.1.stable.official

**OS/device including version:**
Windows 10

**Issue description:**
When several animations are queued in an AnimationPlayer, signal `animation_finished` is not emited when changing between animations, but `animation_started` is.

![image](https://user-images.githubusercontent.com/778778/55233045-9942ba00-5227-11e9-9ca0-c1f092726c47.png)

Both signals (`animation_started` an `animation_finished`) provides the animation name, but behave different as the first one is called for each individual animation, but the second doesn't. I think they both should be called for each animation, and maybe include two new signal to indicate the global/queue start and end.

Note: Tween class has `tween_started` and `tween_completed` signals, and emits them for each individual "animation".

**Minimal reproduction project:**
[Test.zip](https://github.com/godotengine/godot/files/3022638/Test.zip)
Repository: react
Issue: Profiler marks
Labels: Type: Enhancement,Component: Developer Tools,React Core Team

Can we expose a lighter weight set of Performance "marks" for people consuming browser Performance tracing? e.g. when a particular `Profiler` commits. This should be a lot less heavyweight than the full mark-and-measure stuff.
Repository: go
Issue: x/tools/gopls: implement rangeFormatting LSP request
Labels: help wanted,FeatureRequest,gopls

<!-- Please answer these questions before submitting your issue. Thanks! -->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.12.4 linux/amd64
$ go list -m golang.org/x/tools
golang.org/x/tools v0.0.0-20190428024724-550556f78a90
</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
GOARCH="amd64"
GOBIN="/home/myitcv/gostuff/src/github.com/myitcv/govim/.bin"
GOCACHE="/home/myitcv/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/myitcv/gostuff"
GOPROXY=""
GORACE=""
GOROOT="/home/myitcv/gos"
GOTMPDIR=""
GOTOOLDIR="/home/myitcv/gos/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/myitcv/gostuff/src/github.com/myitcv/govim/go.mod"
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-build120717318=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

Considering the following [`govim`](https://github.com/myitcv/govim/tree/master/cmd/govim) [`testscript`](https://godoc.org/github.com/rogpeppe/go-internal/testscript) in which I attempt to range-format line numbers 3-5 (inc) in `main.go`:

```
vim ex 'e main.go'
vim ex '3,5GOVIMGoFmt'
vim ex 'noautocmd w'
cmp main.go main.go.golden

-- go.mod --
module mod

-- main.go --
package main

func main(){
fmt.Println("Hello, world")
}
-- main.go.golden --
package main

func main() {
	fmt.Println("Hello, world")
}
```

I get the error:

```
ToUTF16Column: point is missing offset
```

The params sent were:

```
&protocol.DocumentRangeFormattingParams{
    TextDocument: protocol.TextDocumentIdentifier{URI:"file://$WORK/main.go"},
    Range:        protocol.Range{
        Start: protocol.Position{Line:2, Character:0},
        End:   protocol.Position{Line:5, Character:0},
    },
    Options: protocol.FormattingOptions{},
}
```

### What did you expect to see?

No error.

### What did you see instead?

The above error.

cc @stamblerre @ianthehat
Repository: vscode
Issue: Task input parameters from showOpenDialog
Labels: feature-request,api,tasks

It sure would be helpful if the task and launch input pickers implemented by #4758 were expanded to include one that wrapped the [`window.showOpenDialog` API](https://code.visualstudio.com/api/references/vscode-api#window) with its options for file vs. folder and filtering.


The [`window.showOpenDialog` API](https://code.visualstudio.com/api/references/vscode-api#window) offers to _extension authors_ the ability to offer the user a dialog to select a file (optionally with an extension filter) or a folder.

The feature available to _users_ is to be able to define  [input variables](https://code.visualstudio.com/docs/editor/variables-reference#_input-variables) for usage as task parameters. This user-facing feature only offers the ability to either select between preset strings (`pickString`) or accept a manually-typed input string (`promptString`), but offers no ability to present the user with a file or folder selection dialog.

This feature could be very helpful for users as well, not just extension authors. For example, I want to debug a program that supports command-line parameters for input files or directories, and I'd rather prompt the user to provide them differently for each session, than to have them hard-coded in a shared project tasks file.
Repository: godot
Issue: Exported variable named "script" breaks the actual script
Labels: bug,confirmed,topic:visualscript

Godot v3.1.stable.official

Linux Mint 19.1

In visual script, if a variable is called "script" (all lowercase), the script breaks.
If the project is restarted, the script is cleared from the inherited node.

**Steps to reproduce:**
Attach a visual script to a node, add a variable, name that variable "script" (all lowercase) and run the project.

**Minimal reproduction project:**
[var called script.zip](https://github.com/godotengine/godot/files/3023997/var.called.script.zip)
in Node2D visual script rename the var "new_variable" to "script" and run the project to break it.

Workaround after error (don't panic!):
Just rename the variable called "script"
After reloading the project, the script must be reattached to the node and the variable renamed.

PS:
I don't know if this issue is present in GDscript or nativeScript as well.
Repository: go
Issue: gccgo: dereference of nil pointer to zero-width type does not panic
Labels: NeedsInvestigation

The Go spec says "For an operand x of pointer type *T, the pointer indirection *x denotes the variable of type T pointed to by x. If x is nil, an attempt to evaluate *x will cause a run-time panic."

This program correctly panics with cmd/compile, but does not with gccgo 8.0.0:

    package main

    func main() {
    	var p *struct{}
    	*p = *p
    }

/cc @ianlancetaylor
Repository: godot
Issue: High RAM usage of visual scripts
Labels: bug,discussion,confirmed,topic:visualscript,performance

Godot v3.1.stable.official

Linux Mint 19.1

In my project, not the one linked here, literally 60% of the RAM usage is caused by visual scripts attached to instanced scenes. (GDscript only 6,7%)

Is it possible to share scripts (or parts of scripts) attached to instanced scenes by all instances of that scene and avoid duplicated data in memory? Just like textures (hopefully) are handled?

**Minimal reproduction project:**
[ScriptSizeRep.zip](https://github.com/godotengine/godot/files/3026938/ScriptSizeRep.zip)

The output of the reproduction project shows the ram usage.
Just run it.
Then open the sprite.tscn scene, detach the script from the sprite, run it again and compare the outputs.
The difference of RAM usage is significant. (270MB compared to 90MB)

This issue report was edited a lot, sorry about that, but it should be fine now.
Repository: node
Issue: Supported asymmetric key types
Labels: crypto,openssl

This is a meta issue to keep track of asymmetric key types supported by OpenSSL and node. The following list includes all key types supported by OpenSSL 1.1.1b. Checked items are fully supported by node's `KeyObject` API:

- [x] `EVP_PKEY_RSA`: https://github.com/nodejs/node/pull/24234
- [ ] `EVP_PKEY_RSA2`: appears to be unusable?
- [x] `EVP_PKEY_RSA_PSS`: https://github.com/nodejs/node/pull/26960
- [x] `EVP_PKEY_DSA`: https://github.com/nodejs/node/pull/24234
- [ ] `EVP_PKEY_DSA1`: alias for `NID_dsa_2`, but treated like `EVP_PKEY_DSA` by OpenSSL
- [ ] `EVP_PKEY_DSA2`: alias for `NID_dsaWithSHA`, but treated like `EVP_PKEY_DSA` by OpenSSL
- [ ] `EVP_PKEY_DSA3`: alias for `NID_dsaWithSHA1`, but treated like `EVP_PKEY_DSA` by OpenSSL
- [ ] `EVP_PKEY_DSA4`: alias for `NID_dsaWithSHA1_2`, but treated like `EVP_PKEY_DSA` by OpenSSL
- [x] `EVP_PKEY_DH`: https://github.com/nodejs/node/pull/31178
- [ ] `EVP_PKEY_DHX`
- [x] `EVP_PKEY_EC`: https://github.com/nodejs/node/pull/24234
- [ ] `EVP_PKEY_SM2`: https://github.com/nodejs/node/pull/37066
- [x] `EVP_PKEY_X25519`: https://github.com/nodejs/node/pull/26774
- [x] `EVP_PKEY_X448`: https://github.com/nodejs/node/pull/26774
- [x] `EVP_PKEY_ED25519`: https://github.com/nodejs/node/pull/26319 and https://github.com/nodejs/node/pull/26554
- [x] `EVP_PKEY_ED448`: https://github.com/nodejs/node/pull/26319 and https://github.com/nodejs/node/pull/26554

The next step is to determine which of the above key types need to be dealt with in which way. Some of these types do not represent actual asymmetric keys (e.g., `EVP_PKEY_SCRYPT`) and thus don't need to be dealt with in the `KeyObject` API:

- `EVP_PKEY_SCRYPT`: KDF
- `EVP_PKEY_HMAC`: MAC
- `EVP_PKEY_CMAC`: MAC
- `EVP_PKEY_HKDF`: KDF
- `EVP_PKEY_POLY1305`: MAC
- `EVP_PKEY_SIPHASH`: MAC / PRF
- `EVP_PKEY_TLS1_PRF`: PRF
Repository: flutter
Issue: Clearly document relationships between WidgetsBindingObserver/WidgetsBinding/RouteObserver/RouteAware/NavigatorObserver/Navigator
Labels: framework,d: api docs,f: routes,P2,team-framework,triaged-framework

Extracting from #29596

It's very easy to get them all mixed up but `WidgetsBindingObserver.didPopRoute` `RouteObserver.didPop` `RouteAware.didPop` `NavigatorObserver.didPop` all sound like the same thing while WidgetsBindingObserver.didPopRoute and NavigatorObserver.didPop for instance are completely unrelated. 

Explicitly cross-reference their relationships. 

cc @goderbauer to consider in your routing refactor perhaps.
Repository: go
Issue: x/build/cmd/gopherbot: too aggressive for issue titles that contain the word "document"
Labels: Documentation,Builders,NeedsFix

`gopherbot` is too aggressive when it comes to [identifying issues](https://github.com/golang/build/blob/c72a0eda0790357f78aaa0ea71fd3cf88015facc/cmd/gopherbot/gopherbot.go#L1915-L1916) to be labelled "documentation":

```go
func isDocumentationTitle(t string) bool {
	if !strings.Contains(t, "doc") && !strings.Contains(t, "Doc") {
		return false
	}
	t = strings.ToLower(t)
	if strings.HasPrefix(t, "doc:") {
		return true
	}
	if strings.HasPrefix(t, "docs:") {
		return true
	}
	if strings.HasPrefix(t, "cmd/doc:") {
		return false
	}
	if strings.HasPrefix(t, "go/doc:") {
		return false
	}
	if strings.Contains(t, "godoc:") { // in x/tools, or the dozen places people file it as
		return false
	}
	return strings.Contains(t, "document") ||
		strings.Contains(t, "docs ")
}
```

This came to light with https://github.com/golang/go/issues/31150 which has the title:

```
x/tools/cmd/gopls: textDocument/rangeFormatting gives error "ToUTF16Column: point is missing offset"
```
Repository: pytorch
Issue: documentation for C++ / libtorch autograd profiler
Labels: module: docs,module: cpp,triaged

## 📚 Documentation

<!-- 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 -->

I have a Pytorch C++ frontend (LibTorch) based deployment codebase. I am trying to add profiling support to it. I am thinking of using autograd profiler for it, which seems to be the best option as far as getting layer-by-layer timings is concerned.
I recently saw a change getting pushed in which enables access to the autograd profiler from the C++ frontend (https://github.com/pytorch/pytorch/pull/16580). Is there any documentation for its usage ? Or some sort of a primer...?
Repository: pytorch
Issue: FP32 depthwise convolution is slow in GPU
Labels: high priority,module: dependency bug,module: performance,module: cudnn,module: cuda,module: convolution,triaged

Just tested it in IPython
```
import torch as t


conv2d = t.nn.Conv2d(32,32,3,1,1).cuda()
conv2d_depthwise = t.nn.Conv2d(32,32,3,1,1,groups=32).cuda()
inp = t.randn(2,32,512,512).cuda()

# warm up
o = conv2d(inp)
o = conv2d_depthwise(inp)


%timeit conv2d(inp)
%timeit conv2d_depthwise(inp)
```
get
```
1000 loops, best of 3: 1.7 ms per loop
1000 loops, best of 3: 2.99 ms per loop
```
Group convolution is much slower than normal convolution, which is supposed to be the opposite.

I'm using `1.1.0a0+65d6f10_2_ged1fa68` ,cuda10, driver:410.78,Titan Xp

btw, there is an issue of depthwise convolution being slow in CPU #13716
Repository: pytorch
Issue: Speed-up torch.cat on CPU
Labels: module: performance,module: cpu,triaged

## 🚀 Feature
Please speed-up torch.cat on CPU. It should generally be about as fast as a `clone()` call on the output, since both read and write the same number of elements.

It should have good single-threaded and multi-threaded performance.

On large tensors, it seems to be ~4x slower than I would expect.

### Example that does not fit in cache

```python
x = [torch.randn(1, 282240) for _ in range(64)]
%timeit torch.cat(x, dim=0)  # 42 ms -- expected ~9-11 ms

# note that clone is reasonable speed at this size
y = torch.cat(x, dim=0)
%timeit y.clone()  # 11.4 ms
```
Repository: TypeScript
Issue: intellisense typeroots for jsconfig.json 
Labels: Suggestion,Experience Enhancement


## Suggestion

Add the `typeRoots` property for jsconfig.json like tsconfig.json

## Use Cases

In an Asp.net Core project ,  there are no intellisence for `view.cshtml` file's `<script>` when my type definition file put in `wwwroot/@typings`

## Examples
```
/aspnetcoreproject
   | wwwroot
       |@typings
       |tsconfig.json
   |Views
        |Home
            |index.cshtml    (can not find the type definition files)
   |jsconfig.json
```
## Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: TypeScript
Issue: Better support for global registration patterns
Labels: Suggestion,Needs Proposal

## Suggestion

It seems likely the compiler logic used for globalThis could be reused to support automated global types for custom elements , which is especially annoying and difficult to deal with in jsx

## Use Cases
this is the current dev workflow for creating and using custom elements

The custom element
loading-spinner.ts
```ts

 class LoadingSpinner extends HTMLElement {
  constructor() {
    super();
  this.innerHTML =  `<div class="loading-spinnner">` 
   }
//omitting code for brevity
}

customElements.define('loading-spinner', LoadingSpinner); //<-- could this be added to a global namespace using similar logic as globalThis ?
```

the type definition
loading-spinner.d.ts
```ts
//this is coupled to a specific JSX namespace's types (preact in this case)
//maybe adding a JSX.CustomElementsNamespace to lib.d.ts could be an option as well?

interface LoadingSpinner extends JSX.HTMLAttributes {}

declare namespace JSX {
  interface IntrinsicElements {
    'loading-spinner': LoadingSpinner;
  }
}
```

Using the custom component
usage in a jsx component
```ts
import h from Reactish
let MyComponent = () => {
return (
 <loading-spinner/> //<--so difficult not to get errors here
)
}
Repository: neovim
Issue: Remove insert delay for read-only files
Labels: enhancement,ux,core

https://vi.stackexchange.com/questions/3001/remove-the-insert-delay-after-entering-insert-in-a-read-only-file

This is standard vim behavior hence skipping neovim specific details.

-------

When I edit a file marked read-only, there is a jarring delay upon editing it. Please make it configurable if possible. Thank you. The attached SO question has info on where the edit would go...