sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Mixed Results Assigning One Generic Lookup Function Type Into Another
Labels: Needs Investigation

# Bug Report

I noticed this behaviour recently because it is causing issues with something I am working on. I do not know if this is a bug or if there is something that I am misunderstanding, but the behaviour seems inconsistent at the very least and maybe worth looking into. This is difficult to explain fully in text, but I believe that the code sample I created will be enough for someone knowledgable to triage whether or not this is an issue. I briefly attempted to see if there was a similar issue filed, but I didn't see one and honestly it's a bit tough to search on a popular large repo like this one. 

### 🔎 Search Terms

generic, function, assign, lookup

### 🕗 Version & Regression Information

4.6.2 

I am unaware when this issue started or if this is actually considered an issue at all. It problematic for my current use case and seems inconsistent. I do not have the time to track down whether or not this is a regression or still present in the nightly builds at this time.

### ⏯ Playground Link

```ts repro
// confusing typescript behavior

type AKey = "a";
type BKey = "a" | "b";
type CKey = "a" | "b" | "c";

type AMap = {
    a: "AVal";
};

type BMap = {
    a: "AVal";
    b: "BVal";
};

type CMap = {
    a: "AVal";
    b: "BVal";
    c: "CVal";
};

type A = &lt;T extends AKey>(x: AMap[T]) => void;
type B = &lt;T extends BKey>(x: BMap[T]) => void;
type C = &lt;T extends CKey>(x: CMap[T]) => void;``

let a: A = () => undefined;
let b: B = () => undefined;
let c: C = () => undefined;

// good
a = b; // okay, as expected
a = c; // okay, as expected
b = a; // not okay, as expected, '"BVal" not assignable to "AVal"'
c = a; // not okay, as expected, '"BVal" not assignable to "AVal"'
c = b; // not okay, as expected, '"CVal" not assignable to "AVal" | "BVal"'

// potential issue?
b = c; // not okay?, didn't expect 'BMap[T] not assignable to CMap[T]'

```

[Workbench Repro](https://www.typescriptlang.org/dev/bug-workbench/?#code/PTAEGMHsDsDMFcDOBLaBzUAXAngBwKaLgBOyumoARvgBYCGAbspMQLABQHOBoAggNL5soALygARHXEBuLnnygAQoOFjJ40AB8JlGXJ4BhFaIlStOjdvHg9ndtwW8AsnVwmA3h1DfQdAFwSvABqdAA2tgC+snYOSi5uYp7sPr4B4sFhtimUaYoh4dFRHPoKBvEeXj7+gflZPjkSeZnRKeBpBrWF0SV8JgA8ACqg+AAemPjQACaIfCoAfAAUIwHOrgDaAwC6AJSic6AMkMiT0bGK-UOj41MzykKLy3HrW7si+4fHp-KgBhfDYxNpj95ksAmVnjs9gcjicAAaw4rsUL4CjVXgmBavfbwKb4WCofAnDjIigNc5iTFQnGTPEEolIlEQMEYrGgam06CE7rsECgNCQSCTDh0EyUaSgXmQADWdGwABpfDNRgRwOMhewRWJwOLJTL5Yr-iq1RxKCY6DqwNBIBRpbKFXQlSMjYSFQBycRNcKgK2oxAoNDQOiUZFYSA1TKujjgM0W73W0C2-UOw34VUu0Duz0aH2K-2B4MKTBh9K1SPsaNiMUSy3xxP2x3OyZu8QdTJx315oMhovhr1WLNlji83DWiaYZBhUDIP3wfAAfhNJm11fbCb1c4Vk2O0FdFGVqYorsU8Q2m1XDs7BdDPxPWzLQA)
Repository: ant-design
Issue: 下拉框 open属性设置为undefined在一些情况下不生效
Labels: Inactive,improvement

### Reproduction link

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/ji-ben-antd-4-19-3-forked-jjpfqy?file=/Cas.js:883-897)

### Steps to reproduce

编辑状态为false时，点击一下Please Select(或者点击一下Please select 再点击一下其他地方),此时点击`编辑`按钮，下拉会自动展开

### What is expected?

下拉不自动展开

### What is actually happening?

下拉会自动展开

| Environment | Info |
| --- | --- |
| antd | 4.19.4 |
| React | 17 |
| System | mac |
| Browser | chrome |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: godot
Issue: Godot 3.3.3 Android Custom build export error(Gradle 6.7.1)
Labels: bug,platform:android,needs testing,topic:export

### Godot version

3.3.3

### System information

Windows 10

### Issue description

Whenever I try to export a custom build its shows an error. but normal exports are fine.
![asd](https://user-images.githubusercontent.com/102411851/160339674-544d49e7-3bb2-4da1-9a91-bb1e49171daa.PNG)
And here are my Editor Settings
![ads](https://user-images.githubusercontent.com/102411851/160339927-cd8a8c95-787a-4b84-be7e-d161105b47cc.PNG)



### Steps to reproduce

Godot 3.3.3
Eclipse Adoptium JDK 8
Android studio SDK
Gradle 6.7.1

try to export custom build for android with the requirements given above

Any help is appreciated. thanks in advance! 

### Minimal reproduction project

_No response_
Repository: vscode
Issue: Undo is not passed to editor when input field is opened
Labels: feature-request,rename,papercut :drop_of_blood:

You can never undo a refactoring without first closing the input field because of that because the input field eats the undo:
![Recording 2022-03-28 at 09 05 10 (1)](https://user-images.githubusercontent.com/900690/160344157-f8db8538-e094-4387-b11f-67c6bec16de5.gif)
Repository: create-react-app
Issue: Uncaught ReferenceError: process is not defined (NOT react-error-overlay)
Labels: needs triage,issue: bug report

### Describe the bug

Using the optional chaining operator with process (`process?.env`) throws a `ReferenceError` stating that **process is not defined**.

I originally encountered this behaviour because a dependency is using that syntax, then I tried to write the same in my code and it still breaks.

Note that `process.env` works, and it doesn't appear to be a problem with `react-error-overlay` (I also tried to use [this fix](https://github.com/facebook/create-react-app/issues/12064) without success).

A workaround is to add the following in *index.tsx*:
```typescript
if (!('process' in window)) {
  // @ts-ignore
  window.process = {}
}
```

### Did you try recovering your dependencies?

I just freshly installed it from scratch using
```bash
yarn create react-app temp-app --template typescript
```

### Which terms did you search for in User Guide?

https://github.com/facebook/create-react-app/issues?q=is%3Aissue+uncaught+referenceError%3A+process+is+not+defined
https://github.com/facebook/create-react-app/issues?q=is%3Aissue+process+is+not+defined

### Environment

```
Environment Info:

  current version of create-react-app: 5.0.0
  running from ~/.npm/_npx/c67e74de0542c87c/node_modules/create-react-app

  System:
    OS: macOS 12.2.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 16.12.0 - ~/.nvm/versions/node/v16.12.0/bin/node
    Yarn: 1.22.15 - ~/.nvm/versions/node/v16.12.0/bin/yarn
    npm: 8.1.0 - ~/.nvm/versions/node/v16.12.0/bin/npm
  Browsers:
    Chrome: 99.0.4844.83
    Edge: Not Found
    Firefox: Not Found
    Safari: 15.3
  npmPackages:
    react: ^17.0.2 => 17.0.2 
    react-dom: ^17.0.2 => 17.0.2 
    react-scripts: 5.0.0 => 5.0.0 
  npmGlobalPackages:
    create-react-app: Not Found
```

### Steps to reproduce

1. Install CRA `yarn create react-app temp-app --template typescript`
2. Add `{process?.env?.NODE_ENV}` in *App.tsx* (e.g. in the `<p>`)

### Expected behavior

`development` is shown

### Actual behavior

blank page, the following error in the browser console
<img width="654" alt="Screenshot 2022-03-28 at 09 39 42" src="https://user-images.githubusercontent.com/663755/160349572-a59b371e-f9c8-4aba-91c2-8aed1797b29b.png">

### Reproducible demo

https://github.com/EnoahNetzach/create-react-app-no-process
Repository: go
Issue: proposal: image/png: Encode should allow users to specify the filter type
Labels: Proposal

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.17.6 windows/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
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\a3367\AppData\Local\go-build
set GOENV=C:\Users\a3367\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\a3367\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\a3367\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.17.6
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\a3367\work\misc\seg\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\a3367\AppData\Local\Temp\go-build4034705114=/tmp/go-build -gno-record-gcc-switches
gdb --version: GNU gdb (GDB) 8.1
</pre></details>

### What did you do?
Encode a 23500x45500 `image.NRGBA` image.
This image is around 4GB uncompressed.



### What did you expect to see?
I expected the encoding to finish within 5 seconds.


### What did you see instead?
It took longer than 20 seconds.
According to pprof, most time is spent on selecting the png filter type.

![png_bestspeed](https://user-images.githubusercontent.com/765222/160353922-2f887ddf-13b0-4c1e-8c7a-c26e87f8df38.svg)
If the png library allowed us to simply select the `ftNone`, this would speed up dramatically.
The below `pprof` shows this by simulating `ftNone` with no compression.
![png_nocompression](https://user-images.githubusercontent.com/765222/160354363-5480d3b5-9403-40fe-88cc-986e18022328.svg)
This file [png_encode.zip](https://github.com/golang/go/files/8368345/png_encode.zip) is the pprof dump showing `png.filter` taking a lot time.

One side note, even in the case of no compression, much time is still spent on `runtime.memmove`, any ideas how to eliminate this? Is this related to garbage collection?
Repository: react
Issue: Standalone react-devtools: select component instances in iframe
Labels: Type: Feature Request,Component: Developer Tools

Hi,
in my setup I am using the standalone [react-devtools](https://github.com/facebook/react/tree/main/packages/react-devtools) to inspect a react app running inside an iframe of my main app. I am wondering if there is a way to select individual component instances in the browser view as is it normally possible when using the chrome devtools for a normal (not iframe) environment. Currently I can only select component instances by clicking the entries in the devtools tree.

<h2>Setup</h2>

My react app is running in an iframe. I connect the standalone react-devtools by adding 'react-devtools' to my webpack configuration as described [here](https://github.com/facebook/react/tree/main/packages/react-devtools#usage-with-react-dom).

This all works as intended and the devtools are showing up with the tree of the iframe's react app

<img width="971" alt="Screenshot 2022-03-28 at 10 50 28" src="https://user-images.githubusercontent.com/81635487/160361824-27b119b2-6310-44ad-9ac5-cc53099f166b.png">

<h2>Desired Behavior</h2>

I'd like to select the component instances by clicking them in the browser view like it is possible when using the normal chrome react devtools on a regular (not iframe-nested) app:

<img width="744" alt="Screenshot 2022-03-28 at 10 49 15" src="https://user-images.githubusercontent.com/81635487/160361744-6447059a-ae56-47fd-ba34-0ddde6cc32b9.png">

Is there currently a way to achieve this? Thank you a lot!
Repository: material-ui
Issue: [Tooltip] Problem based on parameter placement
Labels: docs,component: tooltip

Hey currently in version "5.5.0" exists problem with mui tooltip.

Problem is based on parameter placement.

If there is litle(but i can see enougth to get rendered) space above the component tooltip will render under.

I sugest describe it in description of parameter or fix it
Repository: godot
Issue: Godot - I wrote a good code for simple movement but it still lagging
Labels: needs testing,topic:dotnet

### Godot version

3.4.4.stable.mono

### System information

windows 11, GLES2, GeForce GTX 1050 Ti

### Issue description

**hello**
I don't understand why simple movement need to lagging, even on powerful devices.

I made a simple game but it lags sometimes . I have written codes in the way that Godot documents and youtubers have mentioned.

I even use [Smoothing-ddon]((https://github.com/lawnjelly/smoothing-addon) from Lawnjelly. but steel lagging. The devices that I use: pc GeForce GTX 1050 Ti, iphone 12 pro, and vivo. It would be worse if I recorded it. :(

I can't put all the content of the whole game here so I just put a small example of movement script and simple images. Please take a look if there's a mistake in the code or in the project settings. The codes are okay. But I don't know why lagging in a sudden. Should the problem be in project setting ?

[download file here](https://gofile.io/d/cHxDLc)

and this a simple movment code

```
using Godot;


public class chunk_controller : KinematicBody2D {



private Vector2 velocity;



// method: ready
public override void _Ready() {
    velocity.y = chunk_manager.get.speed;
}



// method: physics process
public override void _PhysicsProcess(float delta) {
    move();
    delete_chunk();
}



// method: move character
private void move() {

    if(
        chunk_manager.get.is_pause
    ) {
        return;
    }

    velocity = MoveAndSlide(velocity);
}



// method: delete chunk when get to the finish line
private void delete_chunk() {
    if(
        this.Transform.origin.y >= chunk_manager.get.end_position
    ) {
        this.GetParent().QueueFree();
    }
}
}
```

### Steps to reproduce

*

### Minimal reproduction project

*
Repository: node
Issue: Contextual and GC friendly perf_hooks user timing
Labels: discuss,perf_hooks

### What is the problem this feature will solve?

Currently, it’s hard to manage GC lifetimes of user-timing entries without clearing all of them. Also, entries are identified by their names and types (marks or measures) to compute duration, thus it is quite easy for libraries to step on other's ways when using the `perf_hooks.performance` API.

The problem is more outstanding when using the `perf_hooks.performance` API in server environments, as the performance entries are going to be created again and again with the same name and are hard to manage in the global performance timeline.

### What is the feature you are proposing to solve the problem?

As discussed at W3C PerfWG https://github.com/w3c/user-timing/issues/86#issuecomment-1080501012, there are interests in adding namespace support in the user-timing API.

With namespaces, performance entries could be all released at once when the namespace is no longer been used.

Opening this issue to gather visibility and feedback on the idea of https://github.com/w3c/user-timing/issues/86.

/cc @jasnell
Repository: PowerToys
Issue: Mouse higlighter: Right-click mouse higlighet got stuck with mouse and on screen
Labels: Issue-Bug,Priority-3,Product-Mouse Utilities,Status-Reproducible

### Microsoft PowerToys version

0.56.2

### Running as admin

- [ ] Yes

### Area(s) with issue?

Mouse Utilities

### Steps to reproduce

1. Turn on mouse utility "Mouse highlighter" and activate it
2. Lock your windows by "WIN+L"
3. Click "right click" button on mouse to active login view
4. Login back in your windows
5. Default blue highlighter circle is stuck with mouse icon and later on screen 

![image](https://user-images.githubusercontent.com/43697346/160406103-bbc43105-ebbf-423e-841d-edeed5650807.png)


### ✔️ Expected Behavior

Right click highlighter not stuck with mouse and on the screen 

### ❌ Actual Behavior

Right click highlighter got stuck with mouse and on the screen 

### Other Software

_No response_
Repository: terminal
Issue: Dynamic Profiles for Hyper-V VMs
Labels: Issue-Feature,Area-Extensibility,Area-Settings,Product-Terminal

From a discussion on Friday:

It'd be cool if there were automatic profiles to SSH to Hyper-V VMs. Presumably, these would come pre-configured with the commandline set up with the ssh key generated for that VM. So whenever you create a new VM, _bam_, it's right there in the list of profiles. 

Implementation wise, this is probably better off implemented as fragment profiles that Hyper-V populates. That being said, I'm gonna track this here because it's a really cool idea we should follow up with the Hyper-V team on.
Repository: PowerToys
Issue: [PT Run] Additional modes for suppressing Fullscreen mode 
Labels: Idea-Enhancement,Product-PowerToys Run

### Description of the new feature / enhancement

As a developer, I used to be in the fullscreen mode in my VScode environment. Sometimes I miss the `Alt+Spacebar` shortcut bringing me the search bar. I'd like to ask if it's possible to add exceptions for the `Ignore hotkeys in fullscreen mode` checkbox? Or the other way around. If made more clever it could handle both cases:

- [X] when checked, ignore hotkeys except for the apps
- [ ] when unchecked, ignore hotkeys only for apps

### Scenario when this would be used?

Being in a fullscreen mode in text editor

### Supporting information

For example, on `mac`, you can bring up spotlight to switch to another file.
Repository: godot
Issue: TextEdit ignores expand_margin
Labels: bug,topic:gui

### Godot version

3.4.4

### System information

Windows 10

### Issue description

Setting a border on the `TextEdit` with an `expand_margin` results in no border at all.

### Steps to reproduce

1. Make a new Theme
2. Give `TextEdit` a focus `StyleBoxFlat` with a border of 4px on all sides
3. Clicking the preview `TextEdit` shows a border
4. Change the `StyleBoxFlat` to use an `expand_margin` of 4px on all sides
5. Click the preview `TextEdit`: no border visible

Setting a similar `StyleBoxFlat` for `LineEdit` works as expected.

### Minimal reproduction project

_No response_
Repository: angular
Issue: ViewEncapsulation behavior changes based on the elements rendered on AppComponent
Labels: area: core,core: CSS encapsulation,P4

### Which @angular/* package(s) are the source of the bug?

core

### Is this a regression?

No

### Description

Not sure if this is a regression.

I am following the [ViewEncapsulation documentation](https://angular.io/guide/view-encapsulation) with a local `ng new` project and I don't see the correct behavior (as said in the docs) when I render `<app-shadow-dom-encapsulation></app-shadow-dom-encapsulation>` on my `AppComponent` template.

I looked at the [linked stackblitz](https://stackblitz.com/run?file=src%2Fapp%2Fapp.component.ts) in the example and it works there.

The difference that I found was I only render the `app-shadow-dom-encapsulation` while the Stackblitz renders ALL 3 `app-no-encapsulation`, `app-emulated-encapsulation`, and `app-shadow-dom-encapsulation`.

Try removing `app-no-encapsulation` from the Stackblitz will result in unexpected behavior.

### Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/run?file=src%2Fapp%2Fapp.component.ts

### Please provide the exception or error you saw

```true
Component styles with `ViewEncapsulation.None` inside of a Component with `ViewEncapsulation.ShadowDom` take precedence over the `ShadowDom`'s styles which is **not** the behavior mentioned in the docs.
```


### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 13.1.4
Node: 14.18.2
Package Manager: npm 6.14.15
OS: darwin x64

Angular: 13.1.3
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1301.4
@angular-devkit/build-angular   13.1.4
@angular-devkit/core            13.1.4
@angular-devkit/schematics      13.1.4
@angular/cli                    13.1.4
@schematics/angular             13.1.4
rxjs                            7.5.5
typescript                      4.5.5
```


### Anything else?

_No response_
Repository: storybook
Issue: Setting properly the height for iframes
Labels: feature request

**Is your feature request related to a problem? Please describe**
I'm always frustrated when it comes to use stories inside a MDX file. 

![2022-03-28_18h36_57](https://user-images.githubusercontent.com/89700030/160445660-ddb96a72-6b2b-48f3-9ad2-8b47e709bf78.png)

Just before the Iframe, there is a Div set to `height: 100px`. Well, when the story is rendered, we have this ugly scrollbar:

![2022-03-28_18h38_38](https://user-images.githubusercontent.com/89700030/160445947-7f5ad52e-ccc8-423d-b272-43209592dab5.png)

**Describe the solution you'd like**
Why don't we change this `height` to `min-height` ? I already tried this and it seems more interesting to use as it will always (I think) fit the content of the iframe. What do you think? 😄 

![2022-03-28_18h42_49](https://user-images.githubusercontent.com/89700030/160446642-c235f8d6-5a40-457b-86a3-478115de7e8c.png)

**Are you able to assist to bring the feature to reality?**
Yes, if I can find where it is set in the code
**Edit**: I tried to update the project via git but it seems there is a problem from me, so I can't help directly 😢
Repository: pytorch
Issue: Feature request: Root-finding functionality (like scipy.optimize.root_scalar)
Labels: feature,triaged,module: scientific computing

### 🚀 The feature, motivation and pitch

I often need to find roots of continuous functions and would like a general-purpose root-finding operation.

Here’s a basic API to motivate this issue (cribbed from [scipy.optimize.root_scalar](https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.root_scalar.html#scipy.optimize.root_scalar)):

```Python
def root_scalar(
    f: Callable,
    args: Tuple = (),
    method: Optional[str] = "newton",
    interval: Optional[Tuple[float, float]] = None,
    x0: Optional[float] = None,
    x1: Optional[float] = None,
):
    pass
```

### Alternatives

I do one one of the following three options:

1. use something from `scipy.optimize` (this works most of the time if I can afford the computational cost),
2. jury rig something from `torch.optim` (this occasionally works and might work more than I think if I were a smarter person), or
3. implement it myself (I’m a pretty good programmer but nobody should trust me when it comes to implementing optimization methods).

### Additional context

I suspect this issue may be contentious with people who have many opinions about root-finding and/or optimization. Bless you. I love that I work with all of you and I love when you provide me free advice. Nevertheless, I am not one of you. I am a simple person just looking for roots in my continuous functions. I am positive one of Brent’s, Newton’s, or Ridder’s methods is more than sufficient for my day-to-day work.
Repository: PowerToys
Issue: Keep Shortcut Guide on screen when Windows key released
Labels: Idea-Enhancement,Product-Shortcut Guide

### Description of the new feature / enhancement

It would be good if the shortcut guide remains on screen when you release the Windows key or at least have the option when holding down the windows key to either close when key is released or left on screen and closed when key pressed again.

### Scenario when this would be used?

It would allow you to see the options without having to keep the key pressed while you read the screen, this will improve usage as you can just use a single tap to bring up the screen and another one to dismiss.

### Supporting information

_No response_