sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: terminal
Issue: CreateThread should be replaced with _beginthreadex
Labels: Product-Conhost,Issue-Bug,Product-Terminal,Area-CodeHealth,In-PR,Priority-3,Impact-Correctness

[Funny thing I just discovered:](https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createthread)
> A thread in an executable that calls the C run-time library (CRT) should use the `_beginthreadex` and `_endthreadex` functions for thread management rather than `CreateThread` and `ExitThread`; this requires the use of the multithreaded version of the CRT. If a thread created using `CreateThread` calls the CRT, the CRT may terminate the process in low-memory conditions.

For correctness' sake we should use `std::thread` (or `_beginthreadex`) throughout the project instead of `CreateThread` if possible.
Repository: godot
Issue: Visual Script deletes disconnected node when deleting previously connected node
Labels: bug,topic:editor,topic:visualscript

### Godot version

Godot_v3.4.4-stable_x11.64

### System information

Linux, Ubuntu 20.04 LTS, NVIDIA GTX 1650 Super, GLES3

### Issue description

I have tried VisualScript for first time to check if it is any useful, and I found several bugs during my fooling around. This is one of the bugs I found. When I add _physics_process function by overriding it, then connect it with some other node, then disconnect it from the other node, then when I delete _physics_process then also the previously connected node disappears. There is no crash though, only that the nodes disappear without any warning.

### Steps to reproduce

1. Create new project (OpenGL ES 3.0)
2. Click 3D Scene to create Spatial node
3. Add CSGBox as a child to Spatial node
4. Attach new VisualScript CSGBox.vs to the box
5. In visual editor click on Functions: override an existing built-in function
6. Choose Physics Process(float)
7. Right click on the plane and search for: Construct Vector 3XYZ and add it
8. Connect _physics_process delta with x of Construct Vector3
9. Disconnect _physics_process delta from x of Construct Vector3
10. Right click to _physics_process function in Members tool and choose Delete selected
11. The node "Construct Vector3" disappears together with _physics_process function
12. This is a bug!

You can at least CTRL+Z to restore previous state. Add any other node and delete _physics_process, it deletes all of them...

### Minimal reproduction project

_No response_
Repository: go
Issue: proposal: go/build: add API to return embed patterns
Labels: Proposal,Proposal-Hold

This is similar to #52222.

While most Go programmers use the go tool, there are alternative build systems such as Bazel.  In order to build existing Go code, those build systems have to analyze [`go:embed` directives](https://pkg.go.dev/embed#hdr-Directives) in the same way as the go tool does.  This can in principle be done by parsing the file and looking at the comments, but this permits unanticipated deviations from what the go tool does.  The go/build package already contains the code that does this for the go tool, but it is not exposed in a usable form; it is only exposed as part of creating a `go/build.Package`, but that assumes that directory layout used by the go tool but not by Bazel.

I propose that we add a new exported method to go/build similar to a subset of the existing `readGoInfo` function.

```Go
// EmbedPatterns returns the patterns for all go:embed directives found in the Go file read from f.
// If f does not import the "embed" package, EmbedPatterns will not return any patterns.
func EmbedPatterns(f io.Reader) []string
```

Note that this API doesn't return the locations of the `go:embed` patterns.  I think that is OK in practice because it's easy for the developer to search for the relevant `go:embed` directive if there is an error locating the files.  But if it seems appropriate we could add offset/line/column information to the results.
Repository: flutter
Issue: [autosubmit] Generalize the CronAuthProvider
Labels: team-infra,P3,triaged-infra

Generalize the CronAuthProvider to implement from a AuthProvider that defines it implements authenticate().
Repository: pytorch
Issue: `torch.linalg.lstsq` raises `CUBLAS_STATUS_EXECUTION_FAILED` for large `B` in CUDA tensors
Labels: triaged,module: cublas

### 🐛 Describe the bug

`torch.linalg.lstsq` raises `CUBLAS_STATUS_EXECUTION_FAILED` for large `B` in CUDA tensors but not `torch.lstsq`.

### Code to reproduce

```
import torch as th

M = th.rand(4, 4).cuda()
X = th.rand(1000000, 4).cuda()
res1 = th.pinverse(M) @ X.T
res2, _ = th.lstsq(X.T, M)

assert((res1 - res2).abs().max() < 1e-3)
# works

res3, _, _, _ = th.linalg.lstsq(M, X.T)
assert((res1 - res3).abs().max() < 1e-3)
# fails with
# RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling `cublasStrsmBatched( handle, side, uplo, trans, diag, m, n, alpha, A, lda, B, ldb, batchCount)`
```

### Versions

pytorch 1.10.1+cu113
```
Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.3 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: Could not collect
CMake version: version 3.10.2
Libc version: glibc-2.27

Python version: 3.8.5 (default, Sep  4 2020, 07:30:14)  [GCC 7.3.0] (64-bit runtime)
Python platform: Linux-5.3.0-62-generic-x86_64-with-glibc2.10
Is CUDA available: N/A
CUDA runtime version: 11.3.109
GPU models and configuration: 
GPU 0: NVIDIA GeForce RTX 2070
GPU 1: NVIDIA GeForce RTX 2070
GPU 2: NVIDIA GeForce RTX 2070
GPU 3: NVIDIA GeForce RTX 2070

Nvidia driver version: 495.46
cuDNN version: /usr/local/cuda-10.1/targets/x86_64-linux/lib/libcudnn.so.7
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

Versions of relevant libraries:
[pip3] Could not collect
[conda] mypy                      0.770                    pypi_0    pypi
[conda] mypy-extensions           0.4.3                    pypi_0    pypi
[conda] numpy                     1.20.1                   pypi_0    pypi
[conda] torch                     1.10.1+cu113             pypi_0    pypi
[conda] torchaudio                0.10.1+cu113             pypi_0    pypi
[conda] torchgeometry             0.1.2                    pypi_0    pypi
[conda] torchvision               0.11.2+cu113             pypi_0    pypi
```

cc @csarofeen @ptrblck @xwang233
Repository: pytorch
Issue: torch.overrides testing is not catching people adding new kwargs and not passing on to handle_torch_function
Labels: module: tests,triaged,module: __torch_function__

### 🐛 Describe the bug

In  https://github.com/pytorch/pytorch/pull/75484 I detected several cases where people added new kwargs to functions that supported `__torch_function__`, but forgot to send those arguments to `handle_torch_function`. Our current `test/test_overrides.py` testing is insufficient to catch these cases as the functions are never exercised with these new arguments. I found these errors by running the entire test suite under a dummy torch function. It would be nice to get this in CI somehow.

### Versions

master

cc @mruberry @hameerabbasi @rgommers @peterbell10
Repository: pytorch
Issue: [JIT] `torch.jit.ignore` is not working on hooks
Labels: oncall: jit

### 🐛 Describe the bug

Adding `torch.jit.ignore` on hooks doesn't seem to work. It throws the same error with and without the decorator. See this short code snippet for reproduction:

```
import torch
import torch.nn as nn
from typing import Tuple

class M(nn.Module):
    def __init__(self):
        super().__init__()
        self.conv = nn.Conv2d(5, 5, 2)

    def forward(self, x):
        return self.conv(x) + 10

@torch.jit.ignore
def my_hook(self, input: Tuple[torch.Tensor], output):
    for name, param in self.named_parameters():
        print(name, param.shape)

m = M()
m.conv.register_forward_hook(my_hook)

m_scripted = torch.jit.script(m)
```

Error:
```
torch.jit.frontend.UnsupportedNodeError: Lambda aren't supported:
  File "/Users/kpt/.pyenv/versions/test/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1559
        """
        gen = self._named_members(
            lambda module: module._parameters.items(),
            ~ <--- HERE
            prefix=prefix, recurse=recurse)
        for elem in gen:
```

### Versions

Collecting environment information...
PyTorch version: 1.11.0
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 11.4 (x86_64)
GCC version: Could not collect
Clang version: 12.0.5 (clang-1205.0.22.11)
CMake version: Could not collect
Libc version: N/A

Python version: 3.7.12 (default, Mar 24 2022, 20:48:13)  [Clang 12.0.5 (clang-1205.0.22.11)] (64-bit runtime)
Python platform: Darwin-20.5.0-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.20.3
[pip3] pytorch-lightning==1.6.0
[pip3] torch==1.11.0
[pip3] torchmetrics==0.7.3
[pip3] torchvision==0.12.0
[conda] Could not collect
Repository: go
Issue: x/pkgsite: No skip to content button on search page
Labels: FeatureRequest,pkgsite,pkgsite/search

<!--
Please answer these questions before submitting your issue. Thanks!

If you would like to have your package removed, please file an issue at https://golang.org/s/pkgsite-package-removal.
-->
 
### What is the URL of the page with the issue?
https://pkg.go.dev/search?q={searchTerm}
 
 
### What is your user agent?
 
<!-- 
You can find your user agent here:
https://www.whatismybrowser.com/detect/what-is-my-user-agent
-->
 [Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.79 Safari/537.36](https://developers.whatismybrowser.com/useragents/parse/?analyse-my-user-agent=yes)
 
 
### Screenshot
 
<!--
Please paste a screenshot of the page.
-->
 
Adding GIF to show problem

![Peek 2022-04-09 12-08](https://user-images.githubusercontent.com/63192115/162560066-2ef90134-e5c6-4bc1-bc01-7b58e7a61130.gif)
 
### What did you do?
 
<!--
If possible, provide a recipe for reproducing the error.
-->
Tried navigating the page using <kbd>Tab</kbd>
 
 
### What did you expect to see?
A skip to content button at first that skips the navigation/header and probably also the search bar
 
 
### What did you see instead?
I had to tab through the navigation and the search bar

## Solution
Adding a skip to content button that is highest up in the document tree (that is, will be the first element to come into focus when tab navigating). It should also normally be hidden and only show up when has focus. Clicking (or basically pressing enter on the keyboard when it has focus) should skip the navigation (and probably the search bar as well) so as to when one presses tab after that, the focus is on the packages.

Example: Google search does this  - https://www.google.com/search?q=go (open the URL and try to navigate with tab)
Repository: create-react-app
Issue: Create React App Not install (Aborting installation)
Labels: needs triage,issue: bug report

All time this error showing.

![image](https://user-images.githubusercontent.com/15661765/162560807-50756506-be49-4e65-9a9d-6884f8f5f2d2.png)

**Can anyone tell me what's the problem? I have not been able to install React 18 since it was updated.**
Repository: terminal
Issue: Application title stuck on "Settings" after Use active terminal title as application title is disabled
Labels: Help Wanted,Issue-Bug,Area-UserInterface,Product-Terminal,Priority-3

### Windows Terminal version

1.11.3471.0

### Windows build number

10.0.19044.1586

### Other Software

_No response_

### Steps to reproduce

Enable "Use active terminal title as application title"
Disable "Use active terminal title as application title"

![image](https://user-images.githubusercontent.com/2218936/162564340-d0253332-2c63-410d-8f6c-52c6cec220d6.png)


### Expected Behavior

Title should revert to "Windows Terminal"

### Actual Behavior

Title remains "Settings"
Repository: rust
Issue: Run button is not useable for users on mobile devices
Labels: T-rustdoc,O-ios,A-rustdoc-ui

Currently, the run button is only displayed when the mouse cursor hovers the code block, preventing users without a mouse cursor to see the button. However, having the run button displayed all the time over the code isn't great either. An alternative would be to reduce its size and put it into its own line.

What do you think?

cc @jsha
Repository: electron
Issue: [Feature Request]: Add support for gtk4
Labels: enhancement :sparkles:,wayland

### Preflight Checklist

- [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

Electron 18 does not compile with gtk4, even though Chromium 100 offers support via `gtk_version=4`. Detailed logs can be found [here](https://github.com/PF4Public/gentoo-overlay/issues/143).

### Proposed Solution

None

### Alternatives Considered

None

### Additional Information

_No response_
Repository: rust
Issue: Lower the required mir-opt-level for NormalizeArrayLen
Labels: T-compiler,A-MIR,A-mir-opt

Some time ago I've implemented the optimization to use constant length for array length operations instead of degrading to length of the slice. At the moment it requires mit-opt level of 4 and I'd like to understand what can be done to move it to "safe" area

Optimization itself: https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir_transform/src/normalize_array_len.rs
Repository: godot
Issue: Close Other Tabs Shortcut does not exist
Labels: enhancement,topic:editor,topic:input

### Godot version

4.0 Alpha 6

### System information

Windows 10 Nvidia GTX 1060 Intel i5 4690k

### Issue description

There is no option for "close other tabs" in regards to scene tabs.

However, there does exist the option in the editor, which works.

This is confusing, because assigning a shortcut to close other tabs actually refers to the script editor, NOT the scenes.

~~Assigning a shortcut to "close other tabs" does not work~~

~~The shortcut I attempted to use was "Ctrl-Shift-W" with physical scan code.~~

~~I also made sure there were no other binds to the same command~~

~~Close other tabs works when manually selecting in editor, but not when attempting to use a shortcut.~~

### Steps to reproduce

1. ~~Assign "Ctrl-Shift-W" with physical scan code to "close other tabs" shortcut~~
2. ~~Have multiple tabs open~~
3. ~~Attempt to use shortcut~~

### Minimal reproduction project

[CloseAll.zip](https://github.com/godotengine/godot/files/8456885/CloseAll.zip)
Repository: godot
Issue: Cannot import NEOCITY blend file in reasonable time and space
Labels: bug,topic:editor,topic:import,performance

### Godot version

4.0 https://github.com/godotengine/godot/commit/eb6ebdc4aff88de8da4217dfe1c4f226a1fd2132

### System information

Windows 11, Nvidia 3000 series, Vulkan

### Issue description

It takes too much time to import the NEOCITY blender scene into Godot Engine.

The zipped package is 3.1 GB and 3.2 GB uncompressed.

### Steps to reproduce

Move the blender file into the Godot project folder.

### Minimal reproduction project

https://kitbash3d.com/collections/kits/products/mini-kit-neo-city download the blender file.
Repository: angular
Issue: Change Detection keeps running when the application listens to  "message" event when DevTools is loaded
Labels: area: core,workaround2: non-obvious,area: zones,core: change detection,P4,area: devtools

### Which @angular/* package(s) are the source of the bug?

Don't known / other

### Is this a regression?

No

### Description

// Given
```ts
export class AppComponent {
  ngOnInit() {
    window.addEventListener('message', (event) => {
      //
    });
  }
}
```
// When
Load Angular DevTools.

// Then
Change Detection keeps running. 


### Please provide a link to a minimal reproduction of the bug

https://www.loom.com/share/9667222d65564f6fb450d4bfb9bf2dc9

### Please provide the exception or error you saw

No Error. Just performance issue and bad DX.

### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 13.3.1
Node: 16.10.0
Package Manager: npm 7.24.0
OS: linux x64

Angular: 13.3.1
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
```


### Anything else?

It seems that there is some sort of handshake communication between the backend and content scripts of the Angular DevTools extension using the message event which seems to be putting the process in a loop that madly triggers the change detection on the app.

In my use case I could not put the listener outside Angular Zone because what listens to the message event is a library (pdftron) that executes addEventListener by simply requiring the package.

```ts
import {WebViewer} from '@pdftron/webviewer';
console.log(WebViewer);
// window.addEventListener executed
```

The only workaround would be to use Zone flags but first I need to make sure the library does not rely on the message event on its Angular sdk.
Repository: kubernetes
Issue: Scheduler deploys pods on nodes with fully used cpu resources
Labels: sig/scheduling,kind/feature,lifecycle/frozen,needs-triage

### What happened?

We tried to test the default functionality of the scheduler in order to implement a custom one. From our understanding, the scheduler should deploy the pods on the most available node. 

### What did you expect to happen?

We used 3 worker nodes in our cluster, and we stressed two of them using stress package from Linux and we expected that the pod should be deployed on the non-stressed node (we impose also the cpu request in the deployment manifest file). We saw that the pod was deployed on one of the two stressed nodes instead of the one with the most available resources.

### How can we reproduce it (as minimally and precisely as possible)?

Deploy a cluster with 3 worker nodes, with 4vcpu and 4 GB of RAM. Then stress two workers with stress tool from Linux and requests 3000m cpu for the deployment (we used a deployment for nginx) and see where the pods are being deployed.

### Anything else we need to know?

_No response_

### Kubernetes version

Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.5", GitCommit:"c285e781331a3785a7f436042c65c5641ce8a9e9", GitTreeState:"clean", BuildDate:"2022-03-17T03:51:43Z", GoVersion:"go1.17.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.3", GitCommit:"c92036820499fedefec0f847e2054d824aea6cd1", GitTreeState:"clean", BuildDate:"2021-10-27T18:35:25Z", GoVersion:"go1.16.9", Compiler:"gc", Platform:"linux/amd64"}


### Cloud provider

Bare-metal

### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
$ uname -a
Linux ubuntu 5.13.0-39-generic #44~20.04.1-Ubuntu SMP Thu Mar 24 16:43:35 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux


</details>


### Install tools

kubeadm

### Container runtime (CRI) and version (if applicable)

Docker

### Related plugins (CNI, CSI, ...) and versions (if applicable)

Calico CNI
Repository: PowerToys
Issue: Power Rename auto-complete library
Labels: Idea-Enhancement,Product-PowerRename,Needs-Triage

### Description of the new feature / enhancement

When autocompleting the input filename regex, the output filename regex it was last used with should also be autocompleted

### Scenario when this would be used?

Renaming an epub:
(.*) by (.*) -> $2 - $1

Renaming a movie
(.*)(19|20)(\d\d).* -> $1 ($2)

The input & output regexes are paired. They're not independent choices.

### Supporting information

_No response_
Repository: electron
Issue: [Feature Request]: type safe ipc handling
Labels: enhancement :sparkles:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

In typescript when using methods like `ipcMain.handle`, `ipcRenderer.invoke` and [other](https://www.electronjs.org/docs/latest/api/ipc-main/#methods) [methods],(https://www.electronjs.org/docs/latest/api/ipc-renderer#methods) its hard to make sure they are type safe and the request and response interfaces are kept in sync.

[There are a number of external packages trying to solve this issue](https://www.npmjs.com/search?ranking=optimal&q=typescript%20electron%20ipc) but after having tried a couple, they all seem either too overbearing, unmaintained, incomplete or a combination of the above.

### Proposed Solution

It would be great if IPC methods would accept a generic type which allow for better type safety. 
(Inspired by the incomplete [electron-typescript-ipc](https://www.npmjs.com/package/electron-typescript-ipc) npm package)

```ts
ipcMain.handle<T>(...)
``` 

### Alternatives Considered

Alternatively Electron could "pick a winner" from all the [potential candidates](https://www.npmjs.com/search?ranking=optimal&q=typescript%20electron%20ipc), and advertise it in the docs. That would focus and hopefully consolidate the landscape, and make it easier for the electron/typescript community to maintain one project instead of 25.

### Additional Information

https://stackoverflow.com/questions/61767919/how-can-i-make-electron-channels-more-type-safe
Repository: godot
Issue: Expressions don't allow built in constants.
Labels: bug,topic:core

### Godot version

v4.0.alpha6.official [e4f0fc50f]

### System information

Linux Kubuntu

### Issue description

Expressions allow built ins like `Color(1,1,1,1)` but not constants `Color.WHITE`.
```
"Color()": 0,0,0,1
"Vector2()": (0, 0)
"Color(1,1,1,1).darkened(0.5)": 0.5,0.5,0.5,1
"Vector2(0,0).distance_to(Vector2(1,1))": 1.414214
(ERROR) "Color.WHITE": Expected '('
(ERROR) "Vector2.ZERO": Expected '('
(ERROR) "Color.WHITE.darkened(0.5)": Expected '('
(ERROR) "Vector2.ZERO.distance_to(Vector2.ONE)": Expected '(
```

Same thing in v3.5.beta1.official [b9b23d222]

### Steps to reproduce

Paste to script and `Ctrl + Shift + X`
```gd
@tool
extends EditorScript

func _run():
	var expr = Expression.new()
	for k in [
		"Color()",
		"Vector2()",
		"Color(1,1,1,1).darkened(0.5)",
		"Vector2(0,0).distance_to(Vector2(1,1))",
		# the following won't work
		"Color.WHITE",
		"Vector2.ZERO",
		"Color.WHITE.darkened(0.5)",
		"Vector2.ZERO.distance_to(Vector2.ONE)",
		]:
		if expr.parse(k) == OK:
			prints("\"%s\": %s" % [k, expr.execute()])
		else:
			print("(ERROR) \"%s\": %s" % [k, expr.get_error_text()])
```

### Minimal reproduction project

_No response_